DocsMCP server

    Getting started

    MCP server

    Let an agent create, inspect, run commands in and kill your team's sandboxes, and read its templates, usage and billing, without the SDK.

    Connecting a client takes three steps: pick a URL, choose how it signs in, and add the server to your client. The rest of the page lists the tools it gets.

    Connect URLs

    The server speaks the Streamable HTTP transport at two URLs.

    URLTools
    https://dashboard.impello.ai/api/mcpRead and write tools
    https://dashboard.impello.ai/api/mcp/readonlyRead tools only

    Use the read-only URL for an agent that should watch sandboxes and spend but never start, change or kill anything.

    Sign in

    A client signs in one of two ways: OAuth, or an Impello API key.

    OAuth

    Clients that support MCP OAuth (Claude Code, Claude Desktop, Cursor and Codex) find it on their own. A request without a credential gets a 401 whose WWW-Authenticate header points at /.well-known/oauth-protected-resource/api/mcp (or /.well-known/oauth-protected-resource/api/mcp/readonly), and that document names the authorization server https://dashboard.impello.ai/api/auth, whose metadata is at /.well-known/oauth-authorization-server. The client registers itself dynamically, so there is no client ID to create.

    1. The client opens a browser and you sign in to the dashboard.
    2. You pick the team the client may act for. A grant is for one team.
    3. A consent screen shows the scopes the client asked for. Allow or deny.
    4. The client receives a token and connects.

    If the dashboard refuses the client, for example because its registration is stale or its redirect address was never registered, the browser shows a Connection refused page instead. For a stale or invalid registration, remove Impello from the client and add it again.

    ScopeGrants
    mcp:readThe read tools
    mcp:writeThe write tools, including kill_sandbox
    offline_accessA refresh token, so the client stays connected after its one-hour access token expires. Refresh tokens last 30 days and are replaced on each use

    Each grant gets its own team API key, kept on the server and never shown to the client. To revoke a grant, open dashboard.impello.ai/keys and disconnect the client under Connected MCP clients. Its tokens stop working at once, and its key is deleted.

    Resetting or changing your password revokes every one of your grants the same way, so reconnect each client afterwards. API keys are not affected.

    API key

    Send an Impello API key from dashboard.impello.ai/keys as a bearer token:

    Authorization: Bearer imp_...

    An API key acts for its team with both scopes. See API keys.

    Configure your client

    # OAuth: the first tool call opens the browser to sign in.
    claude mcp add --transport http impello https://dashboard.impello.ai/api/mcp
    
    # API key
    claude mcp add --transport http impello https://dashboard.impello.ai/api/mcp \
      --header "Authorization: Bearer imp_..."

    For the read-only server, use https://dashboard.impello.ai/api/mcp/readonly in any of these.

    Tools

    Every tool declares its annotations (readOnlyHint, destructiveHint, idempotentHint), so a client can ask before a write and warn before a destructive call.

    Read tools

    All read tools need mcp:read, and all are read-only and idempotent.

    ToolScopeAnnotationsWhat it does
    list_sandboxesmcp:readread-onlyLists sandboxes, filtered by state, template, metadata and startedAfter, sorted by order. Each item carries its latest CPU and memory reading, and the result includes totalRunning
    get_sandboxmcp:readread-onlyOne sandbox, with its latest metrics
    get_sandbox_metricsmcp:readread-onlyA sandbox's metric series, plus the min, average and max of CPU, memory and disk
    get_sandbox_logsmcp:readread-onlyA sandbox's logs, by direction, level and search. limit goes up to 1000
    get_team_usagemcp:readread-onlyConcurrent sandboxes and start rate over time, with the peaks
    list_templatesmcp:readread-onlyThe templates your team can launch
    get_templatemcp:readread-onlyOne template
    get_build_logsmcp:readread-onlyThe logs of a template build
    get_build_statusmcp:readread-onlyA template build's status (waiting, building, ready or error), the reason when it failed, and startedAt and finishedAt
    list_snapshotsmcp:readread-onlyYour team's snapshots
    get_usagemcp:readread-onlyUsage and cost series
    list_top_sandboxesmcp:readread-onlyThe sandboxes that used the most
    get_limitsmcp:readread-onlyYour team's limits
    get_billingmcp:readread-onlyPlan, credits and plan state
    list_invoicesmcp:readread-onlyYour team's invoices

    Write tools

    Write tools need mcp:write, and are only on the full URL.

    ToolScopeAnnotationsWhat it does
    create_sandboxmcp:writewriteStarts a sandbox from template, with optional timeout, autoPause, metadata and env. With autoPause, the sandbox is paused instead of killed when its timeout runs out
    set_sandbox_timeoutmcp:writewrite, idempotentSets how long a sandbox has left, and returns the deadline read back as expiresAt, with capped true when the plan's maximum cut it short. See Timeouts
    pause_sandboxmcp:writewrite, idempotentPauses a sandbox
    resume_sandboxmcp:writewrite, idempotentResumes a paused sandbox
    fork_sandboxmcp:writewriteForks a sandbox into a new one
    snapshot_sandboxmcp:writewriteTakes a snapshot of a sandbox. See Pause, resume and snapshots
    build_templatemcp:writewriteStarts a build of template name from exactly one of fromImage or fromTemplate, with RUN, ENV, WORKDIR and USER steps and optional startCmd, readyCmd, cpuCount, memoryMB and force. A name your team already has gets a new build. Returns templateId and buildId at once, without waiting. See Templates
    run_commandmcp:writewriteRuns cmd, with optional cwd, env and timeoutMs, and returns stdout, stderr and exitCode. Output is capped; truncated says when it was cut
    read_filemcp:writewrite, idempotentReads a text file of up to 1 MiB
    write_filemcp:writewrite, idempotentWrites a text file of up to 1 MiB
    list_filesmcp:writewrite, idempotentLists a directory at path to a given depth, paged
    kill_sandboxmcp:writedestructive, idempotentKills a sandbox. It cannot be undone. An id that is already gone, or that your team does not have, returns success, not NOT_FOUND

    read_file and write_file handle text only, up to 1 MiB. A binary file comes back as a VALIDATION error whose suggestion says what to do instead. So does list_files on a file, or write_file onto a directory.

    Build a template

    build_template returns as soon as the build starts. Poll get_build_status until it is ready, read get_build_logs if it ends in error, then start a sandbox from the name:

    { "name": "build_template", "arguments": {
      "name": "jq-box",
      "fromTemplate": "base",
      "steps": [
        { "type": "USER", "user": "root" },
        { "type": "RUN", "command": "apt-get update && apt-get install -y jq" }
      ]
    } }
    { "name": "get_build_status", "arguments": { "templateId": "...", "buildId": "..." } }
    { "name": "create_sandbox", "arguments": { "template": "jq-box" } }

    A step is { "type": "RUN", "command", "user"? }, { "type": "ENV", "key", "value" }, { "type": "WORKDIR", "path" } or { "type": "USER", "user" }. COPY is not supported here, because it needs a file upload: write the file in a RUN step with a heredoc, or write_file into a sandbox and snapshot_sandbox it.

    Results

    Every tool declares an outputSchema. A result carries structuredContent that matches it, plus a one-line text summary for clients that only show text.

    Pagination

    Every list tool takes cursor and limit, both optional, and returns items and nextCursor. limit is 1 to 100 and defaults to 20; get_sandbox_logs allows up to 1000. nextCursor is null on the last page.

    { "items": [], "nextCursor": "..." }

    A cursor is opaque: pass it back as it came. It is only valid with the same filters it was issued for. Send it with different filters and the call fails with INVALID_CURSOR; call again without a cursor to start from the first page.

    Errors

    A tool error comes back with isError: true and one text block holding a JSON object with code, message and suggestion. It carries no structuredContent, so it never fails a client's outputSchema check. The suggestion is written for the agent to act on.

    {
      "code": "NOT_FOUND",
      "message": "...",
      "suggestion": "Check the id; list the resources first to see which exist."
    }
    CodeMeaning
    INVALID_CURSORThe cursor is not valid for this call, usually because the filters changed. Start again without one
    NOT_FOUNDThe sandbox, template or other resource does not exist for this team
    CONFLICTThe call clashes with the current state, most often a sandbox still pausing or resuming. The suggestion says what to do; for a busy sandbox, wait the seconds it names and retry the same call, without killing or recreating it
    FORBIDDENThe credential lacks the team or scope for this call
    RATE_LIMITEDThe team went over its tool call limit, or the platform rate-limited the call. Wait and retry, unless the suggestion says the team is at its plan's concurrent-sandbox limit: waiting does not free a slot, so stop or pause a sandbox first
    UPSTREAM_ERRORThe platform failed behind the server. Retry shortly
    VALIDATIONThe arguments were rejected. Fix them and call again

    Events

    The server also speaks the MCP Events extension, io.modelcontextprotocol/events, on both URLs: events/list, events/subscribe, events/unsubscribe and events/poll. Events need mcp:read; a credential without it gets -32601, as from a server without the extension.

    EventDeliveryFiltersWhen it fires
    sandbox.exitedwebhook, pollsandboxId, templateId, status (killed or paused)A sandbox stopped running: killed (including by its timeout) or paused. One event per run, so a sandbox paused and resumed twice ends three times. Seen within about two minutes. There is no exit code
    template.build.finishedwebhook, polltemplateId, status (success or failed)A template build ended. Snapshot builds are not included
    credits.lowwebhookthresholdUsd (required)Your spendable credit dropped below thresholdUsd. Once per crossing; it re-arms when the balance is back at or above it. Balances are recomputed hourly, so this can trail spend by up to an hour

    An event carries eventId, name, timestamp and data. data holds ids, the status and a one-line summary; read the rest with get_sandbox, get_build_status or get_billing.

    Webhooks

    events/subscribe takes the event name, its arguments (the filters), and delivery with an https url and a secret of whsec_ plus base64 of 24 to 64 bytes. The URL must use port 443, carry no credentials or fragment, be at most 2048 characters, and resolve only to public addresses.

    • Before it subscribes, the server POSTs {"type":"verification","challenge":"..."} to the URL. Answer with a 2xx whose JSON echoes the challenge. A URL verified in the last 24 hours is not asked again.
    • A subscription lasts ttlMs, 5 minutes to 24 hours, and 24 hours when you omit it. Subscribe again with the same name, arguments and URL to renew it; the previous secret keeps signing for an hour. A team holds at most 100 live subscriptions.
    • Each event is one POST of at most 256 KiB, signed as Standard Webhooks (webhook-id, webhook-timestamp, and webhook-signature: v1,<base64 HMAC-SHA256>). Dedupe on the body's eventId; its cursor is the point to resume from.
    • A delivery times out after 5 seconds, and a redirect counts as a failure. It is retried after 30 seconds, 1, 3 and 8 minutes, then dropped. A 410 or 413 drops it at once.
    • Deliveries are sent once a minute. Deleting the API key, or revoking the OAuth grant, ends its subscriptions.

    Poll

    events/poll works for sandbox.exited and template.build.finished. Send cursor: null first: it returns no events, only a cursor for now. Pass that back to get what happened since, up to maxEvents (1 to 100, default 50). The result includes hasMore, truncated and nextPollMs (30000). Events are kept for 7 days; truncated is true when your cursor is older than that, or maxAgeMs skipped events.

    Limits

    Each team gets 120 tool calls per minute. A call beyond that fails with RATE_LIMITED. events/subscribe, events/unsubscribe and events/poll count against the same 120, and one beyond it fails with JSON-RPC error -32025. Plan limits and credit apply as for any other call; see Limits and pricing.

    Every call is logged with the tool, the team, its duration and its result code.

    Next: Templates.