MCP Catalogs
Home

pi-mcp-adapter

by nicobailon·689·Score 55

Token-efficient MCP adapter for Pi coding agent that reduces context window usage by lazy-loading MCP servers.

developer-toolsai-llmproductivity
122
Forks
56
Open issues
this month
Last commit
2d ago
Indexed

Overview

Pi MCP Adapter addresses the problem of verbose tool definitions that consume excessive context tokens. Instead of loading all MCP server tools upfront, this adapter implements a proxy approach that only connects servers when specific tools are actually needed. It automatically reads standard MCP configuration files from multiple locations including ~/.config/mcp/mcp.json and project-specific .mcp.json files. The adapter supports multiple lifecycle modes: lazy (default), eager, and keep-alive, with configurable idle timeouts and direct tools option for frequently used servers.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Pi developers using multiple MCP servers without burning context window
you:Teams maintaining Pi configurations across different environments
you:Developers integrating MCP UI components with Pi coding agent
you:How does this reduce token usage?
you:What MCP configuration files does it support?

When to choose this

Choose this when using Pi with multiple MCP servers and you're hitting context limits, or when you want to integrate existing MCP configurations without configuration overhead.

When NOT to choose this

Don't choose this if you're not using Pi, or if you prefer all MCP tools to be directly available without proxy discovery.

Tools this server exposes

2 tools extracted from the README
  • mcp

    Proxy tool to access MCP servers on-demand, avoiding context bloat

  • chrome_devtools_take_screenshot

    Take a screenshot of the page or element using Chrome DevTools

Comparable tools

mcp-server-browsermcp-server-githubpi-mono

Installation

pi install npm:pi-mcp-adapter

Or for Claude Desktop:

{
  "pi": {
    "mcpServers": {
      "pi-mcp-adapter": {
        "command": "npx",
        "args": ["pi-mcp-adapter"]
      }
    }
  }
}

FAQ

How does this reduce token usage?
Instead of including full MCP tool definitions (which can be 10k+ tokens), the adapter uses a single proxy tool (~200 tokens) and only connects to actual servers when specific tools are needed.
What MCP configuration files does it support?
The adapter automatically reads ~/.config/mcp/mcp.json, .mcp.json, and Pi-specific overrides (~/.pi/agent/mcp.json and .pi/mcp.json) with a clear precedence order.

Compare pi-mcp-adapter with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.