Skip to content

You Said No MCP: Pi’s Reversal + Codemode Setup

Pi flipped from 'No MCP' to core support with Codemode. What changed, five-minute setup, exposure modes, and when you still skip it.

6 min readBeginner

Pi’s homepage used to brag “No MCP.” The team repeated it on podcasts. Then v0.99.0 shipped (29 Sept 2026) and Earendil’s “You Said No MCP!” topped Hacker News overnight.

Staring at a coding agent that suddenly supports the protocol half the timeline loved to hate? Practical cut only: what flipped, how to turn it on in Pi without torching the context window, when you still walk away.

Reader scenario: the flip that hit the timeline

You run a minimal use. Four-tool default felt right. You watched the hype, the context-bloat threads, the “just give it a CLI” wave. Earendil published the reversal post and the comments went loud.

What actually landed wasn’t a meek apology. They refused the old dump-every-schema-into-context pattern. Codemode shipped first – a QuickJS WASM sandbox on the use side so the model writes short orchestration scripts – and MCP rides on top as discovery plus transport. Nested tool calls stay out of the LLM context; only script output returns.

Six hundred-plus HN points in under a day (thread). Security folks liked credential isolation. CLI purists said nothing new. Everyone else argued about whether composition finally beats raw bash.

Funny how a slogan becomes a liability the moment the implementation stops being the thing you hated.

What “You said no MCP” means now

MCP is still the open standard for hooking AI apps to tools and data – one server, many clients (Claude, Cursor, ChatGPT connectors, now Pi). Anthropic introduced it in Nov 2024; the spec lives at modelcontextprotocol.io. Latest revision referenced as of mid-2026: 2026-07-28.

Pi’s old stance: pure minimalism. Four tools, tiny system prompt, bash and files. New stance: MCP on Pi’s terms. Default exposure is codemode. No giant schema list every turn. The model writes JS, filters results inside the sandbox, and only the distilled answer re-enters the conversation.

Pro tip: Treat Codemode as the real feature. MCP is discovery and transport that feeds it. Servers that only return plain text (built for old dump-into-context harnesses) make composition painful – Earendil still calls that out. Prefer structuredContent when you have a choice.

So this isn’t another paste-the-mcp.json walkthrough.

Practical setup: MCP in Pi in under five minutes

Need v0.99.0+ (Codemode + MCP landed together per the Pi release notes).

  1. Install or upgrade:
    curl -fsSL https://pi.dev/install.sh | sh
    # or
    npm install -g --ignore-scripts @earendil-works/pi-coding-agent
    pi --version

    Node 22.19+ for the npm path, as of the official quickstart – check the page if that floor moved.

  2. Add a local server (filesystem starter):
    pi mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem .
  3. Check it:
    pi mcp list
  4. In a project folder, start a session and type /mcp. You should see the server, tool count, and exposure (default: codemode).

Remote URL shape:

pi mcp add docs --url https://example.com/mcp --bearer-token-env-var DOCS_TOKEN

Config: ~/.pi/agent/mcp.json (user) or .pi/mcp.json (project). Project file loads only after explicit project trust – easy to forget when you switch folders. Keep credentials in the user-level file.

Codemode shows up once a server with codemode exposure is present. Manage servers with pi mcp add and the in-session /mcp command.

Advanced usage: compose without the doom loop

Classic MCP tax: every tool description in context, every turn. More servers, dumber model, higher bill. Codemode cuts that loop.

Try a prompt in this spirit:

Use codemode: list files over 1MB under the project root via the filesystem server, sort by size, return a short table only.

The model writes JS inside QuickJS. Nested calls never hit the main window. Final table or summary comes back. Session transcript holds state – no scattered temp files.

Exposure knobs (from Pi’s coding-agent MCP docs):

Exposure Model sees schemas? Best for
codemode (default) No – scripts discover via searchTools() / ALL_TOOLS Most servers
deferred Only after search Huge rarely-used packs
direct Yes, like built-ins Tiny always-on sets
hidden Registered but inert Kill switches

Change exposure from /mcp or the JSON. For OAuth remotes, add the URL and run pi mcp login <name> for the browser flow.

Catch: default codemode means individual MCP tool schemas never appear as first-class tools. If the model doesn’t write a script that discovers them (searchTools / ALL_TOOLS), calls fail quietly until you adjust exposure or spell the namespace out in the prompt.

Honest limitations (still real as of late 2026)

Composition improved. Not magic. Many existing servers still emit plain text aimed at old harnesses; you’re filtering inside the script until more of them ship structuredContent.

Credentials sit behind the MCP process instead of raw keys in the agent prompt. Still: a malicious or buggy server is code with the permissions you granted. Least privilege. Official or trusted servers only.

Project .pi/mcp.json stays inert until trust – budget a minute for that before you debug “why isn’t it loading.” Flip too many servers to direct and classic bloat returns. Remote OAuth? No clean universal answer yet. Some servers reject dynamic client registration or advertise wrong metadata; Pi docs list workarounds (manual clientId / clientName, authServerMetadataUrl). Community threads still report friction across clients.

Already living in well-documented CLIs, and the model reads --help without drama? Skip MCP. Pi left that path open on purpose.

Is “reusable connector + sandbox composition” worth the auth and trust ceremony for your actual week – or is one solid CLI enough?

FAQ

Did Pi fully reverse its “No MCP” stance?

No. Codemode is the default path; they still criticize bloated servers. See Earendil’s post, 29 Sept 2026.

I added a server but the model never calls the tools – what now?

Run /mcp and read the exposure line. Codemode default: tools aren’t first-class in the prompt, so the model must go through a codemode script (discovery via searchTools / ALL_TOOLS) or you set that server to direct. Confirm with pi mcp list. Config edits outside the session need a restart or reload before they stick.

Should beginners still learn plain function calling or CLIs first?

For a one-off agent that shells out twice, yes – CLI first. MCP + Codemode earns its keep when the same connector must work across harnesses, when you want credential isolation, or when one session has to stitch several services without eating the whole context window. Start with the filesystem server above. One concrete loop beats another architecture slide: install, add filesystem, ask Pi to list the largest files in the tree via codemode. The protocol is JSON-RPC plus a tool/resource/prompt catalog – plain once you’ve watched a single round-trip.

Open a terminal. Run the install. Add the filesystem server. That loop teaches more than another abstract diagram.