$ cat ~/map/pi-mcp-adapter.md
Pi MCP Adapter
Use MCP servers with Pi without burning your context window.
extensions✓ Oct 16
Facts
- repository
- github.com/nicobailon/pi-mcp-adapter ↗
- GitHub Stars
- ★ 1.6K
- Forks
- 391
- license
- MIT
- npm / mo
- —
- last push
- Oct 16, 2026
install
pi install npm:pi-mcp-adapter## TL;DR
Use MCP servers with pi without burning your context window: one ~200-token proxy tool replaces hundreds of verbose tool definitions, servers start only when used, and the agent discovers capabilities on demand.
## Key points
- $Solves the MCP token tax — a single MCP server can cost 10k+ tokens of tool definitions before the conversation starts; the adapter exposes one proxy tool and fetches schemas only when a tool is actually called.
- $Zero-config startup for existing MCP users: .mcp.json and ~/.config/mcp/mcp.json are detected automatically; /mcp setup can adopt host-specific configs from Cursor, Claude Code, or Codex with a preview of every file change.
- $Per-server lifecycle modes, tool approval, an output guard, remote/headless OAuth, shared MCP processes via rmcp-mux, MCP scripting, prompts, and elicitation are all supported.
- $Also embeddable as an agent plugin or registered at runtime from other extensions; a CLI (pi-mcp-adapter init) writes compatibility imports into the pi agent dir.
## FAQ
Q Do I need to restart pi after installing?
Yes — pi install npm:pi-mcp-adapter then restart Pi, after which the /mcp command drives setup, status, and per-server options.
Q What happens on the first run with nothing configured?
/mcp setup scaffolds a minimal .mcp.json, offers a curated known server, quick-adds RepoPrompt, or just shows what the adapter discovered on your machine.
Q Can it run inside DeepSeek Harness?
Yes — the third-party pi2dsh bridge runs the unmodified adapter under DSH, with a verified TUI/Web MCP guide in that project's examples.
## References
- README (configuration, server options, lifecycle) ↗
- Why This Exists (context on the MCP token problem) ↗
## Related entries
$ big-pi
Model-driven compression that summarizes completed phases into tiered blocks while Pi's JSONL transcript stays authoritative and untouched.
$ pi-experience
Experience-memory extension: logs raw runs to its own SQLite; the main agent merges audited history into cross-session experiences.
$ pi-memento
Nested context transactions for pi: commit, compact, squash, or revert an exploration without rewriting session history.
## Guides
Last updated: Aug 31, 2026