pi-subagent-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pi-subagent-mcpAsk pi to review the current code and report any issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pi-subagent-mcp
MCP server that exposes pi (pi --mode rpc)
as a sub-agent for MCP-capable coding assistants (e.g. Kimi CLI).
Build
npm install
npm run buildRelated MCP server: dat-ai-mcp
Tools
Tool | Purpose |
| Spawn a pi session on a task ( |
| Message a task ( |
| State, streaming flag, last assistant text, current tool, |
| Incremental event buffer read ( |
| Block until the run finishes or a dialog needs answering; returns last assistant text + |
| Answer a |
| Abort current operation; session stays alive |
| Kill the process, drop the task |
| All tasks |
Extension UI dialogs (bidirectional interaction)
pi extensions can block on select/confirm/input/editor dialogs
(extension_ui_request). By default (interactive: true) the server surfaces these as
pendingRequest in pi_status/pi_wait — which returns early — and the caller answers
with pi_respond. With interactive: false (unattended runs) dialogs are auto-cancelled,
preserving the original behavior.
Note: project-local pi extensions (.pi/extensions/) only load when the project is
trusted — pass approve: true to pi_dispatch to grant that for the run. Also, pi
delays the command response for extension commands that block on a dialog; the server
therefore treats dialog activity as command acceptance so pi_dispatch/pi_send
return instead of deadlocking.
Configuration
Environment variables:
PI_SUBAGENT_SESSION_DIR— where pi session files are stored (default:.pi-subagent/sessions/next to the package).PI_SUBAGENT_PI_PATH— override the pi binary path (default:pi).
MCP registration (example): point your client at node /path/to/dist/src/server.js.
Test
npm test # unit + smoke + (if pi is installed and logged in) integrationAdditional end-to-end scripts in scripts/ (acceptance-test.mjs,
mcp-e2e-test.mjs, dialog-e2e-test.mjs). Issues found during development are
logged in docs/issues/.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityBmaintenanceEnables MCP hosts to delegate coding tasks to Pi CLI as a programmable sub-agent with session tracking and process management.7MIT
- AlicenseAqualityBmaintenanceProvides browser automation, audio transcription, and LLM chat as MCP tools for any agent.7MIT
- Alicense-qualityCmaintenanceWraps Oh My Pi built-in tools (read, write, edit, bash, grep, etc.) as MCP tools, enabling file operations, shell commands, web search, and agent coordination.12Apache 2.0
- Flicense-qualityCmaintenanceExposes Sylvan's MCP tools to a Pi coding agent, enabling management of spaces and developer shells.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Give AI agents real phone numbers, messages, and voice calls via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/turbin/pi-subagent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server