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)
Stop 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
zhuyansen/new-term-radarDaily 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.
yzg1226/mcd-party-officer🍟 麦当劳门店派对成团调度 Skill — 把派对从「策划」推进到「办得成」:成团概率雷达 / 包场vs拼团 / 择日黄历 / 儿童营养指数 / 招募卡与邀请函
fellowgeek/mcp-memoryAn OKF-backed Model Context Protocol (MCP) server delivering persistent long-term memory and SQLite FTS5 search for AI agents.
hirotomasato/yowesGenerate realistic teacher documents (ID cards, licenses, letters) for 13 countries via MCP.
hujjun/mcd-saver-strategist麦当劳省钱点餐助手(麦门精算师)|麦当劳优惠券组合优化 Skill:拉取麦当劳菜单与全部可用优惠券,算出最省的点餐组合,巨无霸套餐 ¥47 → ¥21.9(省 53%)。McDonalds MCP(麦当劳 MCP)coupon optimizer · McDonalds China MCP Server · Agent Skill for WorkBuddy · 麦当劳程序员创意开发大赛参赛作品
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.