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で使用。ダウンロードはされません)
Related MCP server: emcp
インストール
絶対パスを使用してください。. を渡さないでください — 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 deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for agentverse documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA comprehensive MCP server providing secure tools for filesystem operations, Git management, web search, document conversion, npm/.NET project management, and AI generative capabilities (image/video/audio generation and processing) via PiAPI.ai integration.Apache 2.0
- FlicenseNot gradedqualityDmaintenanceMCP server providing filesystem operations, shell execution, and web search capabilities.-
- FlicenseAqualityDmaintenanceA simple MCP server that exposes a terminal tool, allowing AI agents to execute shell commands.1-
- AlicenseNot gradedqualityCmaintenanceLocal MCP server enabling Codex and ChatGPT to read/write files, execute commands, manage processes, use Git, and inspect images on the user's machine with full privileges.Apache 2.0