Skip to main content
Glama

pi-mcp

pi のコーディングエージェントツールを公開する MCP サーバー:

readbasheditwritegrepfindls

Bun と @modelcontextprotocol/server v2 で構築されています。2026-07-28 世代(server/discover)と 2025 世代の initialize の両方に対応しています。

要件

  • Bun >= 1.2

  • PATH 上の rgfdgrep / find で使用。ダウンロードはされません)

インストール

絶対パスを使用してください。. を渡さないでください — Bun のグローバルインストーラーが ~/.bun/install/global/package.json / bun.lock に重複した pi-mcp キーと空の "": "." エントリを書き込む可能性があります(oven-sh/bun#19559oven-sh/bun#24207)。

bun add -g /absolute/path/to/pi-mcp
# same thing from the checkout:
bun add -g "$(pwd)"

bun install -gbun 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

フラグ

意味

--stdio

stdin/stdout で提供(デフォルト)

--http

Streamable HTTP で提供

--host <host>

HTTP バインドホスト(デフォルト 127.0.0.1。HTTP を意味します)

--port <port>

HTTP バインドポート(デフォルト 3000。HTTP を意味します)

--cwd <dir>

ツールの作業ディレクトリ

--readonly

読み取り専用ツールのみを登録

--tools <names>

カンマ区切りのサブセット

--shell <path>

bash 用の Bash 実行ファイル

--allowed-hosts <h>

HTTP DNS リバインディング保護用のカンマ区切り Host

--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 を使用します。

ツール

ツール

役割

read

テキストファイルまたは画像を読み取る(大きなファイルには offset / limit

bash

--cwd でシェルコマンドを実行

edit

正確なテキスト置換(pi と同じ強制変換:JSON 文字列の edits、単一の編集オブジェクト、レガシー oldText / newText

write

ファイルを作成 / 上書きし、親ディレクトリも作成

grep

rg でファイル内容を検索

find

fd でファイルをグロブ

ls

ディレクトリを一覧表示

実行動作は pi のコーディングエージェントツールから取られています。TUI レンダリング、photon 画像リサイズ、rg / fd の自動ダウンロードは含まれていません。

開発

bun install
bun src/cli.ts --help

ランタイム依存関係:@modelcontextprotocol/serverzoddiff

-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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…

View all MCP Connectors

Latest Blog Posts

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