· via Hacker News – Front Page (hnrss.org)
Pi reverses its anti-MCP stance and ships Model Context Protocol support in core
Pi, the agent harness that long advertised its refusal to support MCP, now ships the protocol in its core alongside Codemode, a JavaScript sandbox for composing tool calls.

A holdout embraces MCP
Visitors to pi.dev were previously met with an emphatic statement that Pi does not support MCP, and the team behind the agent harness repeated that position in podcasts and in a post by Mario. That stance is now history: according to a post on the Earendil blog that surfaced on Hacker News, upgrading Pi delivers MCP as supported functionality built into the core.
The post confronts the contradiction head-on and attributes the turnaround to two things: the protocol maturing over the past year, and the realisation that the engineering required to support it well would benefit Pi regardless of MCP.
Why the protocol earned a spot in core
The team writes that they have watched MCP evolve and that the current version differs substantially from earlier iterations. On its own, they argue, that would not justify core inclusion: MCP already existed as an extension and could have remained one, even as an Earendil-endorsed extension. Moving it into core came out of a deliberate rethink.
What tipped the balance was that the supporting work turned out to be generally useful. The same plumbing makes it easier to run Jev, a classifier model referenced as typesafe/jev, inside Pi. At bottom, the post argues, Pi and MCP want the same primitive: an interpreter serving as a sandbox.
There was also a metadata gap. Months of recent work made Pi sensible with newer model capabilities such as deferred tool loading, mid-conversation system messages and reasoning-level changes, but the tool loadout had not been upgraded to scale with them. A standalone MCP extension cannot tell whether a given tool should be exposed directly to the model or only through Pi's Codemode layer, so tools needed to be configurable as deferred or Codemode-specific. The team adds that even though they could have wired up that metadata for a better extension, pairing MCP with Codemode resolves several of the protocol's traditional weaknesses.
Codemode, explained
A harness can execute tools in one of two places: where bash runs, or where the agent loop runs. The trust levels differ sharply, since the loop usually sits in a trusted environment while tools often execute in a less trusted sandbox. Codemode runs on the harness side. It is a layer for coordinating tool calls, letting the agent choose execution order and stitch results together with JavaScript. Because it lives alongside the harness, its state is kept in the session transcript rather than the filesystem. JavaScript was chosen partly because compact engines ship as WASM binaries and offer reasonable isolation.
In Pi, Codemode loads automatically when MCP is configured, and it can be added as a default tool; the post suggests simply asking Pi to reconfigure itself to enable it.
The post demonstrates with an example: a request to use typesafe/jev via codemode to find the most frustrated commenters on the issue tracker. The generated script pulled open issues from a Linear MCP server, had Jev judge the emotional tone of each thread with four concurrent workers, and returned counts plus a ranked list of flagged issues across 167 threads. An MCP tool and a model call were combined in a single script while consuming almost no agent context.
The criticism that remains
Embracing MCP does not mean endorsing everything about it. The team's biggest complaint is still composability: even with Codemode, MCP does not fully deliver, though they now place more blame on MCP servers and harness conventions than on the protocol itself. Many servers are written for harnesses that pour tool definitions into the model's context and return plain text to save tokens. Their preferred mental model is something much closer to OpenAPI with intelligent tool discovery, where tools return structured data and can be found through their documentation. They observe that CLIs remain so functional because agents wire programs together with shell commands, and argue nothing fundamental prevents MCP from working the same way. Pi's implementation exposes MCP tools to a JavaScript sandbox, an approach the post notes overlaps with how Codex operates.
Why it matters
MCP's momentum has been evident for some time, but this is a case of a vocal skeptic folding the protocol into its core rather than tolerating it at the margins, a strong signal of where agent tooling is consolidating. The design detail matters more than the reversal: instead of pushing tool definitions into the context, Pi routes MCP calls through a code sandbox where the agent composes them programmatically, attacking the protocol's token-efficiency and composability problems at the harness level. The team is explicit that adopting MCP is how it intends to influence it, pushing the server ecosystem toward structured data and better discovery from inside rather than critiquing from outside. For developers, Codemode is also usable beyond MCP, which makes this release as much about Pi's scripting surface as about protocol support.
- #mcp
- #ai-agents
- #developer-tools
- #llm
- #javascript