MCP and API tokens

Connect Claude, Cursor, VS Code and other AI assistants to your workspace with the Nanpod MCP server.

Nanpod has a remote Model Context Protocol (MCP) server. An assistant connected to it can list your projects and services, read deployments, logs, metrics and usage, and, if you allow it, deploy, roll back, start and stop services.

SettingValue
Endpointhttps://nanpod.com/mcp
TransportStreamable HTTP
AuthenticationAuthorization: Bearer <API token>

1. Create an API token

  1. Open Account settings → API tokens and select Create token.
  2. Name it after where you will use it, such as "Cursor on my laptop".
  3. Choose the access: Read only lets the assistant look but not change anything. Read and deploy also lets it deploy, redeploy, roll back, start and stop services.
  4. Choose when it expires: in 30, 90 or 365 days, or never.
  5. Copy the token. It starts with npd_ and is shown only once.

2. Connect your assistant

Claude Code

Terminal
claude mcp add --transport http nanpod https://nanpod.com/mcp \
  --header "Authorization: Bearer npd_your_token"

Cursor

Add the server to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

mcp.json
{
  "mcpServers": {
    "nanpod": {
      "url": "https://nanpod.com/mcp",
      "headers": {
        "Authorization": "Bearer npd_your_token"
      }
    }
  }
}

VS Code (GitHub Copilot)

Add this to .vscode/mcp.json, or to your user configuration with MCP: Open User Configuration. VS Code asks for the token once and stores it securely, so it never sits in the file.

mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "nanpod-token",
      "description": "Nanpod API token",
      "password": true
    }
  ],
  "servers": {
    "nanpod": {
      "type": "http",
      "url": "https://nanpod.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:nanpod-token}"
      }
    }
  }
}

Claude Desktop

Claude Desktop connects to servers that use a token through the mcp-remote bridge, which needs Node.js. Add this to claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude:

claude_desktop_config.json
{
  "mcpServers": {
    "nanpod": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://nanpod.com/mcp",
        "--header",
        "Authorization:${NANPOD_AUTH}"
      ],
      "env": {
        "NANPOD_AUTH": "Bearer npd_your_token"
      }
    }
  }
}

Other clients

Any client that supports Streamable HTTP and custom headers works: use the endpoint above and send the token in the Authorization header.

Tools

Read-only tokens see only the read tools. Every tool acts on your workspace only.

ToolAccessArgumentsWhat it does
list_projectsRead—List the projects in your workspace.
list_servicesReadproject_id, environment_id (optional)List a project's services and databases, in production unless you give an environment.
get_serviceReadservice_idGet a service's configuration, status and lifecycle state.
list_deploymentsReadservice_idList a service's deployments, newest first.
get_deploymentReaddeployment_idGet a deployment's status, stage, error code and snapshot.
get_logsReadservice_id, kind, deployment_id (optional), stream (optional), search (optional), since_minutes (optional), limit (optional)Read build or runtime logs from the last 60 minutes by default, up to 7 days, at most 200 lines.
get_metricsReadservice_id, deployment_id, rangeRead a deployment's CPU, memory and instance metrics over the last 1h or 24h.
get_usageReadmonth (optional)Summarize the workspace's metered usage for a month (YYYY-MM), the current month by default.
deploy_serviceDeployservice_id, idempotency_key (optional)Deploy the service's latest saved configuration, like the Deploy button.
redeployDeploydeployment_id, idempotency_key (optional)Run the active deployment's image and configuration again as a new deployment, without rebuilding.
rollbackDeploydeployment_id, idempotency_key (optional)Return to a previously active deployment's image and configuration, as a new deployment. Saved settings stay unchanged.
start_serviceDeployservice_id, generation (optional), idempotency_key (optional)Start a stopped service from its last successful deployment.
stop_serviceDeployservice_id, generation (optional), idempotency_key (optional)Stop a service. Its instances are removed and its URL stops answering until you start it again.

Things to ask

  • "Which of my services failed their last deployment, and why?"
  • "Show the runtime errors of the api service from the last hour."
  • "Deploy the latest saved configuration of the web service and tell me when it is active."
  • "Roll the api service back to the previous version."
  • "How much compute did my workspace use this month?"

Limits and errors

  • Each token can make 60 requests in a burst, refilled at 2 per second. Above that, the server answers 429; retry after a moment.
  • A missing, expired or revoked token gets 401. Create a new token and update your client.
  • A tool that fails returns an error with the same code as the dashboard, such as INSUFFICIENT_BALANCE, SPEND_LIMIT_REACHED, DEPLOYMENT_IN_FLIGHT or SERVICE_NOT_FOUND.
  • Logs are read up to 7 days back and at most 200 lines per call.

Tokens work only on the MCP endpoint. Nanpod doesn't offer a public REST API or a CLI yet.