About pi-server
pi-server is an MCP server published by git+pandysp in the AI category: mCP server that bridges Claude Code and the pi coding agent — spawn, orchestrate, and communicate with pi agents as MCP tools.
The repository has 1 stars and 0 forks.
Install
npx pi-mcp-serverclaude mcp add pi-mcp-server -- npx -y pi-mcp-servernpx -y pi-mcp-serverThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about pi-server
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
4 checks have not been run yet.
README
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.
Installation
npm install -g pi-mcp-server
Or run directly with npx:
npx pi-mcp-server
Quick 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 |
|---|---|---|
PI_MCP_API_KEY |
— | API key (auto-mapped to provider-specific env var) |
PI_MCP_PROVIDER |
anthropic |
LLM provider (anthropic, openai, google, mistral, groq, cerebras, xai, openrouter) |
PI_MCP_MODEL |
claude-sonnet-4-20250514 |
Model ID |
PI_MCP_THINKING |
medium |
Thinking level (off, minimal, low, medium, high, xhigh) |
PI_MCP_CWD |
process.cwd() |
Default working directory |
PI_MCP_TOOLS |
read,bash,edit,write |
Comma-separated tool list (read, bash, edit, write, grep, find, ls) |
PI_MCP_MAX_SESSIONS |
20 |
Maximum concurrent sessions |
PI_MCP_SESSION_IDLE_TIMEOUT |
3600 |
Session idle timeout in seconds (0 = no expiry) |
PI_MCP_SANDBOX |
false |
Enable sandbox mode (requires @anthropic-ai/sandbox-runtime) |
PI_MCP_SANDBOX_ALLOWED_DOMAINS |
— | Comma-separated allowed domains for sandbox |
PI_MCP_SANDBOX_DENY_READ |
— | Comma-separated paths to deny reading in sandbox |
PI_MCP_SANDBOX_ALLOW_WRITE |
— | Comma-separated paths to allow writing in sandbox |
PI_MCP_SANDBOX_DENY_WRITE |
— | 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-server
Requires the optional dependency @anthropic-ai/sandbox-runtime:
npm install @anthropic-ai/sandbox-runtime
Development
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.mjs
License
MIT
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.