Pi.dev Adds MCP Support to Core, Introducing Codemode JavaScript Sandbox
Key point
Pi.dev has integrated Model Context Protocol (MCP) support into its core, introducing a new JavaScript-based 'Codemode' sandbox to facilitate tool orchestration and leverage new LLM capabilities.
Details
Integration of MCP into Core
Pi.dev, which previously declared it did not support MCP and made dismissive statements about the protocol, has now added MCP as a supported piece of functionality in its core. The engineering team explains that while MCP could have remained an extension, they rethought the architecture and found that the changes required to support MCP effectively were generally useful for the platform. These changes also facilitate the easier use of other features, such as the Jev classifier model.
Introduction of Codemode
The integration introduces Codemode, a JavaScript sandbox that runs within the trusted harness environment rather than the untrusted tool execution side. Codemode allows agents to orchestrate and combine multiple tool calls using JavaScript, maintaining state within the session transcript. This approach aims to address MCP's traditional difficulty with composition by enabling programmatic wiring of tools, similar to how CLIs use bashisms. However, the team notes that while Codemode helps, MCP still does not fully deliver on composition due to issues with existing MCP servers and harness approaches.
Practical Implementation and Benefits
Codemode is automatically loaded when MCP is configured or can be enabled as a default tool. It enables complex workflows, such as combining the Linear MCP with the Jev classifier model to analyze issue tracker sentiment without consuming excessive context. The team advocates for a modern MCP approach resembling OpenAPI, with intelligent tool discovery and structured data returns. This shift allows Pi to better leverage new LLM capabilities like deferred tool loading and reasoning models.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.