pi-mcp-server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
pi-mcp-server
MCP server that wraps the Pi coding agent as tools. Use Pi as a sub-agent from Claude Desktop, Cursor, or any MCP client.
Why use this?
Pi is a fast, lightweight coding agent. This server exposes it via MCP so your primary AI can delegate coding tasks to Pi — getting a second opinion, running in parallel, or using a different model.
Related MCP server: pi-delegate-mcp
Installation
npm install -g pi-mcp-serverOr run directly with npx:
npx pi-mcp-serverQuick Start
Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"pi": {
"command": "npx",
"args": ["-y", "pi-mcp-server"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"pi": {
"command": "npx",
"args": ["-y", "pi-mcp-server"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}Environment Variables
Variable | Default | Description |
| — | API key (auto-mapped to provider-specific env var) |
|
| LLM provider ( |
|
| Model ID |
|
| Thinking level ( |
|
| Default working directory |
|
| Comma-separated tool list ( |
|
| Maximum concurrent sessions |
|
| Session idle timeout in seconds (0 = no expiry) |
|
| Enable sandbox mode (requires |
| — | Comma-separated allowed domains for sandbox |
| — | Comma-separated paths to deny reading in sandbox |
| — | Comma-separated paths to allow writing in sandbox |
| — | Comma-separated paths to deny writing in sandbox |
Tools
pi
Start a new Pi coding agent session.
Input:
prompt(string, required) — The task or questionprovider(string, optional) — LLM provider overridemodel(string, optional) — Model ID overridethinkingLevel(string, optional) — Thinking level overridecwd(string, optional) — Working directory override
Output: Response text prefixed with [thread_id: <uuid>] for follow-up.
pi-reply
Continue an existing session.
Input:
threadId(string, required) — Thread ID from a previouspicallprompt(string, required) — Follow-up message
Output: Response text from the agent.
Sandbox Mode
Enable sandbox mode for isolated command execution:
PI_MCP_SANDBOX=true npx pi-mcp-serverRequires the optional dependency @anthropic-ai/sandbox-runtime:
npm install @anthropic-ai/sandbox-runtimeDevelopment
git clone https://github.com/pandysp/pi-mcp-server.git
cd pi-mcp-server
npm install
npm run build
npm test
# Smoke test (requires API key)
ANTHROPIC_API_KEY=sk-ant-... node test/smoke.mjsLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseCqualityCmaintenanceEnables MCP hosts to delegate coding tasks to Pi CLI as a programmable sub-agent with session tracking and process management.73MIT
- AlicenseNot gradedqualityDmaintenanceDelegates bounded coding tasks from MCP clients to the Pi Coding Agent over stdio. Supports review, verification, implementation, and batch operations with long-running task polling.MIT
- FlicenseAqualityDmaintenanceExposes pi as a sub-agent for MCP-capable coding assistants, enabling task dispatch, messaging, and interactive dialog handling via tools like pi_dispatch, pi_send, and pi_respond.91-
- FlicenseNot gradedqualityDmaintenanceEnables MCP hosts like Claude Code and Codex to spawn, manage, and interact with persistent, reusable Pi coding-agent sessions, supporting task dispatch, status checks, and session lifecycle control.-