MCP (Model Context Protocol) endpoint and file server for Computer Use sandbox containers.
URL: POST http://localhost:8081/mcp
Auth: Authorization: Bearer <MCP_API_KEY> (the value of the MCP_API_KEY env var on the server).
curl -sD - -X POST "http://localhost:8081/mcp" \
-H "Authorization: Bearer <MCP_API_KEY>" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Chat-Id: my-session" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
# Response contains header: mcp-session-id: <SESSION_ID>
curl -s -X POST "http://localhost:8081/mcp" \
-H "Authorization: Bearer <MCP_API_KEY>" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Mcp-Session-Id: <SESSION_ID>" \
-H "X-Chat-Id: my-session" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"bash_tool","arguments":{"command":"echo Hello","description":"test"}}}'
| Header | Description |
|---|---|
Authorization | Bearer <MCP_API_KEY> |
Accept | application/json, text/event-stream |
X-Chat-Id | Unique session ID (one sandbox container per chat ID) |
Mcp-Session-Id | Session ID from the initialize response (required on subsequent calls) |
X-MCP-Servers | (optional) Comma-separated external MCP servers for sub_agent — see below |
sub_agentPass a comma-separated list of MCP server names via the X-MCP-Servers header; the server writes ~/.mcp.json inside the sandbox before launching Claude Code. Server URLs are built from ANTHROPIC_BASE_URL; auth reuses ANTHROPIC_AUTH_TOKEN.
-H "X-MCP-Servers: confluence,jira" \ -H "X-User-Email: user@example.com"
Full recipe: docs/MCP.md.
/files/{chat_id}/{filename}
Download a file from the container's outputs directory
/files/{chat_id}/archive
Download all output files as a ZIP archive
/api/uploads/{chat_id}/{filename}
Upload a file to the container's uploads directory
/api/uploads/{chat_id}/manifest
Manifest of uploaded files (filename → MD5)
Ready-made system prompt that teaches an AI how to use this server (files, skills, tools). Use it in n8n, custom agents, or any integration.
curl http://localhost:8081/system-prompt
The server owns the public URL (PUBLIC_BASE_URL env var) and bakes it into the returned prompt; callers no longer need to pass file_base_url/archive_url query params (legacy, still accepted for backward compatibility).