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.
| Property | Value |
|---|---|
| Protocol | MCP (Model Context Protocol) |
| Transport | Streamable HTTP |
| Endpoint | https://mcp.computeportal.io/mcp |
| SDK | @modelcontextprotocol/sdk 1.29.0 |
| Auth | CP_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
{
"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:
{
"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:
{
"computeportal": {
"url": "https://mcp.computeportal.io/mcp",
"headers": {
"Authorization": "Bearer cp_live_4a7f3b9c2e1d8a06"
}
}
}Windsurf
In your Windsurf MCP settings (usually ~/.windsurf/mcp.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/jsonFor clients that use the MCP initialize handshake, send:
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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name to attach the domain to (e.g. cp-dashboard) |
hostname | string | Yes | The fully-qualified hostname (e.g. dashboard.example.com) |
skip_dns | boolean | No | Skip DNS CNAME validation. Default: false |
Example prompt
"Attach dashboard.example.com to my cp-dashboard service"
Claude will call:
{
"tool": "cp_domain_add",
"arguments": {
"service": "cp-dashboard",
"hostname": "dashboard.example.com"
}
}Returns — the new domain record:
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name (e.g. cp-dashboard) |
Example prompt
"What domains are attached to cp-dashboard?"
Returns
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name (e.g. cp-dashboard) |
hostname | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
environment | string | No | Filter by environment name (e.g. production) |
Example prompt
"Show me all my running services"
Claude will call:
{
"tool": "cp_service_list",
"arguments": {}
}cp_service_get
Get details for a specific service — image, replicas, ports, resource limits, and current status.
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | No* | Docker image to deploy (e.g. myorg/agent:latest). Provide either image or repo. |
repo | string | No* | Public GitHub repo URL (e.g. https://github.com/org/repo). CP builds the image from the Dockerfile internally. Provide either repo or image. |
name | string | No | Service name (default: derived from image or repo name) |
region | string | No | Region ID (e.g. eu-west) |
gpu | string | No | GPU type: rtx4090 | rtx5090 |
gpu_count | integer | No | Number of GPUs |
env | object | No | Environment variables as key-value pairs |
domains | array | No | Custom 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:
{
"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:
{
"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
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name to update |
image | string | No | New container image reference |
replicas | integer | No | New 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name to delete |
Example prompt
"Delete the ml-inference service"
cp_service_scale
Scale a service to a target number of replicas.
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name to scale |
replicas | integer | Yes | Target replica count |
Example prompt
"Scale ml-inference to 3 replicas"
Claude will call:
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name to restart |
Example prompt
"Restart ml-inference"
cp_service_logs
Stream or fetch recent log output from a service.
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name |
tail | integer | No | Number 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:
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name |
vars | object | Yes | Key-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:
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name |
keys | array | Yes | List 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
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | No | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name to attach the volume to |
path | string | Yes | Mount path inside the container (e.g. /data) |
size | string | No | Volume size (e.g. 10Gi). Default: 5Gi |
Example prompt
"Create a 10Gi volume at /data for ml-inference"
Claude will call:
{
"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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name the volume is attached to |
name | string | Yes | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The service name to check |
Example prompt
"Is ml-inference healthy? How many replicas are running?"
Claude will call:
{
"tool": "cp_health_check",
"arguments": {
"service": "ml-inference"
}
}Returns
{
"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_listthencp_gpu_list
"Deploy a new service called ml-inference using the image registry.example.com/model:v2" → calls
cp_deploywithimage
"Deploy https://github.com/my-org/my-app as my-app" → calls
cp_deploywithrepo— 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_checkthencp_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
- Verify your
claude_desktop_config.jsonis valid JSON (no trailing commas, matching brackets) - Confirm the
CP_API_TOKENvalue starts withcp_live_ - Fully quit and relaunch Claude Desktop (Cmd+Q on macOS, not just close the window)
- Check that
npxis in your PATH: runwhich npxin 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:
- Confirm your DNS record is saved and set to DNS only (not proxied)
- Wait for DNS propagation — TTL-dependent, typically 1–5 minutes for Cloudflare, up to 48 hours for some registrars
- Verify with:
dig CNAME dashboard.example.com— the answer should showcpctl.app - As a last resort, pass
skip_dns: trueto 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_xxxtoken. - 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
| Item | Value |
|---|---|
| MCP server URL | https://mcp.computeportal.io/mcp |
| Protocol | MCP over Streamable HTTP |
| SDK | @modelcontextprotocol/sdk 1.29.0 |
| Auth env var | CP_API_TOKEN |
| Token format | cp_live_<hex> |
| Total tools | 21 |
| API base URL | https://api.computeportal.io |
Related
- Quickstart Guide — get a token, make your first API call, attach a custom domain
- CP API Reference — full HTTP API documentation
- CP Dashboard — manage everything visually
- MCP Protocol Specification — official MCP documentation