Home/AI Agents/pi-mcp-adapter
pi-mcp-adapter logo

pi-mcp-adapter

nicobailon/pi-mcp-adapter

Token-efficient MCP adapter for Pi coding agent

GraphCanon updated 4w · GitHub synced 4w · 62 views this month

1.1k stars221 forksLast push 1mo TypeScript MIT

Decision brief

pi-mcp-adapter is a TypeScript-based MCP adapter tailored for efficient token usage with Pi, an AI coding assistant.

Good fit when

  • Use when working with Pi, the AI coding assistant, to optimize token efficiency within Model Context Protocol environments.
  • When developing applications that require integration with Pi through the MCP and you need to minimize token usage without sacrificing performance.

Avoid when

  • Avoid if your project does not align with TypeScript or the Model Context Protocol framework as pi-mcp-adapter is specifically tailored for these contexts.
  • Do not use when working on projects that do not involve Pi coding assistant, as its functionalities are directly tied to this specific AI tool.
Requirements:
pi-mcp-adapter operates in a TypeScript environment and requires that the project already supports TypeScript.

Observed Jul 17, 2026 · Source: enrich:decision_facts

Verify the decision

Adoption

Package downloads where a registry match exists. GitHub stars (1,072) are secondary evidence.

npm downloads (30d)
168,206·npm downloads API·4w

Maintenance and security

Full trust report
Maintenance
Very active (1d since push)
As of 4w
Provenance
Not a fork · Personal account
As of 4w
Security (OSV)
No MCP manifest
As of 1mo

Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.

Install

npm install pi-mcp-adapter
npm

Similar tools

Same-category neighbours. No typed graph edges are catalogued for this tool yet.

Evidence and technical details

Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.

Overview

A TypeScript-based repository that provides an efficient MCP (Model Context Protocol) adapter designed to improve token usage within the context of Pi, an AI coding assistant.

Capability facts

CLI
CLI entrypoint

Source: package.json:bin|scripts · Jul 27, 2026

MCP server
Ships MCP server

Source: package.json:@modelcontextprotocol/* · Jul 27, 2026

Languages
typescript, javascript

Source: github.language+package.json · Jul 27, 2026

Categories

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Node.js runtimeNode.js

Source: README excerpt (regex_v1, Jul 27, 2026)

"command": "npx",
Source link

Tags

README

Install

pi install npm:pi-mcp-adapter

Restart Pi after installation.


Quick Start

Preferred project config: .mcp.json

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "chrome-devtools-mcp@latest"]
    }
  }
}

Preferred user-global shared config: ~/.config/mcp/mcp.json. Pi also reads the tool-agnostic global paths ~/.agents/mcp.json and ~/.agents/mcp/mcp.json.

Pi also reads Pi-owned override files for settings and host-specific compatibility:

  • <Pi agent dir>/mcp.json — Pi global override (~/.pi/agent/mcp.json by default)
  • .pi/mcp.json — Pi project override

Host-specific configs are detected and shown by /mcp setup and pi-mcp-adapter init, but they are not loaded automatically. To explicitly opt in to host-config fallback discovery, set settings.hostConfigDiscovery to "on" or run pi-mcp-adapter init --discover-host-configs. The default is "off"; "prompt" is available for integrations that want detection without activation. Host configs are lower precedence than every shared and Pi-owned source, and /mcp setup continues to offer explicit import adoption. Discovery reports source paths, provenance, and same-name conflicts; it never writes to external host files or silently launches commands from them.

Precedence is:

  1. ~/.config/mcp/mcp.json
  2. ~/.agents/mcp.json
  3. ~/.agents/mcp/mcp.json
  4. <Pi agent dir>/mcp.json
  5. .mcp.json
  6. .pi/mcp.json

/mcp disable <server> and /mcp enable <server> persist only the disabled field in the project-local .pi/mcp.json, which is the highest-precedence Pi layer. Enabling removes the project flag when lower layers are enabled, or writes false when needed to override a disabled lower source. This applies even when the effective server came from a shared global/project file, an imported host config, or configPath; the source file is never rewritten and credentials are never copied. Run /reload after changing the flag so registered tool surfaces are refreshed. The manual equivalent is to add { "disabled": true } to a server in any normal MCP config. Supplied in-memory createMcpAdapter({ config }) configurations are isolated and do not read or write this project override; the commands are unavailable in that mode.

Servers are lazy by default — they won't connect until you actually call one of their tools. The adapter caches tool metadata so search and describe work without live connections.

mcp({ search: "screenshot" })
chrome_devtools_take_screenshot
  Take a screenshot of the page or element.

  Parameters:
    format (enum: "png", "jpeg", "webp") [default: "png"]
    fullPage (boolean) - Full page instead of viewport
mcp({ tool: "chrome_devtools_take_screenshot", args: { format: "png" } })

args can be a JSON object or a JSON string. Prefer the object form when your model handles it reliably; the string form remains supported for providers that need simpler schemas.

Two calls instead of 26 tools cluttering the context.

For agents

This page has a .md twin and JSON over the API.

Was this helpful?

Anonymous feedback helps us improve pages and translations.