Skip to content

CP MCP Server

URL: https://mcp.computeportal.io/mcp

The Compute Portal MCP server exposes all CP platform capabilities as tools that AI assistants (Claude, Cursor, Windsurf, and any MCP-compatible client) can call directly. This lets you manage GPU workloads, deploy services, run sandboxes, provision databases, inspect billing, and more through natural language — without leaving your AI assistant.


Protocol

The CP MCP server implements the Model Context Protocol (MCP) using the Streamable HTTP transport.

PropertyValue
ProtocolMCP (Model Context Protocol)
TransportStreamable HTTP
Endpointhttps://mcp.computeportal.io/mcp
SDK@modelcontextprotocol/sdk
AuthCP_API_TOKEN environment variable
Total tools21

Authentication

The MCP server authenticates using your CP API token:

CP_API_TOKEN=cp_live_<hex-string>

The token format is cp_live_ followed by a lowercase hex string — the same token used for direct API and CLI calls. Find yours at https://dashboard.computeportal.io under Settings → API Tokens.


Integrations

Claude Desktop

Add to your Claude Desktop config file.

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "computeportal": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.computeportal.io/mcp"],
      "env": {
        "CP_API_TOKEN": "cp_live_4a7f3b9c2e1d8a06"
      }
    }
  }
}

Restart Claude Desktop after saving. A hammer icon in the chat input area confirms MCP tools are active.

Verify: Ask Claude "List my CP services" — it should call cp_service_list and return your running services.


Cursor

Open Cursor Settings → MCP and add:

json
{
  "computeportal": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://mcp.computeportal.io/mcp"],
    "env": {
      "CP_API_TOKEN": "cp_live_4a7f3b9c2e1d8a06"
    }
  }
}

If your Cursor version supports HTTP MCP natively:

json
{
  "computeportal": {
    "url": "https://mcp.computeportal.io/mcp",
    "headers": {
      "Authorization": "Bearer cp_live_4a7f3b9c2e1d8a06"
    }
  }
}

Windsurf

In ~/.windsurf/mcp.json:

json
{
  "servers": {
    "computeportal": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.computeportal.io/mcp"],
      "env": {
        "CP_API_TOKEN": "cp_live_4a7f3b9c2e1d8a06"
      }
    }
  }
}

Direct HTTP

For clients that support Streamable HTTP natively:

URL:     https://mcp.computeportal.io/mcp
Headers: Authorization: Bearer cp_live_4a7f3b9c2e1d8a06
         Content-Type: application/json

MCP initialize handshake:

bash
curl -X POST https://mcp.computeportal.io/mcp \
  -H "Authorization: Bearer cp_live_4a7f3b9c2e1d8a06" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {},
      "clientInfo": { "name": "my-client", "version": "1.0.0" }
    }
  }'

Tools Reference

The CP MCP server exposes 21 tools grouped by domain.

Service Tools

cp_deploy

Deploy a new service from a Docker image or a public GitHub repo. When repo is provided, CP clones and builds the image internally — no registry setup needed. Build operations time out after 10 minutes.

Inputs

ParameterTypeRequiredDescription
imagestringNo*Docker image URI (e.g. myorg/agent:latest)
repostringNo*Public GitHub repo URL — CP builds from the Dockerfile
namestringNoService name (defaults to derived from image or repo)
regionstringNoRegion ID (e.g. eu-west)
gpustringNoGPU type: rtx4090 | rtx5090
gpu_countintegerNoNumber of GPUs (min: 1)
envobjectNoEnvironment variables as key-value pairs
domainsarrayNoCustom hostnames to attach after deploy

* Exactly one of image or repo is required.

Example — deploy from Docker image

"Deploy a new service called ml-inference using the image myorg/model:v2"

json
{
  "tool": "cp_deploy",
  "arguments": {
    "name": "ml-inference",
    "image": "myorg/model:v2"
  }
}

Example — deploy from GitHub repo

"Deploy https://github.com/my-org/my-app as my-app"

json
{
  "tool": "cp_deploy",
  "arguments": {
    "name": "my-app",
    "repo": "https://github.com/my-org/my-app"
  }
}

Returns

json
{
  "service_id": "my-app",
  "name": "my-app",
  "url": "https://my-app.cpctl.app",
  "status": "running"
}

cp_service_list

List all running services. Optionally filter by region.

Inputs

ParameterTypeRequiredDescription
regionstringNoFilter by region ID

Example prompt

"Show me all my running services"


cp_service_status

Get current status, replica count, and health metrics for a service.

Inputs

ParameterTypeRequiredDescription
namestringYesService name

Example prompt

"What's the status of ml-inference?"


cp_service_logs

Fetch the most recent log lines from a running service.

Inputs

ParameterTypeRequiredDescription
namestringYesService name
tailintegerNoNumber of log lines to return (1–5000, default: 100)

Example prompt

"Show me the last 200 lines of logs from ml-inference"

json
{
  "tool": "cp_service_logs",
  "arguments": {
    "name": "ml-inference",
    "tail": 200
  }
}

cp_scale

Scale replica count or update CPU and memory limits for a service.

Inputs

ParameterTypeRequiredDescription
namestringYesService name
countintegerNoNumber of replicas (min: 0)
cpustringNoCPU limit in vCPUs (e.g. '2')
ramstringNoMemory limit (e.g. '4Gi')

At least one of count, cpu, or ram must be provided.

Example prompt

"Scale ml-inference to 3 replicas with 4Gi memory"

json
{
  "tool": "cp_scale",
  "arguments": {
    "name": "ml-inference",
    "count": 3,
    "ram": "4Gi"
  }
}

cp_destroy

Permanently destroy a service and release all associated resources. This action is irreversible.

Inputs

ParameterTypeRequiredDescription
namestringYesService name to destroy

Returns { "destroyed": "ml-inference" }


cp_env_set

Set one or more environment variables on a running service. Triggers a rolling restart to apply changes.

Inputs

ParameterTypeRequiredDescription
servicestringYesService name
varsobjectYesKey-value pairs to set

Example prompt

"Set MODEL_PATH=/models/v2 and BATCH_SIZE=32 on ml-inference"

json
{
  "tool": "cp_env_set",
  "arguments": {
    "service": "ml-inference",
    "vars": {
      "MODEL_PATH": "/models/v2",
      "BATCH_SIZE": "32"
    }
  }
}

Returns { "service": "ml-inference", "set": 2 }


GPU Tools

cp_gpu_list

List available GPU nodes with specs, live utilization, VRAM usage, and temperature.

Inputs

ParameterTypeRequiredDescription
regionstringNoFilter by region
typestringNoFilter by GPU type: rtx4090 | rtx5090

Example prompt

"What RTX 4090 nodes are available in eu-west?"


cp_gpu_reserve

Reserve GPU capacity for a fixed duration. Returns a reservation ID and hourly rate.

Inputs

ParameterTypeRequiredDescription
typestringYesGPU type: rtx4090 | rtx5090
countintegerNoNumber of GPUs (min: 1, default: 1)
durationstringNoReservation duration (e.g. 4h, 24h, 7d, default: 1h)
regionstringNoRegion (defaults to account default)

Example prompt

"Reserve 2 RTX 4090 GPUs in eu-west for 8 hours"

json
{
  "tool": "cp_gpu_reserve",
  "arguments": {
    "type": "rtx4090",
    "count": 2,
    "duration": "8h",
    "region": "eu-west"
  }
}

Returns Reservation object with ID, expiry time, and hourly rate.


cp_gpu_run

Submit a one-shot GPU job. Billed per second. Returns a job ID and initial status immediately.

Inputs

ParameterTypeRequiredDescription
imagestringYesDocker image to run
scriptstringNoCommand or script to execute inside the container
gpustringNoGPU type (default: rtx4090)
gpu_countintegerNoNumber of GPUs (min: 1, default: 1)
regionstringNoRegion ID

Example prompt

"Run a one-shot job with image myorg/trainer:latest on an RTX 4090"


Node Tools

cp_node_list

List all bare-metal nodes with hardware specs (CPU cores, RAM, GPU type/count) and reservation status.

Inputs

ParameterTypeRequiredDescription
regionstringNoFilter by region
gpustringNoFilter by GPU type: rtx4090 | rtx5090

Example prompt

"Show me all available bare-metal RTX 5090 nodes"


Billing Tools

cp_billing_balance

Return current account balance, credit, hourly burn rate, and alert threshold.

Inputs — None

Example prompt

"What's my current balance and burn rate?"

Returns

json
{
  "balance": 142.50,
  "credit": 0,
  "burn_rate_hourly": 3.20,
  "alert_threshold": 20.00
}

cp_billing_usage

Return itemized billing usage for a given period, optionally filtered by service.

Inputs

ParameterTypeRequiredDescription
periodstringNotoday | month | YYYY-MM (default: today)
servicestringNoFilter by service name

Example prompt

"Show me this month's billing breakdown by service"


Region Tools

cp_region_list

List all Compute Portal regions with compliance certifications, GPU availability, and latency.

Inputs — None

Example prompt

"What regions are available and which have RTX 5090s?"


Database Tools

cp_db_create

Provision a managed database. Returns connection credentials.

Inputs

ParameterTypeRequiredDescription
typestringYesDatabase engine: postgres | redis | mysql | mongo
namestringNoDatabase name (defaults to {type}-db)
regionstringNoRegion (defaults to account default)
size_gbintegerNoStorage in GB (min: 1, default: 10)

Example prompt

"Provision a 20GB PostgreSQL database called my-app-db in eu-west"

json
{
  "tool": "cp_db_create",
  "arguments": {
    "type": "postgres",
    "name": "my-app-db",
    "region": "eu-west",
    "size_gb": 20
  }
}

Returns Database host, port, and credentials.


Sandbox Tools

Sandboxes are isolated GPU-attached microVMs for AI agent code execution. They expose SSH access and a command execution API.

cp_sandbox_create

Spin up a GPU-attached sandbox microVM.

Inputs

ParameterTypeRequiredDescription
imagestringYesContainer image
gpustringNoGPU type (default: rtx4090)
gpu_countintegerNoNumber of GPUs (min: 1, default: 1)
regionstringNoRegion ID
timeoutstringNoSandbox lifetime (default: 1h, e.g. 2h, 30m)

Example prompt

"Create a GPU sandbox using image myorg/dev-env:latest with 2 RTX 4090s for 2 hours"

Returns Sandbox ID, SSH connection details, and GPU info.


cp_sandbox_exec

Execute a command inside a running sandbox and return stdout, stderr, exit code, and duration.

Inputs

ParameterTypeRequiredDescription
idstringYesSandbox ID
commandarray of stringsYesCommand and arguments (e.g. ["python", "train.py", "--epochs", "10"])

Example prompt

"Run python train.py --epochs 10 in sandbox sb_abc123"

json
{
  "tool": "cp_sandbox_exec",
  "arguments": {
    "id": "sb_abc123",
    "command": ["python", "train.py", "--epochs", "10"]
  }
}

Returns

json
{
  "stdout": "Epoch 10/10 — loss: 0.042",
  "stderr": "",
  "exit_code": 0,
  "duration_ms": 18420
}

cp_sandbox_destroy

Destroy a sandbox and release its GPU resources. This action is irreversible.

Inputs

ParameterTypeRequiredDescription
idstringYesSandbox ID

Returns { "destroyed": "sb_abc123" }


Domain Tools

cp_domain_add

Attach a custom hostname to a CP service. Validates the DNS CNAME record and provisions TLS automatically. The CNAME must point to cpctl.app.

Inputs

ParameterTypeRequiredDescription
servicestringYesService name (e.g. my-app)
hostnamestringYesCustom hostname (e.g. dashboard.myapp.com)
skip_dnsbooleanNoSkip DNS CNAME validation (default: false)

Example prompt

"Attach api.myapp.com to my ml-inference service — I've already set up the CNAME"

json
{
  "tool": "cp_domain_add",
  "arguments": {
    "service": "ml-inference",
    "hostname": "api.myapp.com"
  }
}

Returns

json
{
  "hostname": "api.myapp.com",
  "status": "active",
  "service": "ml-inference",
  "created_at": "2026-08-29T10:52:36.153Z"
}

cp_domain_list

List all domains attached to a service — both the default {service}.cpctl.app and any custom hostnames.

Inputs

ParameterTypeRequiredDescription
servicestringYesService name

Example prompt

"What domains are attached to ml-inference?"


cp_domain_remove

Remove a custom hostname from a CP service. The default {service}.cpctl.app domain cannot be removed.

Inputs

ParameterTypeRequiredDescription
servicestringYesService name
hostnamestringYesCustom hostname to remove

Returns { "removed": "api.myapp.com", "service": "ml-inference" }


Usage Patterns

The AI assistant maps natural language to tool calls. You do not need to know tool names — just describe what you want.

Service management

"Show me all my running services"
cp_service_list

"Deploy https://github.com/my-org/trainer as a service called model-trainer with 2 RTX 4090s"
cp_deploy with repo + gpu + gpu_count

"Scale ml-inference to 3 replicas with 8Gi RAM"
cp_scale

"Delete the ml-inference service"
cp_destroy

GPU workloads

"What RTX 4090 nodes are available?"
cp_gpu_list

"Reserve 4 RTX 4090s for 24 hours"
cp_gpu_reserve

"Run a one-shot training job with image myorg/trainer:latest"
cp_gpu_run

Sandboxes

"Create a GPU sandbox for 2 hours using image myorg/dev-env:latest"
cp_sandbox_create

"Run nvidia-smi in sandbox sb_abc123"
cp_sandbox_exec

Databases

"Provision a 20GB PostgreSQL database called my-app-db"
cp_db_create

Billing

"What's my current balance and hourly burn rate?"
cp_billing_balance

"Show me this month's usage by service"
cp_billing_usage

Domains

"Attach api.myapp.com to ml-inference — CNAME is already set"
cp_domain_add

Debugging

"Show me the last 200 lines of logs from ml-inference"
cp_service_logs

"My service is crashing — show me its status and recent error logs"
cp_service_status then cp_service_logs


Troubleshooting

"No tools available" in Claude Desktop

  1. Verify claude_desktop_config.json is valid JSON (no trailing commas)
  2. Confirm CP_API_TOKEN starts with cp_live_
  3. Fully quit and relaunch Claude Desktop (Cmd+Q on macOS, not just close the window)
  4. Check npx is in your PATH: which npx

"Unauthorized" errors when calling tools

Your token may be invalid or expired. Generate a new one at https://dashboard.computeportal.io under Settings → API Tokens, then update your MCP config.

DNS validation failure when adding a domain

The cp_domain_add tool validates that the hostname's CNAME resolves to cpctl.app. If validation fails:

  1. Confirm the DNS record is saved and set to DNS only (not proxied through Cloudflare)
  2. Wait for propagation — typically 1–5 minutes for Cloudflare, up to 48 hours for other registrars
  3. Verify: dig CNAME dashboard.myapp.com — the answer should point to cpctl.app
  4. Pass skip_dns: true to attach the domain immediately without DNS validation

Deploy from repo is slow

Repo-based deploys involve cloning, building, and pushing a Docker image. This typically takes 1–5 minutes depending on repo size and Dockerfile complexity. The tool has a 10-minute timeout — if exceeded, check the CP dashboard for build status.

Tool calls time out

Most tool calls complete in under 5 seconds. Operations that involve provisioning (databases, sandboxes, reservations) may take 15–30 seconds. If a call times out in your client, check the CP Dashboard to confirm whether the operation completed.


Security

  • Tokens are scoped to your CP account. Never share your cp_live_xxx token.
  • The MCP server does not store tokens — it passes them to the CP API on each call.
  • All traffic is HTTPS. Plain HTTP is not supported.
  • Revoke tokens at any time from the CP Dashboard.

Quick Reference

ToolDescription
cp_deployDeploy from image or public GitHub repo
cp_service_listList all running services
cp_service_statusStatus, replicas, and health for a service
cp_service_logsFetch recent log lines
cp_scaleScale replicas, CPU, or memory
cp_destroyPermanently destroy a service
cp_env_setSet environment variables on a service
cp_gpu_listList GPU nodes with utilization and specs
cp_gpu_reserveReserve GPU capacity for a fixed duration
cp_gpu_runSubmit a one-shot GPU job
cp_node_listList bare-metal nodes with hardware specs
cp_billing_balanceCurrent balance, credit, and burn rate
cp_billing_usageItemized usage for a period
cp_region_listAvailable regions with GPU availability
cp_db_createProvision a managed database
cp_sandbox_createCreate a GPU-attached microVM sandbox
cp_sandbox_execExecute a command inside a sandbox
cp_sandbox_destroyDestroy a sandbox
cp_domain_addAttach a custom hostname to a service
cp_domain_listList domains on a service
cp_domain_removeRemove a custom hostname

GPU Compute Platform