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/mcp

Two 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.

1

Add the server

With Claude Code:

claude mcp add --transport http spunto https://spunto.net/mcp

then 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.

2

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.

1

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.

2

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" }
    }
  }
}
3

Ask for something

"List my Spunto projects", "which project clones the api repo?" — the agent picks the tools itself.

Note

The endpoint is also shown, with a copy button, in the MCP server card of Organization settings → API keys.

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.

ToolWhat it does
find_api_operationsWithout arguments, the API's sections. With query (e.g. sandbox exec) or tag, matching operations: METHOD /path — operationId — summary
describe_api_operationParameters, request body schema and responses of one operation
call_apiPerforms 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:

ToolWhat it does
list_organizationsOrganizations the token can act in
searchOne search across the organization's projects — the shortest path from a name to an id
list_projects, get_projectProjects 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:write gets a "missing scope" error from call_api when it tries to create a project;
  • a key scoped to one organization cannot read another, even by passing orgId explicitly;
  • revoking the key, or disconnecting a signed-in client, stops it immediately.

Tip

Scope the key to the narrowest set the agent actually needs. It's the only thing standing between an autonomous agent and the rest of your organization.

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.