MCP Server
Point any MCP client — Claude Code, Cursor, your own agent — at Spunto and let it do everything the API does.
Spunto ships an MCP (Model Context Protocol) server at POST /mcp. Through it an AI agent can do everything Spunto's REST API does: create a sandbox and run commands in it, start and follow tasks, manage projects and secrets — no SDK to write, no REST API to teach.
https://spunto.net/mcpTwo ways in: sign in with your Spunto account (OAuth — nothing to copy), or give the client an API key as a Bearer token (you choose its scopes).
Add the server by its URL alone. The client finds Spunto's sign-in on its own (it follows the MCP authorization spec: discovery, dynamic client registration, PKCE), opens a Spunto page asking you to allow it, and keeps itself signed in afterwards.
Add the server
With Claude Code:
claude mcp add --transport http spunto https://spunto.net/mcpthen run /mcp in Claude Code and pick spunto to sign in. In Claude.ai, Cursor, VS Code or any client that supports remote servers, add a server with the URL https://spunto.net/mcp.
Allow it
Your browser opens Spunto's consent page. It names the client (as the client describes itself: Spunto does not verify that name) and lets you choose: Do everything you can (the default), or Read only. Click Allow.
A signed-in client acts as you, in every organization you belong to — or only reads, GET requests alone, if you picked Read only. Like an API key, it cannot manage API keys or members, or rename or delete an organization: those take you, signed in to the dashboard. You can see and disconnect it in Account Settings → Connected apps, which revokes it immediately.
For an agent with no browser (CI, a script), or to choose the scopes yourself.
Create an API key
From Organization settings → API keys, create a key scoped to what the agent should be able to do — projects:read for a look around, workers:write and workers:exec to create sandboxes and run commands in them.
Add the server to your client
With Claude Code:
claude mcp add --transport http spunto https://spunto.net/mcp \
--header "Authorization: Bearer spk_your_key"Or, in any client that reads an mcp.json:
{
"mcpServers": {
"spunto": {
"type": "http",
"url": "https://spunto.net/mcp",
"headers": { "Authorization": "Bearer spk_your_key" }
}
}
}Ask for something
"List my Spunto projects", "which project clones the api repo?" — the agent picks the tools itself.
The whole API, in three tools. Rather than one tool per endpoint, the agent browses the API's own OpenAPI spec and calls what it found — so anything the API can do, the agent can, and a new endpoint is available the day it ships.
| Tool | What it does |
|---|---|
find_api_operations | Without arguments, the API's sections. With query (e.g. sandbox exec) or tag, matching operations: METHOD /path — operationId — summary |
describe_api_operation | Parameters, request body schema and responses of one operation |
call_api | Performs the request (method, path, query, body) and returns the HTTP status and body. An error status is an answer the agent reads — a missing scope, a conflict — not a crash |
Live terminals and log streams (WebSockets) aren't reachable through a request; POST …/sandboxes/{id}/exec runs a command and returns its output.
A few tools shaped for the first questions:
| Tool | What it does |
|---|---|
list_organizations | Organizations the token can act in |
search | One search across the organization's projects — the shortest path from a name to an id |
list_projects, get_project | Projects and their configuration |
orgId is optional everywhere: an API key belongs to exactly one organization, and a signed-in client or a session with a single organization uses it. Signed in to several organizations, the agent passes orgId (it gets the list from list_organizations).
An MCP client can do exactly what its token could already do over REST — its API key, or for a signed-in client, your account limited to reading — and nothing more. Every tool call is re-dispatched through the API's own routes with the caller's token, so the same scope and organization checks apply:
- a key without
projects:writegets a "missing scope" error fromcall_apiwhen it tries to create a project; - a key scoped to one organization cannot read another, even by passing
orgIdexplicitly; - revoking the key, or disconnecting a signed-in client, stops it immediately.
The server is stateless Streamable HTTP: no Mcp-Session-Id, no server-initiated stream. GET /mcp and DELETE /mcp answer 405 with a JSON-RPC error explaining that — clients should just POST. Responses are plain JSON (Content-Type: application/json), so send Accept: application/json, text/event-stream and handle either.
The authorization metadata is at /.well-known/oauth-protected-resource/mcp (also named by the 401's WWW-Authenticate: Bearer resource_metadata=…) and /.well-known/oauth-authorization-server. Clients register with POST /api/oauth/register and are public (token_endpoint_auth_method: none, PKCE S256 required); access tokens last one hour, refresh tokens 30 days and rotate on every use. A loopback redirect (http://127.0.0.1:{port}/…) matches any port.