pi-mcp-adapter 5.0.0 makes the adapter the one place Pi runs MCP. Servers you added with pi mcp add, servers other extensions register, sign-ins from Pi's built-in MCP, and tokens from Pi's /login all work here now. It also runs far fewer servers: each one is discovered at startup and then stopped until you use it, so a big server list no longer means a big pile of running processes. Servers you rarely use stay searchable, long tools that report progress no longer time out, and a stray Enter can no longer approve a project server.
Highlights
- Works with Pi's own MCP setup. Pi's
mcp.jsonfiles,pi.registerMcpServer()servers, built-in MCP sign-ins, and/loginprovider tokens all work in the adapter. - Only the servers you use stay running. With 100 servers installed and 3 in use, 3 run instead of 100.
- Rarely used servers stay searchable. Cached tools no longer expire after a week.
pi-mcp-adapter doctorchecks your servers from a shell or CI.- Fewer surprises. Long tools that report progress keep going, and the project-server approval prompt now starts on "Don't allow".
Need to know
| If you… | What changes |
|---|---|
| Use Pi 0.99 or later | The adapter replaces Pi's built-in MCP in sessions and turns the built-in off once in Pi's settings. /mcp opens the adapter. To go back, turn the built-in on in pi config → Built-in.
|
Import pi-mcp-adapter/config
| getLegacyPiMcpGlobalConfigPath() and getLegacyProjectPiMcpConfigPath() are now getPiMcpGlobalConfigPath() and getProjectPiMcpConfigPath().
|
Full changelog
Highlights
- The adapter now works with Pi's own MCP setup: servers added with
pi mcp add, servers other extensions register, sign-ins made with Pi's built-in MCP, and provider tokens from Pi's/loginall work here. - Far fewer servers stay running. Servers are discovered at startup and then stopped until you use them, so with 100 servers installed and 3 in use, only those 3 run.
- Servers you rarely use stay searchable. Cached tools no longer expire after a week.
pi-mcp-adapter doctorchecks your servers from a shell or CI.- Long tools that report progress no longer time out, and a stray Enter can no longer approve a project server.
Breaking
- On Pi 0.99 and later, the adapter replaces Pi's built-in MCP extension in sessions, except when a host supplies its own config through
createMcpAdapter():/mcpopens the adapter, and the built-in no longer connects servers. On the first start after you install or update the adapter, it also turns the built-in off in Pi's user settings ("-builtin:mcp", aspi configwrites), so Pi stops warning that the built-in was not loaded. Turning it back on inpi configsticks. Shellpi mcpcommands still use Pi's own files. See Pi's built-in MCP. pi-mcp-adapter/configexportsgetPiMcpGlobalConfigPath()andgetProjectPiMcpConfigPath()instead ofgetLegacyPiMcpGlobalConfigPath()andgetLegacyProjectPiMcpConfigPath().
Added
- On Pi 0.99 and later, the adapter also reads Pi's
~/.pi/agent/mcp.jsonand.pi/mcp.json, so servers added withpi mcp addwork here. Each file sits right below themcp-adapter.jsonin its folder. Pi settings without an exact adapter equivalent are ignored, and entries the adapter can't run, such as SSE servers, are skipped; both are reported at startup, and a loaded server's ignored settings are also listed under it in/mcp-adapter..pi/mcp.jsonservers need project trust and approval, and exclusive mode reads neither file. See configuration. - On Pi 0.99 and later, the adapter connects servers that other extensions add with Pi's
pi.registerMcpServer(), so Pi no longer reports them as unconnected. They are translated like Pi'smcp.jsonentries and are proxy-only:directanddeferredexposure are ignored and reported. A config entry or an earlierregisterMcpServer()registration of the same name wins, and the registration is reported as overridden. Registering a name again with a different config replaces the server, and unregistering disconnects it. See the extension API. - On Pi 0.99 and later, sign-ins made with Pi's built-in MCP can be imported: interactive sessions ask once per OAuth server whose exact URL has a sign-in in Pi's
~/.pi/agent/mcp-auth.jsonand none in the adapter, andctrl+pin/mcp-adapterimports every eligible server. If the server rotates refresh tokens, the adapter's first refresh can sign Pi's shellpi mcpcommands out. See Import a sign-in from Pi's built-in MCP. - HTTP servers accept
"auth": { "provider": "<name>" }, in adapter config and Pi'smcp.json, to send the token of a provider you signed in to with Pi's/login(Pi 0.99.2 or later). The token is read on every request and sent only to the server's origin, never through a redirect. User-global config only, andhttpsexcept on loopback. Without a token the server needs/login <provider>; it never starts MCP OAuth. See Pi provider tokens. pi-mcp-adapter doctor [--json]checks your MCP servers from a shell or CI: each enabled server's state, tool count, and error or hint, exiting 1 when one fails. The report prints before connections close, and a failed shutdown also exits 1. It follows project trust and never starts OAuth. See Check servers from a shell.- Server entries accept a
description, the same key as Pi'smcp.json.mcp({ server })shows it,mcp({ search })ranks the server's tools by it, and the/mcp-adapterpanel shows it when you expand the server, falling back to the first line of the server's instructions.
Changed
- Startup no longer leaves every server running until the idle timeout. At each start, the adapter discovers servers whose cached tools are missing, from an older config, or past a server-declared TTL, 10 at a time, saves them together, and stops plain
lazyservers right away; they start again on first use. Before, only the first session discovered servers, so a server added later stayed unsearchable until it was used. Alazyorlazy-keep-aliveserver that fails discovery or needs sign-in is tried once per config: later sessions don't start it until its config changes or it is used. Temporary HTTP outages are retried next session. - Cached tool metadata no longer expires after 7 days. Servers you rarely use used to drop out of search a week after the first session. An entry now stays valid until the server's config changes or a TTL the server declared runs out, and it is refreshed the next time the server connects. A prompt command whose cached arguments are out of date no longer rejects the call: it connects, refreshes them, and checks again.
- A tool call's timeout (
requestTimeoutMs, or the MCP SDK default of 60 seconds) now restarts whenever the tool reports progress, as in Pi's built-in MCP, so a long tool that keeps reporting progress no longer times out. Tool calls always ask the server for progress, with or without a UI. - On Pi 0.99 and later,
directTools: "search"tools are Pi deferred tools. Pi'stool_searchfinds them, and Pi keeps their activation on the session branch, so it survives a resume. Permission extensions see their MCP annotations, and codemode scripts get theirCallToolResult. Calls still go through the adapter's approval and output limits. See search-activated direct tools. - Choosing direct tools is faster when many servers use
includeToolsorexcludeTools: with 100 servers × 50 tools, about 1 second → 60 ms. - The README is now a short overview. The full reference moved into
docs/: configuration, server options, authentication (formerlyOAUTH.md), using MCP tools, scripting, prompts and MCP UI, and the extension API. - The README compares the adapter with Pi's built-in MCP on what you get by switching: with 100 servers installed and 3 used, Pi 0.99.2 keeps all 100 running (7.0 GB) while the adapter runs only the 3 in use; single tool lookups cost 10–33% fewer tokens than the built-in's default
codemode; and with a System One key, semantic search put the right tool first in 10 of 11 test requests, where word search did in 5. See the full comparison.
Fixed
- Pressing Enter at the project-server approval prompt no longer approves the server. The prompt now starts on "Don't allow", so a first prompt typed while it is open can't approve a server by accident; choose "Allow" to approve it. Thanks to @meirm for #797.
- Idle shutdown no longer closes a server that is still in use. A tool call waiting for approval, an open MCP UI page, and an accepted browser (URL) request now keep the server running, so the approved call, a UI button, or the retry after the browser step no longer fails because the server was stopped meanwhile.
- Ending or switching a session no longer prints
MCP: runtime cleanup failed: Cannot access 'scopedMaterializedResourceSessions' before initialization, and temp files from binary MCP resources are removed again. Thanks to @wu546526 for #781. - Connecting to Figma (desktop) while its server is off now says nothing is listening on
127.0.0.1:3845instead of a barefetch failed. /mcp-adapter setupadds Figma (desktop) to the global config instead of writing.mcp.jsoninto whatever project you opened setup from./mcp-adapter setupwarns when a server you add won't be used, because another config file already defines or disables it, or the current config mode doesn't read the file it was written to.- A bearer token or header value that isn't a valid HTTP header value, such as one containing a newline, no longer appears in connection errors. This covers
bearerToken(including!commandand${VAR}forms),bearerTokenEnv, and configuredheaders; the error now names the server and header instead.