Typed, sandboxed Code Mode access to configured MCP servers for Pi
View on GitHub ↗Fast, typed, sandboxed Code Mode for every MCP server configured in Pi.
Instead of putting every upstream MCP tool definition into the model context, pi-codemcp gives the agent a small interface for discovery, execution, and reuse:
- codemcpsearch ranks capabilities or pages through a compact inventory without loading full schemas. - codemcpinspect returns exact typed SDK stubs only for selected calls. - codemcpexecute runs one sandboxed Python call graph across one or many MCP servers. - codemcpsavechain turns a repeated call graph into a reusable native Pi tool. - codemcpmanagechains lists chains or performs an explicitly confirmed enable, disable, revalidate, or delete.
Intermediate results stay inside the sandbox. The model receives only the compact value returned by the program.
MCP has an uncomfortable scaling property: the more tools an agent can use, the more tool schemas compete with the actual task for context. Multi-step work also tends to bounce every intermediate result through the model, adding tokens, latency, and opportunities for mistakes.
Cloudflare described a better pattern in Code Mode: give agents an entire API in 1,000 tokens: expose a small search-and-execute surface, let the model write code against a typed SDK, and execute that code in a sandbox. Their work reports a fixed tool footprint and dramatic context savings for very large APIs. The open-source implementation lives in @cloudflare/codemode.
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/yolonir--pi-codemcp.html)
Daily radar for new AI terms: names of new models, products and repos, caught on X, Hugging Face, GitHub and sitemaps before keyword tools list them.
gary23w/f-ck_data_brokersfck_data_brokers.py is a free, open-source Python script that sends opt-out and deletion requests to data brokers on your behalf.
LiCinCan/blender-ai-mcp-addonAI assistant and MCP server for Blender: visual chat, scene tools, multi-agent workflows. Works with OpenAI, ChatGPT, Claude, Gemini, Ollama, OpenCode. Blender AI addon and plugin, copilot for 3D, bpy
2akouwu/reverifyStop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is
cranebeaker/coop-anythingCo-op Anything: point your AI agent at any single-player game and play it with friends (online and/or splitscreen!). MCP server and playbook to let you reverse engineer, fix, test, ship and share what
anujasid/blender-ai-mcp-addonAI assistant and MCP server for Blender: visual chat, scene tools, multi-agent workflows. Works with OpenAI, ChatGPT, Claude, Gemini, Ollama, OpenCode. Blender AI addon and plugin, copilot for 3D, bpy
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.