You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native MCP: register servers with deferred exposure by default, as Claude Code's tool search does #406
Since #304, toNativeServer() registers each server it hands to pi with exposure: "direct" (native.ts#L116), so all of its tools are declared to the model on every request. Claude Code's default is the opposite: "Tool search is enabled by default: MCP tools are deferred and discovered on demand", with "alwaysLoad": true per server and ENABLE_TOOL_SEARCH=false as the server and global settings that load tools upfront.
With two plugin servers here (chrome-devtools-mcp and claude-mem), that is 46 tools and about 39k characters of definitions in every request, roughly 10k tokens. On llama.cpp with qwen3.6-35b-a3b that is about two minutes of prompt processing before the first token of each new session. The only overrides I found are /mcp, which lasts one session for a registered server, or restating the whole server in ~/.pi/agent/mcp.json; for a plugin server that means copying its versioned cache path and plugin environment.
pi-code 1.5.2, pi 1.3.0.
Proposed solution
Map Claude's settings onto pi's exposures:
Claude Code
pi
default (tool search on)
exposure: "deferred", declared once tool_search loads a match
Activity
Defer native MCP servers behind tool_search by default (ilovepixelart…