# pi-mcp-adapter — One Proxy Tool for MCP (Pi) > pi-mcp-adapter lets Pi use MCP servers without loading hundreds of tool defs; verified 666★ and pushed 2026-05-13. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```bash pi install npm:pi-mcp-adapter # Add an MCP server to .mcp.json and let Pi discover it lazily: cat .mcp.json | head -n 20 # In Pi: /mcp setup (then: mcp({ search: "screenshot" })) ``` ## Intro pi-mcp-adapter lets Pi use MCP servers without loading hundreds of tool defs; verified 666★ and pushed 2026-05-13. **Best for:** Agent users who want MCP capabilities but need to keep context windows small and lazy-load tools **Works with:** Pi agent, shared MCP config files (`.mcp.json`, `~/.config/mcp/mcp.json`), and MCP servers runnable via npx/uvx/docker **Setup time:** 6-15 minutes ### Key facts (verified) - GitHub: 666 stars · 118 forks · pushed 2026-05-13. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-backed entrypoint: `pi install npm:pi-mcp-adapter`. ## Main - Context-saver design: README argues MCP tool definitions are verbose, so the adapter exposes one proxy tool and lazy-connects to servers. - Shared config support: README says it reads `.mcp.json` and `~/.config/mcp/mcp.json`, plus Pi-owned override files with clear precedence. - Lazy lifecycle: README notes servers are lazy by default and metadata is cached so search/list works without a live connection. - Direct tools option: README documents a `directTools` setting to register individual tools when you want less indirection. ### Source-backed notes - README install command is `pi install npm:pi-mcp-adapter` and suggests restarting Pi afterward. - README provides a minimal `.mcp.json` snippet with an `npx` server and shows proxy calls like `mcp({ search: "screenshot" })`. - README documents config precedence across shared MCP files and Pi-owned override files. ### FAQ - **Does it work with Cursor/Claude Code configs?**: README says it can import host-specific configs via `/mcp setup` when shared MCP files are missing. - **Will tools show up instantly?**: Not all — README says servers are lazy by default and tools are discovered on demand. - **When should I use direct tools?**: Use `directTools` when you prefer individual tool registration over a single proxy tool. ## Source & Thanks > Source: https://github.com/nicobailon/pi-mcp-adapter > License: MIT > GitHub stars: 666 · forks: 118 --- ## Quick Use ```bash pi install npm:pi-mcp-adapter # Add an MCP server to .mcp.json and let Pi discover it lazily: cat .mcp.json | head -n 20 # In Pi: /mcp setup (then: mcp({ search: "screenshot" })) ``` ## Intro pi-mcp-adapter 让 Pi 通过一个“代理工具”访问 MCP server,避免加载大量 tool 定义占满上下文窗口,并支持按需懒加载;已验证 666★,最近更新 2026-05-13。 **Best for:** 想用 MCP 能力但又要控制上下文开销、希望按需懒加载工具的 agent 使用者 **Works with:** Pi agent、共享 MCP 配置文件(`.mcp.json`、`~/.config/mcp/mcp.json`),以及可通过 npx/uvx/docker 运行的 MCP server **Setup time:** 6-15 minutes ### Key facts (verified) - GitHub:666 stars · 118 forks;最近更新 2026-05-13。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中可对照的入口命令:`pi install npm:pi-mcp-adapter`。 ## Main - 节省上下文窗口:README 认为 MCP 的 tool definitions 太冗长,因此提供一个 proxy tool 并按需连接 server。 - 支持共享配置:README 表示可读取 `.mcp.json` 与 `~/.config/mcp/mcp.json`,并提供 Pi 自己的 override 文件与优先级规则。 - 默认懒加载:README 说明 server 默认 lazy,且会缓存元数据,让 search/list 在未连接时也能工作。 - 可切换 direct tools:README 有 `directTools` 配置,用于需要时把工具单独注册出来。 ### Source-backed notes - README 的安装命令是 `pi install npm:pi-mcp-adapter`,并建议安装后重启 Pi。 - README 给出最小 `.mcp.json` 示例(npx server),并展示通过 `mcp({ search: "screenshot" })` 进行代理调用。 - README 说明共享 MCP 文件与 Pi override 文件的优先级规则。 ### FAQ - **能兼容 Cursor/Claude Code 的配置吗?**:README 表示当缺少共享 MCP 文件时,可用 `/mcp setup` 导入 host-specific 配置。 - **工具会立刻全部出现吗?**:不会。README 说默认 lazy,按需发现工具。 - **什么时候用 directTools?**:当你更喜欢把工具逐个注册出来而不是走统一代理时,启用 `directTools`。 ## Source & Thanks > Source: https://github.com/nicobailon/pi-mcp-adapter > License: MIT > GitHub stars: 666 · forks: 118 --- Source: https://tokrepo.com/en/workflows/pi-mcp-adapter-one-proxy-tool-for-mcp-pi Author: MCP Hub