Tool Sandbox MCP β Development skill for Claude Code
π¦ MCP server that runs agent code in a sandbox with access to upstream MCP tools.
How to install Tool Sandbox MCP
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open domdomegg/tool-sandbox-mcp and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Tool Sandbox MCP does
π¦ MCP server that runs agent code in a sandbox with access to upstream MCP tools.
Alternatives in Development
- Mempalace Init β Set up MemPalace β install the package, initialize a palace, register the MCP server with Cursor, and verify e 58.6k β
- Claude Context Mode β An MCP server that sits between Claude Code and these outputs 5.3k β
- 04 Fix MCP Server β Prompt 04: Fix MCP Server Build 2.2k β
README
tool-sandbox-mcp
Give your AI agent a single `execute_code` tool that can call any of your upstream MCP tools β more efficiently.
When agents call tools directly, every tool definition and intermediate result flows through the context window. As I wrote about in [code execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp), this gets expensive fast: hundreds of tool definitions consume tokens upfront, and intermediate results (like full documents being copied between tools) bloat the context further.
tool-sandbox-mcp solves this by exposing a single `execute_code` tool that runs JavaScript in a [sandboxed WASM environment](https://github.com/domdomegg/tool-sandbox) with access to all upstream MCP tools. The agent writes code to call tools, filter data, and compose logic β all without intermediate results passing through the context window. Auth is proxied transparently from the upstream server, so users authenticate once.
MCP Client (Claude, Cursor, etc.)
β tool-sandbox-mcp (execute_code)
β runs JS in sandbox
β calls upstream MCP tools as needed
Usage
Set `TOOL_SANDBOX_MCP_CONFIG` to a JSON config object and run:
TOOL_SANDBOX_MCP_CONFIG='{"upstream": "https://mcp.example.com"}' npx -y tool-sandbox-mcp
This starts an HTTP MCP server on localhost:3000. When a user connects, they authenticate with the upstream server (via proxied OAuth). The server exposes a single `execute_code` tool β the agent writes JavaScript that can call any tool on the upstream.
In general you'll want to point this at some kind of gateway which aggregates MCP servers. You can use [mcp-aggregator](https://github.com/domdomegg/mcp-aggregator) for this if you don't already have a gateway. (The `selfPrefix` config argument can prevent recursive calls if you want).
Other configuration methodsThe env var can also point to a file path:
TOOL_SANDBOX_MCP_CONFIG=/path/to/config.json npx -y
Related Skills
MCP Language Server
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, a
Chiasmus
Chiasmus is an MCP server that gives language models access to formal verification
MCP Server Notion
Notion workspace access and page management.
Arxiv MCP
Search and retrieve academic papers from arXiv.org using WebFetch and Exa. No MCP server required - uses exist
Jfrog MCP Server
JFrog MCP Server: providing your agents with direct access to JFrog Platform services.
Glass
Run Claude Code inside Obsidian with an interactive terminal, quick-ask modal, and a built-in MCP server for s
Related Agents
Eval Implementer
Implementer role of the D365FO agent eval loop. Runs ON THE VM (mcp-server in full mode + C# bridge) against t
MCP Integrator
Decides what tool or data access a task needs and how to wire it via MCP, preferring an existing server over a
QA Execution Operator
Requests approved sandbox execution through an allowlisted adapter and reports test-run evidence without direc