Skip to content

CP MCP Server

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

The ComputePortal 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, attach domains, and inspect logs through natural language — without leaving your AI assistant.


Protocol

The CP MCP server implements the Model Context Protocol (MCP) using the Streamable HTTP transport. It is built on the @modelcontextprotocol/sdk at version 1.29.0.

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

Authentication

The MCP server authenticates using your CP API token, set as an environment variable in your client configuration:

CP_API_TOKEN=cp_live_<hex-string>

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


Integrations

Claude Desktop

Add the following to your Claude Desktop configuration file.

macOS: ~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: %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"
      }
    }
  }
}

After saving the file, restart Claude Desktop. You will see a hammer icon in the chat input area indicating MCP tools are available.

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


Cursor

Open Cursor Settings → MCP and add a new server entry:

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

Or, if your Cursor version supports HTTP MCP servers natively, configure it directly:

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

Windsurf

In your Windsurf MCP settings (usually ~/.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 (Advanced)

If your client supports Streamable HTTP transport natively, you can connect directly without mcp-remote:

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

For clients that use the MCP initialize handshake, send:

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 across domains, services, environment, logs, and scaling.

Domain Tools

cp_domain_add

Attach a custom hostname to a CP service. Validates the DNS CNAME record and provisions nginx + Let's Encrypt certificate automatically.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to attach the domain to (e.g. cp-dashboard)
hostnamestringYesThe fully-qualified hostname (e.g. dashboard.example.com)
skip_dnsbooleanNoSkip DNS CNAME validation. Default: false

Example prompt

"Attach dashboard.example.com to my cp-dashboard service"

Claude will call:

json
{
  "tool": "cp_domain_add",
  "arguments": {
    "service": "cp-dashboard",
    "hostname": "dashboard.example.com"
  }
}

Returns — the new domain record:

json
{
  "hostname": "dashboard.example.com",
  "status": "active",
  "service": "cp-dashboard",
  "created_at": "2026-07-04T10:52:36.153Z"
}

cp_domain_list

List all hostnames attached to a CP service, including the default <service>.cpctl.app domain.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name (e.g. cp-dashboard)

Example prompt

"What domains are attached to cp-dashboard?"

Returns

json
{
  "domains": [
    { "hostname": "cp-dashboard.computeportal.io", "status": "active", "created_at": null },
    { "hostname": "dashboard.example.com", "status": "active", "created_at": "2026-07-04T10:52:36.153Z" }
  ]
}

cp_domain_remove

Remove a custom hostname from a CP service. Deletes the nginx virtual host and TLS certificate. The default <service>.cpctl.app domain cannot be removed.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name (e.g. cp-dashboard)
hostnamestringYesThe hostname to remove (e.g. dashboard.example.com)

Example prompt

"Remove dashboard.example.com from cp-dashboard"

Returns — confirmation that the domain was removed.


Service Tools

cp_service_list

List all services deployed in your CP environment, including their status, image, and replica count.

Inputs

ParameterTypeRequiredDescription
environmentstringNoFilter by environment name (e.g. production)

Example prompt

"Show me all my running services"

Claude will call:

json
{
  "tool": "cp_service_list",
  "arguments": {}
}

cp_service_get

Get details for a specific service — image, replicas, ports, resource limits, and current status.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name (e.g. ml-inference)

Example prompt

"Show me the details for ml-inference"


cp_deploy

Deploy a new service from a Docker image or a public GitHub repo. When a repo URL is provided, CP clones it and builds the Docker image internally from the repo's Dockerfile — no registry setup required.

Inputs

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

* One of image or repo is required.

Example — deploy from a Docker image

"Deploy a new service called ml-inference using the image registry.example.com/model:v2"

Claude will call:

json
{
  "tool": "cp_deploy",
  "arguments": {
    "name": "ml-inference",
    "image": "registry.example.com/model:v2"
  }
}

Example — deploy from a GitHub repo

"Deploy https://github.com/my-org/my-app as a new service called my-app"

Claude will call:

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

CP clones the repo, builds the image from the Dockerfile, pushes it to an internal registry, and starts the service. The build typically takes 1–3 minutes. Only public repositories are supported — for private repo access, contact Compute Portal.

Returns

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

cp_service_update

Update a service's image, resource limits, or configuration. Triggers a rolling update.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to update
imagestringNoNew container image reference
replicasintegerNoNew replica count

Example prompt

"Update ml-inference to use image registry.example.com/model:v3"


cp_service_delete

Remove a service and all associated resources from the CP platform.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to delete

Example prompt

"Delete the ml-inference service"


cp_service_scale

Scale a service to a target number of replicas.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to scale
replicasintegerYesTarget replica count

Example prompt

"Scale ml-inference to 3 replicas"

Claude will call:

json
{
  "tool": "cp_service_scale",
  "arguments": {
    "service": "ml-inference",
    "replicas": 3
  }
}

cp_service_restart

Force a rolling restart of all service replicas without changing the image or configuration.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to restart

Example prompt

"Restart ml-inference"


cp_service_logs

Stream or fetch recent log output from a service.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name
tailintegerNoNumber of most recent log lines to return. Default: 100

Example prompt

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

Claude will call:

json
{
  "tool": "cp_service_logs",
  "arguments": {
    "service": "ml-inference",
    "tail": 100
  }
}

cp_service_inspect

Return the raw Docker Swarm service spec for a service — useful for debugging configuration.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to inspect

Example prompt

"Show me the raw spec for ml-inference"


cp_env_list

List all environment variables set on a service.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name

Example prompt

"What environment variables are set on cp-dashboard?"


cp_env_set

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

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name
varsobjectYesKey-value map of variables to set (e.g. {"MODEL_PATH": "/models/v2"})

Example prompt

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

Claude will call:

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

cp_env_unset

Remove one or more environment variables from a service. Triggers a rolling restart.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name
keysarrayYesList of variable names to remove (e.g. ["DEBUG", "OLD_KEY"])

Example prompt

"Remove the DEBUG variable from ml-inference"


cp_gpu_list

List available GPU resources on the CP DGX Spark platform, including availability and specs.

Inputs

ParameterTypeRequiredDescription
regionstringNoFilter by region (e.g. us-east-1)

Example prompt

"What GPU resources are available?"


cp_gpu_status

Show current GPU utilization and allocation per service.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to check GPU status for

Example prompt

"Show me GPU usage for ml-inference"


cp_volume_list

List persistent volumes attached to a service.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name

Example prompt

"What volumes are attached to ml-inference?"


cp_volume_create

Create a new persistent volume and attach it to a service.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to attach the volume to
pathstringYesMount path inside the container (e.g. /data)
sizestringNoVolume size (e.g. 10Gi). Default: 5Gi

Example prompt

"Create a 10Gi volume at /data for ml-inference"

Claude will call:

json
{
  "tool": "cp_volume_create",
  "arguments": {
    "service": "ml-inference",
    "path": "/data",
    "size": "10Gi"
  }
}

cp_volume_delete

Remove a persistent volume from a service. This action is irreversible and deletes all data in the volume.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name the volume is attached to
namestringYesThe volume name to delete

Example prompt

"Delete the ml-data volume from ml-inference"


cp_health_check

Check the health status of a service and its replicas — useful for diagnosing crash loops or degraded deployments.

Inputs

ParameterTypeRequiredDescription
servicestringYesThe service name to check

Example prompt

"Is ml-inference healthy? How many replicas are running?"

Claude will call:

json
{
  "tool": "cp_health_check",
  "arguments": {
    "service": "ml-inference"
  }
}

Returns

json
{
  "service": "ml-inference",
  "status": "healthy",
  "replicas": { "running": 3, "desired": 3 },
  "last_updated": "2026-07-08T09:12:00.000Z"
}

Usage Patterns

Natural Language Examples

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

Service management

"Show me all my running services and their GPU usage" → calls cp_service_list then cp_gpu_list

"Deploy a new service called ml-inference using the image registry.example.com/model:v2" → calls cp_deploy with image

"Deploy https://github.com/my-org/my-app as my-app" → calls cp_deploy with repo — CP builds the image from the Dockerfile automatically

"Scale ml-inference to 3 replicas" → calls cp_scale

Domains

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

"Show me all the domains on cp-dashboard" → calls cp_domain_list

Debugging

"Show me the last 100 lines of logs from ml-inference" → calls cp_service_logs

"My service is crashing — check its health and show me recent errors" → calls cp_health_check then cp_service_logs

Environment variables

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

"What environment variables are set on cp-dashboard?" → calls cp_env_list


Troubleshooting

"No tools available" in Claude Desktop

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

"Unauthorized" errors when calling tools

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

DNS validation failure when adding a domain

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

  1. Confirm your DNS record is saved and set to DNS only (not proxied)
  2. Wait for DNS propagation — TTL-dependent, typically 1–5 minutes for Cloudflare, up to 48 hours for some registrars
  3. Verify with: dig CNAME dashboard.example.com — the answer should show cpctl.app
  4. As a last resort, pass skip_dns: true to the tool and attach the domain immediately

Tool calls time out

The MCP server performs real infrastructure operations (certbot, nginx reload, Docker Swarm updates). Some operations take 10–30 seconds. This is normal. If a call times out in your client, check the CP Dashboard to see if 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 directly to the CP API on each tool call.
  • All traffic is over HTTPS. The MCP endpoint does not support plain HTTP.
  • Revoke tokens at any time from the CP Dashboard.

Reference

ItemValue
MCP server URLhttps://mcp.computeportal.io/mcp
ProtocolMCP over Streamable HTTP
SDK@modelcontextprotocol/sdk 1.29.0
Auth env varCP_API_TOKEN
Token formatcp_live_<hex>
Total tools21
API base URLhttps://api.computeportal.io

GPU Compute Platform