pi-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-mcpfind all JavaScript files in src"
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-mcp
MCP server that exposes pi coding-agent tools:
read, bash, edit, write, grep, find, ls
Built with Bun and @modelcontextprotocol/server v2. Serves both the 2026-07-28 era (server/discover) and 2025-era initialize.
Requirements
Bun >= 1.2
rgandfdonPATH(used bygrep/find; not downloaded)
Install
Use an absolute path. Do not pass . — Bun's global installer can write a
duplicate pi-mcp key and an empty "": "." entry into
~/.bun/install/global/package.json / bun.lock
(oven-sh/bun#19559,
oven-sh/bun#24207).
bun add -g /absolute/path/to/pi-mcp
# same thing from the checkout:
bun add -g "$(pwd)"bun install -g is an alias of bun add -g; the path is what matters.
The binary lands on PATH as pi-mcp (~/.bun/bin).
For local development, bun link in this directory instead.
Usage
pi-mcp # stdio (default)
pi-mcp --http --port 3000 # Streamable HTTP
pi-mcp --cwd /path/to/project
pi-mcp --readonly # read, grep, find, ls
pi-mcp --tools read,grep,ls
pi-mcp --shell /bin/bashFlag | Meaning |
| Serve over stdin/stdout (default) |
| Serve Streamable HTTP |
| HTTP bind host (default |
| HTTP bind port (default |
| Tool working directory |
| Register only read-only tools |
| Comma-separated subset |
| Bash executable for |
| Comma-separated |
--stdio cannot be combined with --http / --host / --port.
Log to stderr. stdout is the stdio protocol channel.
Host config (stdio)
{
"mcpServers": {
"pi": {
"command": "pi-mcp",
"args": ["--cwd", "/path/to/project"]
}
}
}HTTP
pi-mcp --http --host 127.0.0.1 --port 3000POST JSON-RPC to the listener. Modern (2026-07-28) clients use server/discover plus the per-request _meta envelope and Mcp-Method / MCP-Protocol-Version headers. 2025 clients use initialize.
Tools
Tool | Role |
| Read a text file or image ( |
| Run a shell command in |
| Exact text replacement (same coercions as pi: JSON-string |
| Create/overwrite a file, creating parent directories |
| Search file contents with |
| Glob files with |
| List a directory |
Execute behavior is taken from pi's coding-agent tools. TUI rendering, photon image resizing, and automatic rg/fd downloads are not included.
Development
bun install
bun src/cli.ts --helpRuntime dependencies: @modelcontextprotocol/server, zod, diff.
This server cannot be installed
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 Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server exposing the Backtest360 engine API as tools for AI agents.
A MCP server built for developers enabling Git based project management with project and personal…
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/zhaob1n/pi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server