pi-mcp-adapter

Proxies MCP servers for the Pi coding agent through a single token-efficient tool.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill pi-mcp-adapter-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pi-mcp-adapter
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/pi-mcp-adapter
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill pi-mcp-adapter-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Connecting multiple MCP servers to the Pi coding agent normally floods the context window with hundreds of tool definitions, often 10k+ tokens per server. This Skill replaces that with one ~200 token proxy tool that discovers and calls MCP capabilities on demand, keeping the agent's context clean. ## Core Features & Use Cases - Proxy Tool Mode: Search, describe, list, and execute MCP tools through a single mcp proxy instead of registering every tool individually. - Direct Tool Registration: Promote 5-20 high-priority tools to first-class agent tools, with per-server or global defaults and exclusion lists. - Lifecycle & OAuth Management: Configure lazy, eager, or keep-alive server lifecycles with idle timeouts, plus automated OAuth flows for authenticated servers. - Use Case: A developer connects chrome-devtools, GitHub, and Postgres MCP servers to Pi, registers only screenshot and issue-creation tools directly, and lets everything else lazy-load through the proxy, avoiding context bloat. ## Quick Start Install the adapter with 'pi install npm:pi-mcp-adapter', then ask the agent to create a .mcp.json configuring your MCP servers and search for available tools through the mcp proxy.

Frequently Asked Questions about pi-mcp-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use MCP servers with the Pi coding agent?▼

Install pi-mcp-adapter with 'pi install npm:pi-mcp-adapter' and restart Pi. The adapter auto-detects standard MCP config files like .mcp.json, and all server tools become accessible through the single mcp proxy tool.

How to configure an MCP server in .mcp.json?▼

Add an entry under mcpServers with the server's command and args, for example npx with -y chrome-devtools-mcp@latest. HTTP servers use a url field instead, and env supports ${VAR} interpolation for secrets.

Does pi-mcp-adapter support OAuth authentication for MCP servers?▼

Yes, set auth to oauth in the server config with a grantType of authorization_code or client_credentials. With autoAuth enabled the flow runs automatically on first tool call, otherwise trigger it from the /mcp overlay.

What is the difference between proxy mode and direct tools?▼

Proxy mode routes all calls through one ~200 token mcp tool, while directTools registers specific tools individually at roughly 150-300 tokens each. Direct registration suits 5-20 high-priority tools; proxy mode keeps context minimal for everything else.

Why is my MCP server not connecting in Pi?▼

Validate your .mcp.json syntax with jq, enable per-server debug output with the debug flag, and force a reconnect via /mcp or mcp({ action: "reconnect", server: "name" }). Also confirm required environment variables are exported.

How do I reduce token usage from too many MCP tools?▼

Set directTools to false so servers stay proxy-only, or list only the specific tools you need in the directTools array. You can also set disableProxyTool once all needed direct tools are cached.