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.
| Setting | Value |
|---|---|
| Endpoint | https://nanpod.com/mcp |
| Transport | Streamable HTTP |
| Authentication | Authorization: Bearer <API token> |
1. Create an API token
- Open Account settings → API tokens and select Create token.
- Name it after where you will use it, such as "Cursor on my laptop".
- 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.
- Choose when it expires: in 30, 90 or 365 days, or never.
- Copy the token. It starts with
npd_and is shown only once.
2. Connect your assistant
Claude Code
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):
{
"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.
{
"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:
{
"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.
| Tool | Access | Arguments | What it does |
|---|---|---|---|
list_projects | Read | — | List the projects in your workspace. |
list_services | Read | project_id, environment_id (optional) | List a project's services and databases, in production unless you give an environment. |
get_service | Read | service_id | Get a service's configuration, status and lifecycle state. |
list_deployments | Read | service_id | List a service's deployments, newest first. |
get_deployment | Read | deployment_id | Get a deployment's status, stage, error code and snapshot. |
get_logs | Read | service_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_metrics | Read | service_id, deployment_id, range | Read a deployment's CPU, memory and instance metrics over the last 1h or 24h. |
get_usage | Read | month (optional) | Summarize the workspace's metered usage for a month (YYYY-MM), the current month by default. |
deploy_service | Deploy | service_id, idempotency_key (optional) | Deploy the service's latest saved configuration, like the Deploy button. |
redeploy | Deploy | deployment_id, idempotency_key (optional) | Run the active deployment's image and configuration again as a new deployment, without rebuilding. |
rollback | Deploy | deployment_id, idempotency_key (optional) | Return to a previously active deployment's image and configuration, as a new deployment. Saved settings stay unchanged. |
start_service | Deploy | service_id, generation (optional), idempotency_key (optional) | Start a stopped service from its last successful deployment. |
stop_service | Deploy | service_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_FLIGHTorSERVICE_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.