Repolode
nicobailon

nicobailon/pi-mcp-adapter

An adapter that lets the Pi coding agent use MCP servers through one proxy tool, so idle tool definitions don't fill the context window.

Stars
1,642
Forks
393
Open issues
0
Last commit
yesterday

What is it?

pi-mcp-adapter connects the Pi coding agent to Model Context Protocol (MCP) servers. Instead of loading every tool definition into the model's context, it exposes one proxy tool of roughly 200 tokens, and the agent searches for and calls the tools it needs on demand.

Servers are lazy by default: they start when first called and stop after 10 idle minutes. The adapter reads standard MCP config files such as .mcp.json and can import server configs from Cursor, Claude Code, Codex, and VS Code. It supports stdio, streamable HTTP, legacy SSE, and rmcp-mux transports, OAuth sign-in with tokens stored in the OS keychain, and MCP prompts, elicitation, sampling, and Tasks.

The project is a TypeScript extension installed with npm and targets Pi 0.99 and later, replacing Pi's built-in MCP support in Pi sessions.

Key features

  • 01Exposes one proxy tool instead of loading every MCP tool definition into context
  • 02Starts servers lazily and stops them after 10 idle minutes
  • 03Imports server configs from Cursor, Claude Code, Codex, and VS Code
  • 04Supports stdio, streamable HTTP, legacy SSE, and rmcp-mux transports
  • 05Stores OAuth tokens in the OS keychain
  • 06Optional semantic tool search with a System One key

Use cases

  • Giving a coding agent access to databases, browsers, or APIs via MCP without context bloat
  • Installing many MCP servers while paying only for the ones actually in use
  • Reusing MCP server configs already set up in Cursor or Claude Code

Quick start

  1. 1

    Install the adapter into Pi

    pi install npm:pi-mcp-adapter
  2. 2

    Restart Pi after installation

  3. 3

    Add a server to .mcp.json in your project (see README example)

Things to know

  • It only works with the Pi coding agent, not as a standalone MCP client.
  • Semantic tool search requires a System One key; word and regex search work without one.

In collections

Topics

FAQ

What is pi-mcp-adapter?
An adapter that lets the Pi coding agent use MCP servers through one proxy tool, so idle tool definitions don't fill the context window. pi-mcp-adapter connects the Pi coding agent to Model Context Protocol (MCP) servers. Instead of loading every tool definition into the model's context, it exposes one proxy tool of roughly 200 tokens, and the agent searches for and calls the tools it needs on demand.
Is pi-mcp-adapter free to use? What license does it have?
pi-mcp-adapter is open source under the MIT license. Check the license terms before using it in commercial products.
Is pi-mcp-adapter still maintained?
Actively maintained. The last commit to pi-mcp-adapter was on Nov 6, 2026.
What can I use pi-mcp-adapter for?
Giving a coding agent access to databases, browsers, or APIs via MCP without context bloat Installing many MCP servers while paying only for the ones actually in use Reusing MCP server configs already set up in Cursor or Claude Code
How do I install pi-mcp-adapter?
Install the adapter into Pi: pi install npm:pi-mcp-adapter Restart Pi after installation Add a server to .mcp.json in your project (see README example)
Where can I get pi-mcp-adapter?
The source code and installation instructions are on GitHub: https://github.com/nicobailon/pi-mcp-adapter

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects