Build1 publisher3 min readPublished
Earendil rebuilt Pi's agent core before adding the MCP support it once refused
Earendil has built MCP into the core of its Pi coding assistant after months of saying on its blog and in podcasts that Pi would not support it. By the company's account, Pi's harness had to change first, and a team making MCP its default takes on that same work.
The Engineer · Build desk

What happened
- Earendil says it redesigned Pi so lazy tool loading, mid-conversation system messages and per-tool metadata are core, after which MCP fit without friction.
- OpenAI's Codex exposes an equivalent way to compose tool calls in code, and the write-up says several agent harnesses are converging on model-written combination logic.
- Standing up an MCP server takes a JSON file and an npx command with no extra infrastructure, according to the write-up.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- constraint Speaking MCP leaves the chaining cost in place: without code-based composition, every intermediate result still passes through the model's context at full size.
- decision Teams making MCP their default tool interface have to settle whether their harness defers tool loading and carries per-tool metadata before they connect many servers.
- cost The server side costs a config file, so the expense of adoption falls on whoever builds the client, paid in harness engineering and context tokens.
- precedent With Pi and Codex grouped together on code-based composition, a sandbox for model-written tool logic becomes the feature other harnesses will be expected to ship next to MCP.
On the wire, an MCP tool is a function announcement [6]. The server publishes a name, a description and a parameter schema in JSON Schema, and the model decides when to call it [6]. Client and server exchange JSON-RPC over a common transport [4]. The client lives inside the assistant, discovers the server's tools, resources and prompts when it connects, and chooses which ones the model sees on each turn [5]. The difference from provider function calling is that the announcement no longer depends on the model vendor or the host application [6].
Earendil's objection sat in the loop around that call, and a dev.to write-up of the reversal calls it a technical one [15]. Chaining one tool's result into another made the model read the full data and write it out again inside the conversation context, whether it ran to a hundred lines or a hundred thousand [7]. The top of that range is 1,000 times the bottom [1]. Every intermediate step cost tokens, and many servers returned plain text meant for a person, not structured data another program could parse [8]. One of Earendil's engineers wrote an entire post on why Pi would not support the protocol [3]. It now doubles as a problem statement for the fix.
The reversal, as Earendil tells it, started in its own harness. The company says the infrastructure MCP needed was useful regardless of MCP: lazy tool loading, system messages injected mid-conversation, and per-tool metadata for models running at different reasoning levels [9]. It redesigned Pi so those primitives are part of the core, and says MCP then fit without friction [10]. I think this is good engineering. Deferred loading and per-tool metadata go after the same context budget the composition complaint was about, and Earendil says they pay off beyond MCP [9][7].
Composition is handled one layer up. Codemode, as the write-up describes it, gives the client a JavaScript sandbox that combines several MCP calls without spending context on each intermediate step [11]. MCP still does discovery and invocation; the sandbox holds the logic that joins the calls [11]. The write-up says Codex, OpenAI's assistant, exposes an equivalent mechanism, and that several agent harnesses are moving toward letting the model write the combination logic instead of running a fixed plan of calls [12].
The same post says several agent tools went from distrust to adoption [13]. It names Pi as the case and Codex as the parallel, and does not name the others [12]. The evidence that critics are converging on MCP is one company's reversal, told partly through that company's blog [3]. In my view MCP is a sensible default for the announcement format, and a server costs a JSON file and an npx command to stand up [14]. What carries over from Pi is the order of work: Earendil changed the harness first and added the protocol second [10]. A client that connects MCP servers without deferred loading or code-based composition gets the version Earendil refused, with the token cost it described [7][8].
What to watch
- Whether Earendil publishes token counts for chained MCP calls in Pi before and after the core redesign.
- Whether the other agent tools the write-up says followed Pi's path are named, and whether they also ship deferred loading and code-based composition.
- Whether MCP server authors move from human-readable plain text to structured output, which would shrink the problem Pi originally cited.