← All stories
● Covered by 1 source · 1 reportLow impact1 neutral

Pi integrates MCP with Codemode to reduce token usage in AI agents

🔄 Updated 49m ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Chrome DevTools MCP previously consumed 18,000 tokens before any action.
  • Pi now integrates MCP, but uses Codemode to load tools on demand.
  • This approach reduces initial token usage and improves composability.
  • Earendil, Pi's acquirer, found the changes generally useful for core integration.

Initial Token Consumption Challenge

Mario Zechner, creator of the Pi coding agent, previously avoided integrating the MCP protocol due to its high token cost. Measurements showed that Chrome DevTools MCP alone consumed approximately 18,000 tokens, or 9% of a 200,000-token context window, before any useful operations. Playwright MCP also required about 13,700 tokens for its 21 tools.

The Codemode Solution

Pi now incorporates MCP, but it does not expose all server tools to the model upfront. Instead, Pi utilizes Codemode to identify and call tools from JavaScript only when needed, returning only the relevant output. This method prevents the model from being burdened with large tool definitions in the initial prompt.

Improved Composability and Efficiency

Zechner also noted that traditional MCP servers lacked composability, requiring results to pass through the agent's context for persistence or combination. His earlier workaround involved using Bash and scripts, which required only a 225-token README and allowed direct piping or saving of output. The current Codemode approach in Pi addresses these composability issues by managing tool interactions more efficiently.

Earendil's Rationale for Integration

Earendil, which acquired Pi, decided to integrate MCP into the core of Pi 1.0. The company stated that MCP had matured sufficiently, and the architectural changes required for its integration were found to be broadly beneficial. This aligns with Pi's existing use of Codemode with Jev, applying the same pattern to manage interactions between the model and its tools.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Oct 05

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

The Pi coding agent now integrates the MCP protocol, addressing previous concerns about high token consumption. This integration uses Codemode to dynamically load tools, significantly reducing the initial context window size required for browser automation tasks.