npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

v1.3.0

Published

Bridge Claude Code MCP server configs into pi — auto-discovers tools from stdio/sse/http MCP servers.

Readme

claude-mcp-bridge

Bridge Claude Code MCP server configurations into pi — auto-discovers and registers MCP tools from stdio, SSE, and streamable-HTTP servers.

What it does

  • Config auto-discovery — scans for MCP settings in priority order:
    • PI_MCP_CONFIG env var (single file override)
    • Scoped search from cwd upward: .pi/mcp.json, .mcp.json, backend/.mcp.json, frontend/.mcp.json
    • Global: ~/.mcp.json, ~/.claude.json
    • First-seen server name wins on duplicates
  • Protocol compatibility — auto-negotiates the stateless MCP 2026-07-28 protocol over stdio and streamable HTTP, then falls back to the 2025 initialize/session protocol for older servers
  • Server transportsstdio, http (streamable HTTP), plus deprecated sse for legacy-server compatibility
  • Lazy connections — by default the extension factory never waits for MCP servers; background connections start at session_start and tools register dynamically as servers become ready
  • Tool schema cache — cached schemas are registered immediately from ~/.pi/agent/cache/claude-mcp-bridge/tools-v1.json and refreshed after connection
  • Tool registration — each MCP tool becomes a pi tool named mcp__<server>__<tool>
  • Tool toggle — enable/disable per-tool via /mcp-status overlay; persisted in ~/.pi/agent/claude-mcp-bridge-tools.json
  • Auto-reconnect — exponential backoff on unexpected disconnection (up to 5 attempts)
  • Status bar — footer shows connecting, connected, failed, offline, and cached states
  • Large payload handling — responses > 30 KB are saved to a temp file with a truncated preview

Commands

| Command | Description | |---------|-------------| | /mcp-status | Interactive overlay: server list → actions (Tools toggle, Reconnect) |

Install

pi install npm:@ryan_nookpi/pi-extension-claude-mcp-bridge

Runtime controls

| Environment variable | Behavior | |----------------------|----------| | PI_OFFLINE=1 | Skip connections and reconnect timers while keeping matching cached tool schemas available | | PI_MCP_EAGER=1 | Wait for MCP connections during extension load (temporary rollback path) | | PI_MCP_CONNECT_TIMEOUT_MS | Override the per-server connection timeout (default: 30000 ms) | | PI_MCP_PROTOCOL_PROBE_TIMEOUT_MS | Override the stdio server/discover probe timeout for slow modern servers (default: min of 10000 ms and half the connection timeout) | | PI_MCP_TOOL_TIMEOUT_MS | Override the MCP tool call timeout (default: 60000 ms) |

Protocol compatibility

For stdio and streamable HTTP servers, the bridge uses the official TypeScript SDK's versionNegotiation: { mode: "auto" } flow:

  1. Probe with server/discover for MCP 2026-07-28.
  2. Use stateless, self-describing requests when the server supports it.
  3. Fall back to the legacy initialize handshake when the server only supports a 2025-era protocol.

The stdio probe uses a shorter timeout than the full connection by default so a silent legacy server still has time to complete its initialize handshake. Set PI_MCP_PROTOCOL_PROBE_TIMEOUT_MS higher when a modern stdio server legitimately needs more than 10 seconds to start.

Explicit type: "sse" configurations stay on the legacy protocol because HTTP+SSE is deprecated and does not support the new stateless transport model. See the MCP 2026-07-28 changelog and the TypeScript SDK protocol version guide.

Notes

  • Node.js 20 or newer is required by the MCP TypeScript SDK v2.
  • ${ENV_NAME} in config values are expanded from environment variables.
  • Cache fingerprints include only server names, transport types, URL hosts, and redacted command structure. Header and environment values are never persisted.
  • URL paths and command argument values are intentionally excluded from fingerprints. Matching cached schemas can be briefly stale until live discovery refreshes them; rename the server or remove the cache before an offline-only run after such changes.
  • Cache files are replaced atomically after every changed live tool discovery.
  • A cached tool called before its server is ready waits for the existing connection attempt instead of starting a duplicate process.
  • After changing MCP config (add/remove/rename servers), run /reload.