Upgrade Your Pi Agent with Subagents + MCP

Upgrade Your Pi Agent with Subagents + MCP

🎬 ZazenCodes 📅 Sep 9, 2026 ⏱ 25:22
Pi subagents MCP harness extensions

🎯 What Pi Is

Pi is a minimal, lightweight coding agent harness — it wraps an LLM (OpenAI, OpenCode, or open-source providers) and ships core tools like read, write, edit, and bash. What it doesn't ship: subagents and MCP. Both are add-ons via community extensions. 0:00

The two missing capabilities: subagents (parallel exploration, keeping the main context clean) and MCP (connecting external tool servers). "Pi is easy to extend — many people have. I'm using the work of others today."

🤝 Subagents Extension

ZazenCodes picks tintinweb/py-subagents (~1k stars) — his choice because it gives Claude Code-style subagents, which he's used to. 2:26

After install: the extensions section shows tintinweb/py-subagents, and \agents becomes an available setting to manage them. Subagents are how he keeps his main context clean — the detailed "nitty-gritty" work happens inside subagents, and only the summary comes back.

🔬 Demo: Parallel Exploration

The hands-on test: explore an open-source repo's source folder using subagents. 3:07

The progression: first attempt spawns one subagent ("I wanted multiple, in parallel"). Second attempt: "use 10 different subagents in parallel, then bring their results back together" → triggers a workflow (explore source 10), 10 agents spin up in parallel, and you watch checkmarks appear as each finishes.
The payoff — context economics: the workflow burned ~300,000 tokens and ~300 tool uses across 10 subagents (in ~90 seconds), but the main context stayed at ~20–24k tokens — only ~10% of the model's full context (GPT-5.6 Terra). "That's what we saved from our main context."

⚙️ Configuring Subagent Models

The surprising default — and how to override it. 7:32

The gotcha: the explore agent type defaults to Claude Haiku and falls back to "inherit" — not the parent model. ZazenCodes expected it to inherit Terra (his main), but it was running Haiku 4.5 through OpenCode.
The fix: \agents → agent types → "eject personal settings" → open the config file → change the model override. He set OpenAI/GPT-5.6-Luna (the cheap small model) as his exploration model, keeping the expensive Terra as main. "Using Luna as a cheap exploration model is exactly what I'd want."
Right-sizing matters: 4 subagents is often better than 10 — "there's overhead to spinning these up and pulling them back."

🔌 MCP Extension

Installing MCP support via the Pim-MCP adapter (~1k stars, on Pi's official site). 11:44

Setup flow: /mcp → scaffold mcp.json in the project (or configure globally) → add a streamable HTTP server URL. Each MCP server can be project-local or global, and the \mcp view gives observability — he saw 55 tools exposed by one server, individually enable/disable-able.
Auth is manual in Pi: connecting Floot's server required an OAuth dance — open a localhost URL, approve, copy the token back into Pi. "With Claude/Codex it's smoother; with Pi it takes a bit more engineering."

🚀 Demo: Building Apps with MCP

The end-to-end test: build a working app through the MCP server (Floot — today's sponsor). 14:51

The prompt: "build me a working feedback hub with Floot — a form that saves responses to a database, browsable, with a fun pixelated character that reacts." The MCP server exposed tools like floot_get_guides, floot_list_files, floot_apply_patch, floot_edit_file — and Pi called them through the adapter.
The result: a live app at catilian-floot.app — a Postgres-backed feedback form (name, message, mood) with a pixel character, published with one click. The database showed the submitted entries ("Jim — steady vibe").
Honest note on the second server: his own "random number" MCP server — "the MCP server is kind of clunky; I actually use a skill (Python functions) for random numbers instead." The MCP server exists as a teaching demo, not his real preference.

💡 Key Takeaways

  1. Pi is minimal by design — subagents and MCP aren't missing, they're community extensions.
  2. Subagents keep the main context clean — 300k tokens of exploration stayed in 10 subagents; main context held ~20k (10%).
  3. The explore agent defaults to Haiku, not the parent model — eject settings to override it with a cheap model (GPT-5.6 Luna).
  4. Right-size the swarm — 4 subagents often beat 10; there's spin-up overhead.
  5. MCP comes via the Pim-MCP adapter/mcp scaffolds config, project-local or global, with per-tool enable/disable.
  6. Auth is manual in Pi — an OAuth copy-paste dance that Claude/Codex smooth over.
  7. Skills vs MCP — for simple logic (random numbers), a skill is cleaner; MCP is for real external tool servers (databases, deployment).

📍 Timestamp Index

0:00 Intro — extending Pi
1:44 Install Pi
2:22 Install subagents extension
3:07 Demo: parallel exploration subagents
7:32 Configuring subagent models
11:44 Install MCP extension
14:51 Demo: building apps with MCP tools
☰ View all