pi-mcp-adapter

Proxy MCP server tools to reduce coding agent context bloat.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

pi-mcp-adapter solves the context-window bloat problem caused by exposing hundreds or thousands of MCP tool definitions to an LLM-backed coding agent, slowing decisions and wasting tokens.

Core Features & Use Cases

  • Token-efficient MCP proxy: exposes a single compact proxy tool that discovers MCP capabilities on-demand instead of loading everything at once
  • Lazy loading lifecycle: connects only when tools are actually called, disconnecting after idle time to reduce overhead
  • Direct tool registration options: registers a selected subset of high-priority tools for stronger LLM visibility while keeping the rest proxy-based
  • Standard MCP config support: reads .mcp.json plus ~/.config/mcp/mcp.json and Pi project overrides to minimize manual wiring
  • Interactive Pi configuration: configure and troubleshoot via the /mcp overlay, including reconnection and OAuth triggering
  • OAuth support: supports autoAuth and interactive OAuth flows for servers that require authorization
  • Resource and UI integration: supports MCP resources and can open MCP UI payloads using the MCP UI standard

Quick Start

Add a .mcp.json in your project root with the servers you want, then restart Pi and call the proxy tool mcp to lazily discover and use tools from those servers.

Frequently Asked Questions about pi-mcp-adapter

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

FAQPage Schema
How do I prevent MCP server tool definitions from bloating my coding agent's context window?

To prevent MCP server tool definitions from bloating your coding agent's context window, use a proxy that exposes a single compact tool to lazily discover MCP capabilities on-demand instead of loading all tool definitions at once.

Can I configure Pi to use OAuth-protected MCP servers?

Yes, you can configure Pi to use OAuth-protected MCP servers by utilizing the built-in autoAuth and interactive OAuth flows, which can be triggered and troubleshot via the /mcp overlay interface.

What is the best way to manage MCP server lifecycles for token optimization?

The best way to manage MCP server lifecycles for token optimization is implementing lazy, eager, or keep-alive modes, where lazy loading connects only when tools are actually called and disconnects after idle time to reduce overhead.

How do I load MCP server configurations in Pi?

To load MCP server configurations in Pi, add a .mcp.json file in your project root or use ~/.config/mcp/mcp.json, and the adapter will automatically read these standard configs along with Pi project overrides to minimize manual wiring.

Does direct tool registration provide better LLM visibility than proxy-only mode?

Yes, direct tool registration provides better LLM visibility than proxy-only mode by registering a selected subset of high-priority tools directly, while keeping the remaining large catalog proxy-based to balance visibility and token efficiency.