@ryan_nookpi/pi-extension-claude-mcp-bridge 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +34 -0
  2. package/index.ts +1562 -0
  3. package/package.json +39 -0
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # claude-mcp-bridge
2
+
3
+ Bridge [Claude Code MCP](https://modelcontextprotocol.io/) server configurations into pi — auto-discovers and registers MCP tools from stdio, SSE, and streamable-HTTP servers.
4
+
5
+ ## What it does
6
+
7
+ - **Config auto-discovery** — scans for MCP settings in priority order:
8
+ - `PI_MCP_CONFIG` env var (single file override)
9
+ - Scoped search from cwd upward: `.pi/mcp.json`, `.mcp.json`, `backend/.mcp.json`, `frontend/.mcp.json`
10
+ - Global: `~/.mcp.json`, `~/.claude.json`
11
+ - First-seen server name wins on duplicates
12
+ - **Server transports** — `stdio`, `sse`, `http` (streamable-HTTP)
13
+ - **Tool registration** — each MCP tool becomes a pi tool named `mcp_<server>_<tool>`
14
+ - **Tool toggle** — enable/disable per-tool via `/mcp-status` overlay; persisted in `~/.pi/agent/claude-mcp-bridge-tools.json`
15
+ - **Auto-reconnect** — exponential backoff on unexpected disconnection (up to 5 attempts)
16
+ - **Status bar** — footer shows `MCP connected/total`
17
+ - **Large payload handling** — responses > 30 KB are saved to a temp file with a truncated preview
18
+
19
+ ## Commands
20
+
21
+ | Command | Description |
22
+ |---------|-------------|
23
+ | `/mcp-status` | Interactive overlay: server list → actions (Tools toggle, Reconnect) |
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ pi install npm:@ryan_nookpi/pi-extension-claude-mcp-bridge
29
+ ```
30
+
31
+ ## Notes
32
+
33
+ - `${ENV_NAME}` in config values are expanded from environment variables.
34
+ - After changing MCP config (add/remove/rename servers), run `/reload`.