mcp-code-execution-mode — Claude Code skill: setup & usage
mcp-code-execution-mode executes Python inside rootless containers and routes calls to MCP servers to keep token consumption minimal.
no license 174 installs ★ 9 updated 2026-10-09
npx skills add reason-machines/mcp-skills --skill mcp-code-execution-mode -a claude-codeWhat mcp-code-execution-mode does
Large tool catalogs can consume tens of thousands of tokens per turn. This component replaces heavy schema dumps with a single run_python entry point. The agent queries tools dynamically at runtime via helper methods like search_tool_docs and triggers actions programmatically, keeping setup overhead around 200 tokens.
Execution takes place inside an isolated sandbox with a read-only filesystem, blocked network access, and a default memory boundary of 512m. Sessions stay persistent across runs, so dataframes and written files remain accessible when MCP_BRIDGE_SESSION_PERSIST is active.
Running this bridge requires Python 3.11+ alongside an active Podman or Docker Desktop engine. Without an operational container runtime, code execution calls fail immediately.
What it helps with
- reduce token overhead from large MCP tool schema sets
- execute Python logic inside isolated rootless sandboxes
- search and load external tool definitions on demand
- orchestrate multiple MCP servers from a single script
Example prompts for the agent
- Run python code in a sandbox to query open issues from GitHub
- Discover mcp tools dynamically and process sales data from the filesystem
- Execute an isolated Python script with persistent session state
How to install mcp-code-execution-mode
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp-code-execution-mode -a claude-code2Manually: put the files in place
~/.claude/skills/mcp-code-execution-mode/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mcp-code-execution-mode/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp-code-execution-mode -a codex2Manually: put the files in place
.agents/skills/mcp-code-execution-mode/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp-code-execution-mode -a cursor2Manually: put the files in place
.cursor/skills/mcp-code-execution-mode/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/mcp-skills skills/mcp-code-execution-mode2Manually: put the files in place
.github/skills/mcp-code-execution-mode/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp-code-execution-mode -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/mcp-code-execution-modeManually: put the files in place
.devin/skills/mcp-code-execution-mode/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp-code-execution-mode -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mcp-code-execution-mode
How to install mcp-code-execution-mode in Claude Code?
Run npx skills add reason-machines/mcp-skills --skill mcp-code-execution-mode -a claude-code. The definition is placed into ~/.claude/skills/mcp-code-execution-mode/SKILL.md.
What does mcp-code-execution-mode do?
It proxies external stdio MCP tools through Python running inside a container, fetching tool schemas only when the agent explicitly requests them.
What dependencies are necessary to start the environment?
You need Python 3.11 or newer together with an initialized Podman machine or running Docker Desktop instance.