pi-mcp-adapter
Token-efficient MCP adapter for Pi coding agent
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
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 moremarkitdown
Python tool for converting files and office documents to Markdown.
firecrawl
The context API to search, scrape, and interact with the web at scale. 🔥
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
langflow
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
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.