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

@yofriadi/pi-mcp

v0.1.3

Published

Standalone MCP extension package for pi installs

Readme

MCP Extension

Install from git URL

pi install git:github.com/yofriadi/pi-extensions@mcp-v<version>

To load only this extension from the monorepo package source, use package filtering in settings:

{
  "packages": [
    {
      "source": "git:github.com/yofriadi/pi-extensions@mcp-v<version>",
      "extensions": ["packages/mcp/src/index.ts"]
    }
  ]
}

Standalone MCP extension package for pi and the Bun fork workflow.

This package provides:

  • MCP config discovery and validation
  • MCP runtime with stdio and HTTP JSON-RPC transport support
  • HTTP session header propagation (Mcp-Session-Id) and SSE response parsing for streamable MCP endpoints
  • MCP manager lifecycle orchestration (startup/reload/shutdown)
  • MCP command/tool utilities and discovered-tool bridge registration

Install and Load

Upstream pi

# Load extension for one run
pi -e ./packages/coding-agent/examples/extensions/mcp

# Persist extension as an installed package source
pi install ./packages/coding-agent/examples/extensions/mcp

Bun fork source workflow

# Run coding-agent CLI directly via Bun with extension loaded
bun packages/coding-agent/src/cli.ts -e ./packages/coding-agent/examples/extensions/mcp

Configuration

Native config merge order

The resolver loads files in this order (later entries override earlier by server name):

  1. ~/.pi/agent/mcp.json
  2. <cwd>/.mcp.json
  3. <cwd>/.pi/mcp.json

Supported top-level shapes:

  • mcpServers object
  • servers object
  • servers array ([{ "name": "...", ... }])

Example:

{
  "mcpServers": {
    "context7": {
      "transport": "stdio",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"],
      "timeoutMs": 30000
    },
    "mcp.grep.app": {
      "transport": "http",
      "url": "https://mcp.grep.app",
      "timeoutMs": 30000
    }
  }
}

Optional external discovery adapters (opt-in)

By default, external Claude/Cursor configs are ignored.

To opt in:

export PI_MCP_DISCOVERY_ADAPTERS=claude,cursor

Supported adapter values:

  • claude
  • cursor
  • none (disables adapter loading)

Adapter-derived servers are loaded before native pi config files, so native pi files can override imported definitions.

Commands

  • /mcp-status show manager/runtime/config/tool-cache health
  • /mcp-tools <server> list MCP tools from one server
  • /mcp-call <server> <method> [jsonParams] issue JSON-RPC call
  • /mcp-reload reload config and restart MCP runtime

Agent Tools

  • mcp_list_tools
  • mcp_call

At startup/reload, discovered MCP tools are bridged into regular agent tools with stable names (for example: mcp_context7_resolve_library_id).

Security Notes

  • Only configure MCP servers you trust. MCP tools can execute external processes or requests.
  • Review local config files before enabling adapters (PI_MCP_DISCOVERY_ADAPTERS) because this imports external definitions.
  • Prefer pinned commands/versions (for example explicit npm package versions) when possible.
  • Treat MCP server output as untrusted input in downstream prompts and scripts.

Troubleshooting

No MCP servers appear

  1. Run /mcp-status.
  2. Check Configured servers and Diagnostics output.
  3. Verify file paths and JSON validity for ~/.pi/agent/mcp.json, .mcp.json, or .pi/mcp.json.

Server is configured but not active

  1. Run /mcp-status and inspect the server reason.
  2. For stdio servers, verify command + args locally.
  3. For HTTP servers, verify endpoint accepts JSON-RPC POST and returns valid responses.

Tool bridge did not register expected tools

  1. Run /mcp-status and inspect Discovered MCP tools and Bridged MCP tools.
  2. Run /mcp-tools <server> to confirm server tools/list output.
  3. Run /mcp-reload after config/server changes.

Adapter-based discovery not working

  1. Confirm PI_MCP_DISCOVERY_ADAPTERS is set in the runtime environment.
  2. Use supported values only: claude,cursor.
  3. Re-run /mcp-reload and inspect /mcp-status diagnostics for unknown adapter warnings.