Skip to main content
Glama

pi-mcp

MCP-Server, der die Coding-Agent-Tools von pi bereitstellt:

read, bash, edit, write, grep, find, ls

Erstellt mit Bun und @modelcontextprotocol/server v2. Unterstützt sowohl die Ära 2026-07-28 (server/discover) als auch initialize aus der Ära 2025.

Voraussetzungen

  • Bun >= 1.2

  • rg und fd im PATH (verwendet von grep / find; werden nicht heruntergeladen)

Installation

Verwenden Sie einen absoluten Pfad. Übergeben Sie nicht . – Buns globaler Installer kann einen doppelten pi-mcp-Schlüssel und einen leeren Eintrag "": "." in ~/.bun/install/global/package.json / bun.lock schreiben (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 ist ein Alias für bun add -g; der Pfad ist entscheidend. Die Binärdatei landet als pi-mcp im PATH (~/.bun/bin).

Für die lokale Entwicklung verwenden Sie stattdessen bun link in diesem Verzeichnis.

Verwendung

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

Flag

Bedeutung

--stdio

Über stdin/stdout bedienen (Standard)

--http

Streamable HTTP bedienen

--host <host>

HTTP-Bind-Host (Standard 127.0.0.1; impliziert HTTP)

--port <port>

HTTP-Bind-Port (Standard 3000; impliziert HTTP)

--cwd <dir>

Arbeitsverzeichnis der Tools

--readonly

Nur schreibgeschützte Tools registrieren

--tools <names>

Kommagetrennte Teilmenge

--shell <path>

Bash-Programm für bash

--allowed-hosts <h>

Kommagetrennte Host-Namen für den HTTP-DNS-Rebinding-Schutz

--stdio kann nicht mit --http / --host / --port kombiniert werden.

Loggen Sie nach stderr. stdout ist der stdio-Protokollkanal.

Host-Konfiguration (stdio)

{
  "mcpServers": {
    "pi": {
      "command": "pi-mcp",
      "args": ["--cwd", "/path/to/project"]
    }
  }
}

HTTP

pi-mcp --http --host 127.0.0.1 --port 3000

POST JSON-RPC an den Listener. Moderne Clients (2026-07-28) verwenden server/discover sowie den _meta-Envelope pro Anfrage und die Header Mcp-Method / MCP-Protocol-Version. Clients von 2025 verwenden initialize.

Tools

Tool

Rolle

read

Liest eine Textdatei oder ein Bild (offset / limit für große Dateien)

bash

Führt einen Shell-Befehl in --cwd aus

edit

Exakter Textersatz (gleiche Umwandlungen wie pi: JSON-String edits, einzelnes Edit-Objekt, Legacy oldText/newText)

write

Erstellt/überschreibt eine Datei und erstellt übergeordnete Verzeichnisse

grep

Durchsucht Dateiinhalte mit rg

find

Findet Dateien mit fd per Glob

ls

Listet ein Verzeichnis auf

Das Ausführungsverhalten stammt aus den Coding-Agent-Tools von pi. TUI-Rendering, Photon-Bildskalierung und automatische rg/fd-Downloads sind nicht enthalten.

Entwicklung

bun install
bun src/cli.ts --help

Laufzeitabhängigkeiten: @modelcontextprotocol/server, zod, diff.

-
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