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.
| Property | Value |
|---|---|
| Protocol | MCP (Model Context Protocol) |
| Transport | Streamable HTTP |
| Endpoint | https://mcp.computeportal.io/mcp |
| SDK | @modelcontextprotocol/sdk |
| Auth | CP_API_TOKEN environment variable |
| Total tools | 21 |
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/jsonMCP 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
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | No* | Docker image URI (e.g. myorg/agent:latest) |
repo | string | No* | Public GitHub repo URL — CP builds from the Dockerfile |
name | string | No | Service name (defaults to derived from image or repo) |
region | string | No | Region ID (e.g. eu-west) |
gpu | string | No | GPU type: rtx4090 | rtx5090 |
gpu_count | integer | No | Number of GPUs (min: 1) |
env | object | No | Environment variables as key-value pairs |
domains | array | No | Custom 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
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | No | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Service name |
Example prompt
"What's the status of ml-inference?"
cp_service_logs
Fetch the most recent log lines from a running service.
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Service name |
tail | integer | No | Number 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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Service name |
count | integer | No | Number of replicas (min: 0) |
cpu | string | No | CPU limit in vCPUs (e.g. '2') |
ram | string | No | Memory 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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Service 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | Service name |
vars | object | Yes | Key-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
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | No | Filter by region |
type | string | No | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | GPU type: rtx4090 | rtx5090 |
count | integer | No | Number of GPUs (min: 1, default: 1) |
duration | string | No | Reservation duration (e.g. 4h, 24h, 7d, default: 1h) |
region | string | No | Region (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
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Docker image to run |
script | string | No | Command or script to execute inside the container |
gpu | string | No | GPU type (default: rtx4090) |
gpu_count | integer | No | Number of GPUs (min: 1, default: 1) |
region | string | No | Region 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
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | No | Filter by region |
gpu | string | No | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | today | month | YYYY-MM (default: today) |
service | string | No | Filter 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
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Database engine: postgres | redis | mysql | mongo |
name | string | No | Database name (defaults to {type}-db) |
region | string | No | Region (defaults to account default) |
size_gb | integer | No | Storage 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
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Container image |
gpu | string | No | GPU type (default: rtx4090) |
gpu_count | integer | No | Number of GPUs (min: 1, default: 1) |
region | string | No | Region ID |
timeout | string | No | Sandbox 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Sandbox ID |
command | array of strings | Yes | Command and arguments (e.g. ["python", "train.py", "--epochs", "10"]) |
Example prompt
"Run
python train.py --epochs 10in 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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Sandbox 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | Service name (e.g. my-app) |
hostname | string | Yes | Custom hostname (e.g. dashboard.myapp.com) |
skip_dns | boolean | No | Skip 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | Service 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
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | Service name |
hostname | string | Yes | Custom 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_deploywithrepo+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-smiin 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_statusthencp_service_logs
Troubleshooting
"No tools available" in Claude Desktop
- Verify
claude_desktop_config.jsonis valid JSON (no trailing commas) - Confirm
CP_API_TOKENstarts withcp_live_ - Fully quit and relaunch Claude Desktop (Cmd+Q on macOS, not just close the window)
- Check
npxis 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:
- Confirm the DNS record is saved and set to DNS only (not proxied through Cloudflare)
- Wait for propagation — typically 1–5 minutes for Cloudflare, up to 48 hours for other registrars
- Verify:
dig CNAME dashboard.myapp.com— the answer should point tocpctl.app - Pass
skip_dns: trueto 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_xxxtoken. - 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
| Tool | Description |
|---|---|
cp_deploy | Deploy from image or public GitHub repo |
cp_service_list | List all running services |
cp_service_status | Status, replicas, and health for a service |
cp_service_logs | Fetch recent log lines |
cp_scale | Scale replicas, CPU, or memory |
cp_destroy | Permanently destroy a service |
cp_env_set | Set environment variables on a service |
cp_gpu_list | List GPU nodes with utilization and specs |
cp_gpu_reserve | Reserve GPU capacity for a fixed duration |
cp_gpu_run | Submit a one-shot GPU job |
cp_node_list | List bare-metal nodes with hardware specs |
cp_billing_balance | Current balance, credit, and burn rate |
cp_billing_usage | Itemized usage for a period |
cp_region_list | Available regions with GPU availability |
cp_db_create | Provision a managed database |
cp_sandbox_create | Create a GPU-attached microVM sandbox |
cp_sandbox_exec | Execute a command inside a sandbox |
cp_sandbox_destroy | Destroy a sandbox |
cp_domain_add | Attach a custom hostname to a service |
cp_domain_list | List domains on a service |
cp_domain_remove | Remove a custom hostname |
Related
- Quickstart Guide — get a token and make your first API call
- cpctl CLI — terminal-based equivalent of these tools
- CP API Reference — full HTTP API documentation
- MCP Protocol Specification — official MCP docs
