MCP reconsidered
The Pi team’s reversal (@pidotdev tweet) — they were the loudest MCP skeptics (“pi.dev proudly declared Pi does not support MCP”; Mario Zechner’s “what if you don’t need MCP” post), and in 2026-09 they put MCP in Pi’s core. The why is more interesting than the reversal:
- What changed their mind: MCP improved, but the real reason is that what Pi needs is what MCP needs — “a sandbox to play with in the form of an interpreter.” The core work (Codemode) also made Jev integration easier. Infrastructure built for one became infrastructure for both.
- The honest critique stands: MCP’s biggest remaining problem is composition — most servers are still built for harnesses that “dump tools into context” and return text for token efficiency. Their framing: MCP should be “much closer to OpenAPI with intelligent tool discovery” — structured data returns, discoverable by documentation.
- Codemode — the mechanism: a JavaScript sandbox that runs on the harness side (not the untrusted tool side), letting the agent orchestrate/combine tool calls with JS, with state kept in the session transcript rather than the filesystem. “There is no fundamental reason why you can’t do bashisms with MCP” — CLIs work because agents wire things together with efficient shell; Codemode gives MCP the same composability. JS chosen because small versions ship as WASM with “reasonable levels of protection.”
- The demo: “Use typesafe/jev via codemode to find the 20 most frustrated commenters on our issue tracker” — Linear MCP + Jev combined in the sandbox, zero context waste (the example code fetches issues, then Jev-judges each as none/mild/high frustration from inside the loop). The video demo went semi-viral outside the Pi bubble (573❤/40k views, @dillon_mulroy: “beautifully demonstrates both the power of codemode and general classification models”, tagging badlogic + mitsuhiko — captured 2026-10-01).
- The meta-lesson (their own link): “the world is not static” — be careful about what you dislike. “The best way to positively influence something is to embrace it” — they joined the conversation to shape MCP for small harnesses instead of watching from the sidelines.
Why this matters beyond Pi: the tool-dumping anti-pattern is the whole MCP field’s problem — Hermes’s native MCP client, every harness’s MCP integrations, face the same text-blob servers. The Codemode answer (structured returns + interpreter-side composition + deferred loading metadata) is a portable pattern. And Jev-inside-codemode is the Decision models thesis compounding: decision models as callable functions inside tool orchestration, not just standalone endpoints.
Related: MCP (the umbrella note) · Hermes Agent (native MCP client + skills) · Decision models (Jev) · Agent sandbox (the trusted-side/untrusted-side split Codemode formalizes) · Agent Client Protocol (the complementary client↔agent boundary; MCACP bridges the two)
The definitive writeup: “Codemode” (2026-10-06)
Ronacher’s own explainer (tweet, 232❤ + lucumr.pocoo.org/2026/10/6/codemode/, 18.3 KB captured) — fills in everything this note was missing:
- Why bash can’t be the whole answer: “bash can only compose programs that run” — but
read/view_imageneed payload injection into the LLM protocol, and sub-agents need harness-native tools. Some tools must live on the harness side. - Brains vs hands: the harness (brain, trusted) vs the execution environment (hands, sandboxed e.g. Gondolin) — different file systems, different trust. Codemode orchestrates on the brain side: QuickJS in WASM, no network/fs/timers, limited RAM — “the only way is to call more tools.” (Name credit: Cloudflare’s blog.)
- The mechanics that matter: regular tool calls throw trailing 2,000 lines into context; Codemode gets larger outputs structurally. Agents’ emergent pattern: probe 5–10 items to learn the shape, then write a script that processes the next n. State can be stashed into the transcript — one invocation stores, the next loads. Harness-only APIs (image gen, one-shot classifiers) exposed via Codemode only, “where they would just waste context.”
- MCP today is a fight: Cloudflare does Codemode inside the MCP server → “Codemode in Codemode” — double JSON escaping, confusing for small models, inner code can’t call outer tools. His four MCP desires: structured content (
outputSchema), consistent results (token-optimizing servers break probe-then-batch: “an initial probe with 5 items succeeds, then fails at max batch size”), large-binary support, composable cross-server tool search. - Not a CLI reversal: “the MCP ecosystem picked up on exactly what we pointed out a year ago works: code.” Open questions he flags: durability for Codemode invocations (durable-workflow-engine snapshotting — the pi durable convergence), and maybe Starlark over JavaScript for deterministic composition.
The thesis sentence for this note: Codemode is “a way for the LLM to express and orchestrate complex operations on the harness side, but not the execution environment side” — composition moved interpreter-side, exactly the open question MCP tracks.
The Zechner reversal, witnessed (2026-10-05/06)
David Cramer (Sentry): “Can you believe Mr anti MCP has been converted” — quote-tweeting Zechner’s reply to the Google-native-Markdown announcement: “what the world really wants and needs is an official, well maintained and capable gdrive/gmail mcp.” (834❤ / 43k views; both tweets captured.) The arc this note documents — Ronacher’s no-MCP → MCP-in-core — now has its second data point from the same orbit: Pi’s author asking for more MCP, specifically the platform-official kind. Pattern: the anti-MCP position was never “protocol bad,” it was “composition was missing and servers were hobby-grade”; fix those (Codemode; official maintenance) and the objection dissolves. Note what he asked for is exactly Ronacher’s MCP-desires list from the writeup above — official, well-maintained, capable — plus the one Google just half-answered (Drive/Docs as first-class agent surface; an MCP would complete it).
- The umbrella concept now has its own note: Code Mode — Cloudflare origin posts + Pi/Codemode diffusion, with MCP surviving as the uniform substrate (RPC + docs) that agents consume by writing code against it.