pi-mcp-extension weekly downloads statistics
By irahardianto · npm · MCP servers
MCP (Model Context Protocol) client extension for the Pi coding agent — connect Pi to any MCP server
pi-mcp-extension has 104,764 recorded weekly downloads on npm, an increase of 444% over the past 30 days, ranking #469 of 2,391 tracked listings.
About pi-mcp-extension
pi-mcp-extension
Connect Pi to any MCP server. Supabase, DeepSource, Playwright, Context7, filesystem, databases — if it speaks MCP, Pi can use it.
pi-mcp-extension is a production-ready Model Context Protocol client extension for the Pi coding agent. It manages server connections, discovers tools, and bridges them into Pi so the LLM can call them directly.
Features
- Multi-transport —
stdiosubprocesses,streamable-http(including"http"and URL-only shorthand), and legacysseout of the box - Auto-discovery — Paginated
tools/listwith cursor following (MCP 2025-03-26 spec) - Live tool refresh —
notifications/tools/list_changedtriggers re-discovery without restart - Clean cancellation —
AbortSignalpropagation vianotifications/cancelled - Smart reconnection — Fixed delay retry schedule (1s → 3s → 5s → 10s → 30s), configurable max retries, and automatic recovery when a server transport closes unexpectedly
- Health checks — Opt-in periodic pings to detect stale connections
- Safe process lifecycle — Child PID tracking (
StdioClientTransport.pid) with safety-netSIGKILLfor orphaned subprocesses - Stable tool names — Sanitized, collision-avoiding names (max 64 chars) that stay constant across reconnects
- No tool churn — Activate/deactivate pattern ensures tools don't flicker during reconnection
- Layered config & trust boundary — Global
<agent dir>/mcp.json, project.pi/mcp.json(loaded only in trusted projects viactx.isProjectTrusted()), and Pi 1.x extension-registered servers (pi.registerMcpServer()) - Rich tool results & annotations — MCP
imagecontent passthrough (ImageContent), plusreadOnlyHint,destructiveHint,idempotentHint,openWorldHintsurfaced in tool descriptions - On-demand agent tools & commands —
mcp_statusandmcp_connectagent tools plus/mcp,/mcp:start,/mcp:stop, and/mcp:authslash commands with server-name autocomplete - Structured error handling — Distinct error codes for config, connection, protocol, and tool-level failures
- OAuth 2.1 — Browser and headless/SSH authorization with PKCE, protected-resource discovery, Dynamic Client Registration, startup prompts for eager servers, cross-process lock recovery, token refresh, and secure local persistence (see OAUTH.md)
Installation
pi install npm:pi-mcp-extension
Or try without installing:
pi -e npm:pi-mcp-extension
Quick Start
-
Install the extension:
pi install npm:pi-mcp-extension -
(Pi 1.x) Disable Pi's built-in
mcpextension so Pi does not warn that both extensions are enabled at the same time — either runpi configand uncheckmcpunder Built-in extensions, or add"extensions": ["-builtin:mcp"]to~/.pi/agent/settings.json:{ "extensions": [ "-builtin:mcp" ] } -
Create a config file at
~/.pi/agent/mcp.json(global) or.pi/mcp.json(project-level):{ "mcpServers": { "supabase": { "transport": "streamable-http", "url": "https://mcp.supabase.com/mcp", "lifecycle": "eager" } } } -
Start Pi — your MCP tools are ready. Use
/mcpto check server status.
Configuration
Servers can be configured via JSON files or registered programmatically by other Pi 1.x extensions:
| Source | Precedence & Scope |
|---|---|
.pi/mcp.json | Highest — Project-level overrides per server and per explicitly stated setting. Loaded on session_start only when the project is trusted (ctx.isProjectTrusted()); never read at bootstrap or in untrusted projects. |
~/.pi/agent/mcp.json | Global — Applies to all projects (honors $PI_CODING_AGENT_DIR with ~ expansion when set: <agent dir>/mcp.json). |
pi.registerMcpServer() | Extension-registered — Discovered via pi.getMcpServers() and updated live on mcp_servers_change events when replacing builtin:mcp. Any server with the same name in mcp.json takes precedence. |
Full Example
{
"settings": {
"toolPrefix": "mcp", // Tools appear as mcp_<server>_<tool> (default: "mcp")
"requestTimeoutMs": 30000, // Per-request timeout in ms (default: 30000)
"maxRetries": 5 // Max reconnection attempts, 0-10 (default: 5)
},
"mcpServers": {
// ── HTTP-based servers ───────────────────────────────────────────────────
"supabase": {
"transport": "streamable-http",
"url": "https://mcp.supabase.com/mcp",
"auth": {
"type": "oauth"
},
"lifecycle": "eager"
},
"deepsource": {
"url": "https://mcp.deepsource.io/mcp", // "transport" defaults to "streamable-http" when "url" is set
"lifecycle": "eager"
},
// ── Legacy SSE servers ───────────────────────────────────────────────────
"legacy-server": {
"transport": "sse",
"url": "https://example.com/sse",
"lifecycle": "lazy"
},…
Description from the npm listing.
- pi-package
- mcp
- model-context-protocol
- pi
- pi-extension
- ai-agent
- tool-bridge
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm MCP servers plugins
All 20 pi-mcp-extension alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/pi-mcp-extension. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.