</>MCP Agents Market
MCP Server

pi-mcp-adapter

by nicobailon1.3kTypeScriptUpdated 2026-08-23

Token-efficient MCP adapter for Pi coding agent

Pi

Pi MCP Adapter is a token-efficient bridge that connects the Pi coding agent to MCP servers without consuming excessive context window space. Instead of exposing hundreds of individual tool definitions (which can burn 10k+ tokens per server), it provides a single 200-token proxy tool that discovers and invokes MCP tools on-demand. The adapter supports lazy server connections, caches tool metadata for offline search, and offers flexible configuration through standard MCP files like .mcp.json and ~/.config/mcp/mcp.json. Developers can selectively promote specific tools to direct registration via directTools configuration, balancing discoverability with context efficiency.

Key Features

Single proxy tool (~200 tokens) replaces hundreds of individual MCP tool definitions to preserve context
Lazy server connections that spawn only when tools are actually called, with configurable idle timeout
Cached tool metadata enables search, list, and describe operations without live server connections
Direct tool registration option to expose specific MCP tools individually alongside native Pi tools
Supports stdio, HTTP (Streamable/SSE), and Unix socket MCP server transports with OAuth and bearer token auth
Interactive /mcp panel for managing servers, toggling direct/proxy modes, and handling OAuth flows
Search-activated direct tools mode registers tools as inactive until mcp({search}) activates matches
MCP UI integration opens server-provided interactive UIs in native windows (macOS Glimpse) or browser iframes

Use Cases

  • 01Connect Pi coding agent to databases, browsers, and API MCP servers while minimizing token usage
  • 02Enable multi-server MCP workflows without exhausting the context window before conversation starts
  • 03Selectively expose critical MCP tools as direct Pi tools for immediate LLM visibility
  • 04Manage OAuth-protected MCP servers with automated credential storage and refresh flows
  • 05Search across all available MCP tools without maintaining live connections to every server
  • 06Run interactive MCP UIs for visualizations, dashboards, or bidirectional agent-app collaboration

Related MCP Servers

View more

pi-mcp-adapter — FAQ

What is pi-mcp-adapter?+

Pi MCP Adapter is an MCP client extension for the Pi coding agent that provides token-efficient access to MCP servers through a proxy tool pattern. It reduces context overhead from 10k+ tokens per server to ~200 tokens while maintaining full MCP functionality.

How do I install pi-mcp-adapter?+

Run 'pi install npm:pi-mcp-adapter' and restart Pi. On first run, use /mcp setup to configure servers or create a .mcp.json file in your project with mcpServers definitions.

Which AI clients work with this adapter?+

This adapter is designed specifically for the Pi coding agent. It can also run in DeepSeek Harness via the pi2dsh bridge for third-party compatibility.

Do I need API keys or credentials?+

API key requirements depend on the MCP servers you connect to. The adapter itself supports OAuth and bearer token authentication, with credentials stored in the OS credential store or encrypted files.

Is pi-mcp-adapter free to use?+

Yes, the adapter is open source and free. However, individual MCP servers may have their own licensing, API costs, or access requirements.

What's the difference between proxy mode and direct tools?+

Proxy mode accesses all MCP tools through a single mcp() tool using on-demand discovery (~200 tokens). Direct tools register specific MCP tools individually in Pi's tool list (150-300 tokens each) for immediate LLM visibility without discovery.

How do I install pi-mcp-adapter?+

Open the source repository on GitHub and follow its README. pi-mcp-adapter is a mcp server — MCP Agents Market links you directly to the official repo.

Is pi-mcp-adapter free?+

pi-mcp-adapter is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches