Official MCP connector

Deploy from Cursor

One config block and Cursor's agent can deploy your repo, read build logs, set env vars and add a database on SnapDeploy — and reply with the live URL. Works in Windsurf the same way.

Setup

  1. Sign in and create a deploy-scoped token on API Keys (the page generates the block below with your token already in it).
  2. Add it to ~/.cursor/mcp.json — or Cursor Settings → MCP → Add server. Windsurf: ~/.codeium/windsurf/mcp_config.json.
  3. Reload the editor. The snapdeploy tools appear in the agent's tool list.
{
  "mcpServers": {
    "snapdeploy": {
      "command": "npx",
      "args": ["-y", "@snapdeploy/mcp"],
      "env": { "SNAPDEPLOY_API_KEY": "sd_pat_your_token" }
    }
  }
}

Your repo needs to be on GitHub and connected to SnapDeploy once; the connector returns the connect link if it isn't.

Then, in agent mode

"Deploy this project to SnapDeploy"
"The build failed — show me why and fix it"
"Which env vars does this app need? Set DATABASE_URL"
"Add a Redis cache" · "Attach app.example.com"

On a failed build the reply includes the error code, a readable message and the last lines of the build log — enough for the agent to fix the code and deploy again. Each attempt counts toward the free deploy limit, and the reply says how many are left.

Safe to hand to an agent

  • No deletes, ever. No delete tools, and the server refuses deletes, cancellations and password changes for every token — verified against a live agent that tried the raw API.
  • Secrets stay out of the context window. Env-var names only; database credentials masked.
  • Scoped tokens with expiry and one-click revoke — give Cursor its own.
  • Plan limits are relayed, not retried. When the free tier's 10 deploys a day (5 per rolling 12 h) or 100 monthly hours run out, the agent shows you SnapDeploy's upgrade link ($1 Sprint Pack, Always-On from $12/month per container) and stops.

What the agent actually does

  1. Reads the tool list. When Cursor starts, it launches the connector (npx -y @snapdeploy/mcp) as a local process and asks it which tools it offers. The SnapDeploy tools appear in agent mode alongside Cursor's own.
  2. Scans before it deploys. A good deploy starts with detect_env_vars: it finds the variables the code reads, flags the required and secret ones and tells the agent where each value lives. The agent asks you for what it cannot know.
  3. One call creates, links and builds. deploy creates the container, links the GitHub repository and starts the first build. If linking fails the container is removed again — no half-finished state to clean up later.
  4. Builds run on SnapDeploy, not in your editor. AWS CodeBuild with framework detection (Node, Python, Go, Java, PHP, Ruby, static; Dockerfile honoured), then an isolated AWS Fargate task with free SSL. Two to six minutes typically, sixty at most.
  5. The agent gets the result back in the chat. The live URL, or the error code, a readable message and the build-log tail — which is exactly what the agent needs to fix the code and try again.

Where the config goes — Cursor, Windsurf, VS Code and friends

ClientFileNotes
Cursor (global)~/.cursor/mcp.jsonRecommended: the token is yours, not the project's
Cursor (per project).cursor/mcp.json in the repoFine for the server definition, but never commit a token — each developer mints their own on API Keys
Windsurf~/.codeium/windsurf/mcp_config.jsonSame mcpServers block
VS Code agent mode.vscode/mcp.jsonVS Code names the top-level key servers and takes "type": "stdio"; command, args and env are identical
Claude Desktop, Cline, Zed, Codex, Gemini CLItheir MCP settingsSame command, args and env; see Claude Code and Codex / Gemini CLI

The connector needs Node.js 18 or newer on the machine that runs the editor; npx -y fetches and caches the package the first time.

The 15 tools, and the scope each one needs

Scopes nest: readdeploymanage. A token can only reach the rows at or below its scope; the server checks this before any controller runs, and answers 403 INSUFFICIENT_SCOPE with the scope it wanted.

ScopeToolsWhat they do
readlist_apps get_status get_logs get_deployments check_quota list_repos detect_env_varsInventory, status, runtime logs, deployment history with error and build-log tail, remaining deploys and hours, connected GitHub repos, the env vars a repo needs (names, sources and where to find each value)
deploydeploy set_env start_container stop_container wake_containerCreate + link + build in one call (or rebuild an existing app at a chosen size), replace environment variables, start, stop and wake
managecreate_database add_domain assign_always_onManaged Postgres, MySQL, MariaDB, MongoDB, Redis or RabbitMQ add-ons; custom domains; attach a spare Always-On subscription
— none —delete, cancel, change password, apply SmartFix commitsNot tools, and refused by the server for every token (403 INTERACTIVE_SESSION_REQUIRED). These need a signed-in person.

Tokens: scoped, expiring, revocable

  • Made on the API Keys page, prefixed sd_pat_, shown exactly once — copy it into the assistant's config and it is gone from the UI. Only a hash is stored.
  • Pick a scope and an expiry (30, 90 or 365 days, or never). Up to 20 active tokens per account, so give each assistant and each machine its own.
  • Revoke in one click. A revoked or expired token gets 401 on every path from that moment — no grace period.
  • Its own rate limit. Each token has a separate request bucket (150 requests a minute), so a looping agent throttles itself rather than your dashboard or other tokens.
  • What a token can never do, whatever its scope: delete a container, database, domain or account; change the password; cancel a subscription; apply a SmartFix commit. Deleting needs a person signed in to the dashboard or the mobile app.
  • What a token never sees: environment-variable values come back as (set), database credentials as (redacted). The masking happens on the server, not in the connector, so a raw API call gets the same answer.
  • Legacy sk_ API keys still work but are unscoped — prefer a token for anything an assistant holds.
  • Treat the config file like an SSH key. If a laptop goes missing, revoke the token; nothing else needs to change.

The three ways this goes wrong, and what stops each

A README tells the agent to "clean up"

Prompt injection is real: a file in a cloned repo can carry instructions the model may follow. The connector has no delete tool, and if the agent escalates to a raw API call with the same token the server refuses it. We tested exactly that with a live agent — it got a 403.

The token leaks from a dotfile

A leaked token can deploy and read logs, nothing more: no deletes, no secrets (values are masked server-side), no account changes. It expires on the date you chose, it is throttled per token, and you revoke it in one click on the API Keys page.

The agent loops on a failing build

Every attempt costs one deploy unit and the reply says how many remain, so the model is told to diagnose before retrying. Identical requests inside ten minutes return the original build instead of a new one. Plan limits come back as 402/429 with your upgrade link and an instruction not to retry.

Troubleshooting

You seeIt meansDo this
401 UnauthorizedThe token was revoked, has expired, or the env var name in your config is wrongMint a new token on API Keys; the variable is SNAPDEPLOY_API_KEY
403 INSUFFICIENT_SCOPEThe token's scope is below what the tool needs; the response names requiredScopeCreate a token with that scope (databases and domains need manage)
GitHub not connectedSnapDeploy has no GitHub authorization for your account yetOpen the link the connector returns (or Dashboard → Deploy → Connect GitHub) once; then ask again
MISSING_ENTRY_POINTA Node repo has no index.js/server.js/app.js at the root and no main/start scriptAdd one, set a root directory, or add a Dockerfile — then deploy again
Missing required environment variablesThe repo declares variables that are not set on the containerAsk for detect_env_vars, set them with set_env, deploy again
402 SIZE_REQUIRES_ALWAYS_ONMedium (2 GB) and Large (4 GB) containers need an Always-On subscriptionDeploy small, or buy Always-On from the link in the reply ($25 / $45 per month)
402 websocketApps that hold WebSocket connections need Always-On (sleeping containers would drop them)Add Always-On from the link, or deploy a non-WebSocket app on the free tier
429 DEPLOY_CAP_REACHEDThe free tier's 10 deploys a day (5 per rolling 12 hours) are used up — failed attempts countWait for the window, or a $1 Sprint Pack lifts the cap for 24 hours
Tools missing in the agentmcp.json not reloaded, invalid JSON, or Node.js missingReload the window; open the MCP settings panel — the server should be green with its tools listed

What it costs

Free
Up to 4 containers · 10 deploys/day (5 per rolling 12 h) · 100 hours/month · sleeps after ~15 min idle, wakes on the next request in about a minute · no credit card
Always-On
Per container, never sleeps, no hour cap, no deploy limit: Small 512 MB $12/month · Medium 2 GB $25 · Large 4 GB $45
$1 Sprint Pack
24 hours of Always-On for one container plus unlimited deploys — for a demo, a launch, a long debugging session

The connector itself is free and open. Managed databases and custom domains are available on every tier. India pays in INR (UPI, cards, net banking); everywhere else via PayPal. Full pricing.

Further reading

Frequently asked questions

How do I deploy from Cursor to SnapDeploy?

Create a scoped token on the SnapDeploy API Keys page, add the snapdeploy server to ~/.cursor/mcp.json (command npx, args -y @snapdeploy/mcp, env SNAPDEPLOY_API_KEY), reload Cursor, then ask the agent to deploy your GitHub repository. It replies with the live URL.

Does it work in Windsurf too?

Yes. Windsurf reads the same mcpServers JSON from ~/.codeium/windsurf/mcp_config.json. Any MCP-capable client works with the same command, arguments and environment variable.

Can the Cursor agent delete my containers?

No. There are no delete tools and the SnapDeploy server refuses deletes, cancellations and password changes for every token. Deleting requires a signed-in person in the dashboard or the mobile app.

Should I commit .cursor/mcp.json to the repository?

You can commit the server definition, but never a token. Keep tokens in your global ~/.cursor/mcp.json, and have each developer create their own on the API Keys page so it can be revoked individually.

Does the agent see my secrets?

No. Environment-variable values come back as "(set)" and database credentials are masked, on the server side. The agent can set a value you paste but can never read one back.

Is it free?

Yes. The free tier gives you up to 4 containers, 10 deploys a day (5 per rolling 12 hours) and 100 hours a month, no credit card. When a limit is reached the agent shows SnapDeploy's upgrade link — a $1 Sprint Pack or Always-On from $12 per container per month — and stops.

What does the agent do when a build fails?

It receives the error code, a readable message and the last lines of the build log, fixes the code and deploys again. Each attempt counts toward the free deploy limit; identical requests inside ten minutes are deduplicated so a retry never starts a second build.

The SnapDeploy tools do not show up in Cursor. Why?

Usually the editor was not reloaded after editing mcp.json, the JSON has a syntax error, or Node.js is not installed. Reload the window and check Cursor's MCP settings panel — the snapdeploy server should show as connected with its tools listed.

Other assistants

Claude Code · Codex CLI and Gemini CLI · Claude Desktop, Cline, Zed and VS Code agent mode use the same JSON block. Building in Lovable? Your export deploys first-try without a connector.

From "looks good" to live URL, inside Cursor

Free tier · no credit card · India (UPI/cards) and international payments

Create your account