pi-mcp-client

extensionmaintained

MCP tools for Pi, discovered on demand and called natively through the official SDK.

by — · v0.10.0 · published 21h ago

$ pi install npm:pi-mcp-client
downloads/mo
1.1K
stars
1
last push
21h ago
open issues
0

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

No downloads in the last 12 weeks.

README

🔌 Pi MCP Client

Connect Pi to MCP servers so the model can use their tools and read their resources. You can also browse, preview, and use server-provided prompts.

🚀 Installation

pi install npm:pi-mcp-client

✨ Usage

Start a new Pi session, then add Cloudflare's public documentation server:

/mcp add --scope global cloudflare-docs https://docs.mcp.cloudflare.com/mcp

This server doesn't require credentials. Ask Pi:

Search Cloudflare's documentation for how to deploy a Worker.

You configure servers and sign in when needed. The model finds and uses relevant tools and resources—you don't need to select tools before asking a question. When a server needs more information during a tool call, Pi asks you directly and sends only what you submit. See server requests for input.

Use these commands in Pi to manage your connections:

CommandPurpose
/mcpCheck connection status, available-tool counts, and tools loaded for the model when troubleshooting or checking your setup.
/mcp login <server>Sign in to an HTTP server. Only this command opens the login browser.
/mcp prompt <server> [name] [argument=value ...]Browse prompts or open one by name, then review a preview before using it.
/mcp reloadApply changes after editing your MCP configuration files.

Only configure servers you trust: local servers and secret commands run with your permissions. Tool activation isn't a per-call approval prompt. See trust and permissions.

⚙️ Configuration

Store server definitions in ~/.pi/agent/mcp.json or a trusted project's .mcp.json. Project servers load only after an explicit trust decision. Project definitions replace same-named global definitions in full. You can edit these files or use /mcp add and /mcp remove. To reuse a Claude/Cursor JSON or Codex TOML file, run /mcp import --scope global <path> and review the selected connections before saving.

Detailed guides:

  • Configuration: HTTP and stdio servers, environment variables, secret commands, tool filters, and timeouts.
  • Authentication: OAuth setup, pre-registered clients, remote login, and logout.
  • Commands: Server management, tool browsing, prompt selection, and resource watches. These are commands you run in Pi.
  • Tool reference: Discovery, activation, resource reads, and argument completions. This is the model's interface, not a user API.
  • Behavior: When servers connect, when tools become available, and what permissions they have.
  • Troubleshooting: Error codes, recovery, and large results.

🧰 Requirements

  • Pi 0.85.1 or later.
  • Node.js 22 or later.
  • The server executable for stdio connections.
  • An available OS credential store for OAuth. Linux requires a working Secret Service/keyring session.

📄 License

MIT