by elusznik
An MCP server that executes Python code in isolated rootless containers with optional MCP server proxying. Implementation of Anthropic's and Cloudflare's ideas for reducing MCP tool definitions context bloat.
# Add to your Claude Code skills
git clone https://github.com/elusznik/mcp-server-code-execution-modeStop paying 30,000 tokens per query. This bridge implements Anthropic's discovery pattern with rootless security—reducing MCP context from 30K to 200 tokens while proxying any stdio server.
This bridge implements the "Code Execution with MCP" pattern, a convergence of ideas from industry leaders:
Instead of exposing hundreds of individual tools to the LLM (which consumes massive context and confuses the model), this bridge exposes one tool: run_python. The LLM writes Python code to discover, call, and compose other tools.
While there are JavaScript-based alternatives (like universal-tool-calling-protocol/code-mode), this project is built for Data Science and Security:
| Feature | This Project (Python) | JS Code Mode (Node.js) |
| :--- | :--- | :--- |
| Native Language | Python (The language of AI/ML) | TypeScript/JavaScript |
| Data Science | Native (pandas, numpy, scikit-learn) | Impossible / Hacky |
| Isolation | Hard (Podman/Docker Containers) | Soft (Node.js VM) |
| Security | Enterprise (Rootless, No Net, Read-Only) | Process...