Skip to main content
skill CX Codex

pi-mcp-adapter — Claude Code skill: what it does, how to install

pi-mcp-adapter is a skill for the Pi agent that connects MCP servers through one proxy tool instead of loading hundreds of definitions into context. Servers connect on demand.

no license 202 installs ★ 9 updated 2026-10-09

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/mcp-skills --skill pi-mcp-adapter -a claude-code
Open on GitHub

What pi-mcp-adapter does

This skill drops an MCP adapter into the Pi coding agent. A big server would otherwise dump 10k+ tokens of tool definitions into the window; here Pi sees a single mcp proxy of roughly 200 tokens and uses it to search, describe or run a tool. Connections open on demand, so the window stays clear. Inside Pi the adapter itself goes in with pi install npm:pi-mcp-adapter, then Pi restarts.

Configs stack across four files: ~/.config/mcp/mcp.json, ~/.pi/agent/mcp.json, .mcp.json and .pi/mcp.json, later ones overriding earlier. An entry is either a launch command with args and env, or a URL for HTTP/SSE with headers. OAuth works too: with autoAuth: true the handshake runs on the first tool call, otherwise open /mcp and press Enter or ctrl+a.

Switch on directTools and the schemas land in the system prompt, each one costing 150-300 tokens. On a server with hundreds of tools that cancels the savings, so keep the list to what you call constantly. excludeTools hides the rest, and lifecycle picks between lazy, eager and keep-alive. The default idleTimeout is 10 minutes, and zero turns it off.

What it helps with

  • wire an MCP server into Pi without flooding the context window
  • keep idle servers from holding a connection open
  • expose only the tools the agent actually calls
  • run the OAuth handshake for a server on first use
  • layer project and global MCP configs in the right order

Example prompts for the agent

  • Hook the chrome-devtools MCP server into Pi with pi-mcp-adapter, keep it on the proxy.
  • Add a github entry to .mcp.json and pull the token from GITHUB_TOKEN.
  • Turn on OAuth with autoAuth for google-drive so the login happens on the first call.

How to install pi-mcp-adapter

1Skills CLI (Vercel)

npx skills add reason-machines/mcp-skills --skill pi-mcp-adapter -a claude-code

2Manually: put the files in place

~/.claude/skills/pi-mcp-adapter/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pi-mcp-adapter/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pi-mcp-adapter

How do I install pi-mcp-adapter in Claude Code?

Run npx skills add reason-machines/mcp-skills --skill pi-mcp-adapter -a claude-code. The skill file lands at ~/.claude/skills/pi-mcp-adapter/SKILL.md.

What does pi-mcp-adapter do?

It puts one mcp proxy tool in front of your MCP servers and connects to a server only when a tool from it is called. Tool lookup, schemas and execution all go through that single tool.

Which MCP config file wins when several exist?

Order is ~/.config/mcp/mcp.json, then ~/.pi/agent/mcp.json, then .mcp.json, then .pi/mcp.json. A later file overrides the earlier ones.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set98

The whole set →
kagi-session2api-mcp-server The kagi-session2api-mcp-server skill guides setup of a Kagi MCP server for web searches and URL summaries. Use it when you want an agent to find online sources or condense an article. CX Codex +1 207installs datagouv-mcp-server The datagouv-mcp-server skill lets an agent search and inspect French open-data datasets through the data.gouv.fr MCP server. Use it for dataset, organization, and resource questions. CX Codex +1 206installs stitch-mcp-cli stitch-mcp-cli brings Google Stitch UI designs into local dev workflows. Runs dev server previews, builds Astro sites, and feeds screens to coding agents via MCP. CX Codex +1 205installs universal-db-mcp-connector The universal-db-mcp-connector skill stands up an MCP server against your database, so the assistant writes and runs queries itself. It covers 17 database types, among them MySQL, PostgreSQL and MongoDB. CX Codex +1 203installs cheatengine-mcp-bridge cheatengine-mcp-bridge connects an AI agent to Cheat Engine over MCP for memory reads, pointer scans, code analysis, and debugging. Useful for automating reverse-engineering tasks. CX Codex +1 201installs matlab-mcp-core-server The matlab-mcp-core-server skill gives your coding assistant a MATLAB connection through MathWorks' MCP server: run scripts, check .m files statically, list toolboxes, attach to an open session. CX Codex +1 201installs modular-rag-mcp-server This skill guides the deployment and configuration of a modular RAG system exposed to assistants through MCP. Use it when connecting an assistant to a document knowledge base. CX Codex +1 199installs figma-mcp-server Teaches an agent to read Figma files over MCP: frame-to-code, design tokens, and beta writes back to the canvas. CX Codex +1 195installs

Project sponsors

Companies that keep this analytics open