pi-mcp
pi-mcp
pi のコーディングエージェントツールを公開する MCP サーバー:
read、bash、edit、write、grep、find、ls
Bun と @modelcontextprotocol/server v2 で構築されています。2026-07-28 世代(server/discover)と 2025 世代の initialize の両方に対応しています。
要件
Bun >= 1.2
PATH上のrgとfd(grep/findで使用。ダウンロードはされません)
インストール
絶対パスを使用してください。. を渡さないでください — Bun のグローバルインストーラーが ~/.bun/install/global/package.json / bun.lock に重複した pi-mcp キーと空の "": "." エントリを書き込む可能性があります(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 は bun add -g のエイリアスです。重要なのはパスです。バイナリは pi-mcp として PATH に配置されます(~/.bun/bin)。
ローカル開発では、代わりにこのディレクトリで bun link を実行してください。
使い方
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/bashフラグ | 意味 |
| stdin/stdout で提供(デフォルト) |
| Streamable HTTP で提供 |
| HTTP バインドホスト(デフォルト |
| HTTP バインドポート(デフォルト |
| ツールの作業ディレクトリ |
| 読み取り専用ツールのみを登録 |
| カンマ区切りのサブセット |
|
|
| HTTP DNS リバインディング保護用のカンマ区切り |
--stdio は --http / --host / --port と組み合わせることはできません。
ログは stderr に出力します。stdout は stdio プロトコルのチャネルです。
ホスト設定(stdio)
{
"mcpServers": {
"pi": {
"command": "pi-mcp",
"args": ["--cwd", "/path/to/project"]
}
}
}HTTP
pi-mcp --http --host 127.0.0.1 --port 3000リスナーに JSON-RPC を POST します。最新(2026-07-28)のクライアントは server/discover に加えて、リクエストごとの _meta エンベロープと Mcp-Method / MCP-Protocol-Version ヘッダーを使用します。2025 年のクライアントは initialize を使用します。
ツール
ツール | 役割 |
| テキストファイルまたは画像を読み取る(大きなファイルには |
|
|
| 正確なテキスト置換(pi と同じ強制変換:JSON 文字列の |
| ファイルを作成 / 上書きし、親ディレクトリも作成 |
|
|
|
|
| ディレクトリを一覧表示 |
実行動作は pi のコーディングエージェントツールから取られています。TUI レンダリング、photon 画像リサイズ、rg / fd の自動ダウンロードは含まれていません。
開発
bun install
bun src/cli.ts --helpランタイム依存関係:@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