Documentation

OCL Nexus Hub

Everything you need to get from API key to autonomous agent in under 3 minutes.

Why OCL Nexus?

OCL Nexus is an "Agentic Compute Fabric". We provide the high-performance Ubuntu environments, NVMe storage, and internal networking that agents need to build and run real services. By using standard conventions like nexus-start.sh, your agents can move from "writing code" to "deploying production-ready services" autonomously.

Quick Start

1

Create an account & top up your wallet

Sign up at oclhosting.com. New accounts receive €5 free credits. To add more credits, visit the Wallet. Credits are consumed at €0.008 / hour per active workload.

2

Generate an API key

Go to Dashboard β†’ API Keys and click Create API Key. Copy the key β€” it is shown only once. Keys follow the format nx_....

3

Connect your IDE or agent

Paste your key into the config for your tool below. Your agent can then call all 15 Nexus MCP tools to deploy sandboxes, upload code, run services, and verify they're responding.

Quick & Dirty

If you are using any modern agentic harness, you can try configuring it using a prompt. Get your API key and ask your agent something like this:

β€œPlease read the documentation at https://oclnexus.com/docs and set up the OCL MCP connection. Read the Playbook and set up a new OCL skill.”

Connect Your IDE

OCL Nexus exposes a Model Context Protocol server at https://app.oclhosting.com/api/mcp/v1.

Claude Desktop

Open Claude Desktop β†’ Settings β†’ Developer β†’ Edit Config and add the following to your claude_desktop_config.json. Replace YOUR_API_KEY with your key from the API Keys page.

json
{
  "mcpServers": {
    "ocl-nexus": {
      "url": "https://app.oclhosting.com/api/mcp/v1",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

File: claude_desktop_config.json

Verify it works: ask Claude "List my OCL workloads" β€” if it responds with a list (or an empty list), the MCP connection is live.

Claude Code

Add the following to ~/.claude/settings.json (global) or .claude/settings.json (per-project). Replace YOUR_API_KEY with your key from the API Keys page.

Required: the "type": "http" field is mandatory for Claude Code and silently fails without it. Claude Desktop does not need this field.

json
{
  "mcpServers": {
    "ocl-nexus": {
      "type": "http",
      "url": "https://app.oclhosting.com/api/mcp/v1",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

File: ~/.claude/settings.json or .claude/settings.json

Verify it works: ask Claude "List my OCL workloads" β€” if it responds with a list (or an empty list), the MCP connection is live.

Add a CLAUDE.md to your project (recommended)

Claude Code reads CLAUDE.md at the project root on every session. This starter gives your agent the key rules without re-discovering them.

markdown
## OCL Nexus
MCP server `ocl-nexus` is available. Use it to deploy and manage cloud sandboxes.

### Key rules
- Always call `nexus_wait_for_ready` after `nexus_deploy` or `nexus_restart` β€” never poll manually
- Use `nexus_write_files` for 2+ files in one call
- Use `python3` / `pip3 install --break-system-packages`, never `python` / `pip`
- Flask/Express apps must bind to port **8000** (public ingress target)
- For pod-to-pod HTTP calls use port **80**: `http://svc-<id>:80` β€” the k8s service maps :80 β†’ container:8000
- `nexus_fetch` hits the public HTTPS URL, not the internal URL; use `nexus_execute_command` + `curl` to test internal reachability

### Service mode pattern (Flask)
```bash
# nexus-start.sh
pip3 install flask --break-system-packages --quiet && exec python3 app.py
```

### Workflow
deploy β†’ wait_for_ready β†’ write_files β†’ restart β†’ wait_for_ready β†’ fetch /health

Cursor

Open Cursor β†’ Settings β†’ MCP, or create .cursor/mcp.json in your project root. Replace YOUR_API_KEY with your key from the API Keys page.

json
{
  "mcpServers": {
    "ocl-nexus": {
      "url": "https://app.oclhosting.com/api/mcp/v1",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

File: .cursor/mcp.json

Verify it works: ask Claude "List my OCL workloads" β€” if it responds with a list (or an empty list), the MCP connection is live.

Continue.dev

Merge the following into ~/.continue/config.json. Replace YOUR_API_KEY with your key from the API Keys page.

json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "http",
          "url": "https://app.oclhosting.com/api/mcp/v1",
          "headers": {
            "Authorization": "Bearer YOUR_API_KEY"
          }
        }
      }
    ]
  }
}

File: ~/.continue/config.json

Verify it works: ask Claude "List my OCL workloads" β€” if it responds with a list (or an empty list), the MCP connection is live.

Instance Endpoint Access

All instance endpoints (e.g. https://inst-xxxx.oclhosting.com) are protected by OCL authentication. Only browsers with an active OCL session can reach them β€” unauthenticated requests are rejected at the gateway.

Public access β€” shareable URLs reachable without an OCL account β€” is planned for a near future release.

Billing

Billing model
Prepaid credits
Hourly rate (per workload)
€0.008 / hr
Monthly equivalent
β‰ˆ €6 / month
Welcome credits
€5 (one-time, no card)

Credits are deducted hourly for each running workload. Terminate workloads when not in use to preserve balance. Monitor balance via the Wallet or the nexus://wallet/balance MCP resource.