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

pi-mcp-server

v0.1.2

Published

MCP server wrapping the Pi coding agent as tools

Readme

pi-mcp-server

npm version CI License: MIT

MCP server that wraps the Pi coding agent as tools. Use Pi as a sub-agent from Claude Desktop, Cursor, or any MCP client.

Why use this?

Pi is a fast, lightweight coding agent. This server exposes it via MCP so your primary AI can delegate coding tasks to Pi — getting a second opinion, running in parallel, or using a different model.

Installation

npm install -g pi-mcp-server

Or run directly with npx:

npx pi-mcp-server

Quick Start

Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "pi": {
      "command": "npx",
      "args": ["-y", "pi-mcp-server"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "pi": {
      "command": "npx",
      "args": ["-y", "pi-mcp-server"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | PI_MCP_API_KEY | — | API key (auto-mapped to provider-specific env var) | | PI_MCP_PROVIDER | anthropic | LLM provider (anthropic, openai, google, mistral, groq, cerebras, xai, openrouter) | | PI_MCP_MODEL | claude-sonnet-4-20250514 | Model ID | | PI_MCP_THINKING | medium | Thinking level (off, minimal, low, medium, high, xhigh) | | PI_MCP_CWD | process.cwd() | Default working directory | | PI_MCP_TOOLS | read,bash,edit,write | Comma-separated tool list (read, bash, edit, write, grep, find, ls) | | PI_MCP_MAX_SESSIONS | 20 | Maximum concurrent sessions | | PI_MCP_SESSION_IDLE_TIMEOUT | 3600 | Session idle timeout in seconds (0 = no expiry) | | PI_MCP_SANDBOX | false | Enable sandbox mode (requires @anthropic-ai/sandbox-runtime) | | PI_MCP_SANDBOX_ALLOWED_DOMAINS | — | Comma-separated allowed domains for sandbox | | PI_MCP_SANDBOX_DENY_READ | — | Comma-separated paths to deny reading in sandbox | | PI_MCP_SANDBOX_ALLOW_WRITE | — | Comma-separated paths to allow writing in sandbox | | PI_MCP_SANDBOX_DENY_WRITE | — | Comma-separated paths to deny writing in sandbox |

Tools

pi

Start a new Pi coding agent session.

Input:

  • prompt (string, required) — The task or question
  • provider (string, optional) — LLM provider override
  • model (string, optional) — Model ID override
  • thinkingLevel (string, optional) — Thinking level override
  • cwd (string, optional) — Working directory override

Output: Response text prefixed with [thread_id: <uuid>] for follow-up.

pi-reply

Continue an existing session.

Input:

  • threadId (string, required) — Thread ID from a previous pi call
  • prompt (string, required) — Follow-up message

Output: Response text from the agent.

Sandbox Mode

Enable sandbox mode for isolated command execution:

PI_MCP_SANDBOX=true npx pi-mcp-server

Requires the optional dependency @anthropic-ai/sandbox-runtime:

npm install @anthropic-ai/sandbox-runtime

Development

git clone https://github.com/pandysp/pi-mcp-server.git
cd pi-mcp-server
npm install
npm run build
npm test

# Smoke test (requires API key)
ANTHROPIC_API_KEY=sk-ant-... node test/smoke.mjs

License

MIT