
nicobailon/pi-mcp-adapter
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Pi 코딩 에이전트용 토큰 효율적인 MCP 어댑터
개요
맥락 창을 태우지 않고 Pi와 함께 MCP 서버를 사용하세요. https://github.com/user-attachments/assets/4b7c66ff-e27e-4639-b195-22c3db406a5a 마리오가 왜 MCP가 필요 없을지에 대해 썼습니다. 문제는 도구 정의가 너무 장황하다는 점입니다. 단일 MCP 서버가 10k+개의 토큰을 소모할 수 있고, 그 도구를 사용하든 안 하든 그 비용을 지불해야 합니다. 몇 개의 서버를 연결하면 대화가 시작되기 전에 컨텍스트 창의 절반을 소모하게 됩니다. 그의 의견은: MCP는 완전히 건너뛰고 간단한 CLI 도구를 작성하라는 것입니다. 하지만 MCP 생태계에는 유용한 것들이 있습니다 - 데이터베이스, 브라우저, API 등. 이 어댑터는 불필요한 부담 없이 접근할 수 있게 해줍니다. 수백 개 대신 하나의 프록시 도구(~200 토큰)로 사용할 수 있습니다. 에이전트는 필요할 때 필요한 것을 발견합니다. 서버는 실제로 사용할 때만 시작됩니다. 어댑터는 표준 MCP 파일을 자동으로 읽습니다. 이미 MCP 파일이 있다면 추가 설정은 필요 없습니다.
개요(AI 번역)
맥락 창을 태우지 않고 Pi와 함께 MCP 서버를 사용하세요.
https://github.com/user-attachments/assets/4b7c66ff-e27e-4639-b195-22c3db406a5a
왜 이런 것이 존재하는가
마리오가 왜 MCP가 필요 없을지에 대해 썼습니다. 문제는 도구 정의가 너무 장황하다는 점입니다. 단일 MCP 서버가 10k+개의 토큰을 소모할 수 있고, 그 도구를 사용하든 안 하든 그 비용을 지불해야 합니다. 몇 개의 서버를 연결하면 대화가 시작되기 전에 컨텍스트 창의 절반을 소모하게 됩니다.
그의 의견은: MCP는 완전히 건너뛰고 간단한 CLI 도구를 작성하라는 것입니다.
하지만 MCP 생태계에는 유용한 것들이 있습니다 - 데이터베이스, 브라우저, API 등. 이 어댑터는 불필요한 부담 없이 접근할 수 있게 해줍니다. 수백 개 대신 하나의 프록시 도구(~200 토큰)로 사용할 수 있습니다. 에이전트는 필요할 때 필요한 것을 발견합니다. 서버는 실제로 사용할 때만 시작됩니다.
pi-mcp 어댑터 vs Pi 내장 MCP
그 이후로 Pi 0.99는 자체 MCP 지원을 추가하여 도구 정의가 맥락에서 벗어나지 않도록 했습니다. 어댑터를 설치하면 Pi 세션에서 어댑터를 대체합니다. 전환 시 얻을 수 있는 것:
- 유휴 서버에는 비용을 지불하지 않고 많은 서버를 설치하세요. 내장 기능은 모든 Pi 세션에서 활성화된 서버를 시작하여 세션이 끝날 때까지 계속 실행합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Pi MCP Adapter
Use MCP servers with Pi without burning your context window.
https://github.com/user-attachments/assets/4b7c66ff-e27e-4639-b195-22c3db406a5a
What’s new in 7.0
https://github.com/user-attachments/assets/a3fc7834-2540-45b6-a80e-d9c17125a66c
On servers that support MCP Tasks, add "protocolVersion": "auto" and slow tools run in the background while the agent keeps working. Tool search can rank tools by meaning and send full schemas only for the ones that fit. And extract hands the agent just the values it asked for from a long result. Everything else is in the changelog.
Why This Exists
Mario wrote about why you might not need MCP. The problem: tool definitions are verbose. A single MCP server can burn 10k+ tokens, and you’re paying that cost whether you use those tools or not. Connect a few servers and you’ve burned half your context window before the conversation starts.
His take: skip MCP entirely, write simple CLI tools instead.
But the MCP ecosystem has useful stuff - databases, browsers, APIs. This adapter gives you access without the bloat. One proxy tool (~200 tokens) instead of hundreds. The agent discovers what it needs on-demand. Servers only start when you actually use them.
pi-mcp-adapter vs Pi’s built-in MCP
Since then, Pi 0.99 added MCP support of its own, which also keeps tool definitions out of context. Installing the adapter replaces it in Pi sessions. What you get by switching:
- Install many servers without paying for idle ones. The built-in starts every enabled server in every Pi session and keeps it running until the session ends. By default, the adapter starts a server when the model first calls it and stops it after 10 idle minutes.
- More servers work fully. Servers can ask you questions through forms, show interactive UIs, offer prompt templates as slash commands, and run long jobs in the background while the agent keeps working. The built-in doesn’t handle these.
- Find tools by what you mean. The built-in’s tool search only matches words. The adapter can also rank tools by meaning with a classifier model you can already use in Pi, such as Jev or Cloudflare’s Clef: in a test of 12 everyday requests across 95 tools, Jev put the right tool first in 10 of 11, where word search did in 5.
- Sign-in tokens go in your OS keychain by default (an encrypted file is opt-in), not in a plain JSON file under
~/.pi/agent. - Adding servers is easier. Give the agent a server’s URL and it installs it and checks its tools in the same session, opening sign-in first if the server needs it, with no shell command or
/reload. Servers already configured in Cursor, Claude Code, Codex, or VS Code can be imported with/mcp-adapter setup, which also adds presets such as Figma and GitHub.
설치
npx -y [email protected]설정
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "[email protected]"]
}
}
}