{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "anthropics-sandbox-runtime--sandbox-an-mcp-server",
 "repo": "anthropics/sandbox-runtime",
 "repo_url": "https://github.com/anthropics/sandbox-runtime",
 "repo_slug": "anthropics-sandbox-runtime",
 "title": "Sandbox an MCP server with one line in .mcp.json",
 "page_title": "How to sandbox an MCP server with one line in .mcp.json with Sandbox Runtime",
 "summary": "Wrap a local MCP server in srt so it can only write and connect where you allow.",
 "who": "A developer adding a community MCP server to Claude Code who does not fully trust what it might write or call.",
 "problem": "A local MCP server runs with your full user permissions, so a bad one can read secrets or write anywhere.",
 "outcome": "The same MCP server running under OS-level limits, with writes outside allowed paths failing with operation not permitted.",
 "steps": [
  "Run `npm install -g @anthropic-ai/sandbox-runtime`",
  "In .mcp.json, change the server's command to srt and move the original command into args, for example `\"command\": \"srt\"` with `\"args\": [\"npx\", \"-y\", \"@modelcontextprotocol/server-filesystem\"]`",
  "Create ~/.srt-settings.json with filesystem rules (denyRead, allowWrite, denyWrite) and network rules (allowedDomains, deniedDomains)",
  "Restart your agent and ask the MCP server to write to a denied path to confirm it gets EPERM"
 ],
 "agent_prompt": "Install anthropics/sandbox-runtime and wrap my <MCP server> in srt in .mcp.json. Write ~/.srt-settings.json so it can write only to <allowed path> and reach only <allowed domains>, then prove it by asking it to write to <denied path> and showing me the error.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Beginner",
 "time": "15 minutes",
 "basis": "readme",
 "caveat": "It is a beta research preview, so the README warns that APIs and configuration formats may change.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js and npm to install the CLI",
  "macOS, Linux with bubblewrap, or Windows",
  "Optional: a settings file at ~/.srt-settings.json; without one srt uses built-in defaults"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/anthropics-sandbox-runtime/sandbox-an-mcp-server/",
 "md": "https://dedupedai.com/use-cases/anthropics-sandbox-runtime/sandbox-an-mcp-server/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/anthropics-sandbox-runtime--sandbox-an-mcp-server.json",
 "api_version": "v1"
}
