github nicobailon/pi-mcp-adapter v2.0.0

latest releases: v2.11.0, v2.10.0, v2.9.0...
5 months ago

Breaking Changes

All servers now default to lifecycle: "lazy" — they connect on first tool call instead of eagerly at session start. Set lifecycle: "keep-alive" or lifecycle: "eager" per-server to restore old behavior.

What's New

Lazy startup with metadata cache. Servers only connect when their tools are actually called. Persistent metadata cache (~/.pi/agent/mcp-cache.json) enables search/list/describe without live connections. Per-server config hashing with 7-day staleness.

Idle timeout. Connected servers disconnect after 10 minutes of inactivity (configurable via settings.idleTimeout or per-server idleTimeout). In-flight tracking prevents disconnect mid-request.

npx binary resolution. Resolves npx packages to direct binary paths, eliminating the ~143 MB npm parent process per server. Persistent cache at ~/.pi/agent/mcp-npx-cache.json.

Lifecycle options. lazy (default), eager (connect at startup, no auto-reconnect), keep-alive (unchanged).

mcp({ connect: "server" }) mode. Explicitly trigger connection and metadata refresh.

Failure backoff. Servers that fail to connect are skipped for 60 seconds.

Prefix-match fallback. Tool calls with unrecognized names try to match a server prefix and lazy-connect the matching server.

Fuzzy tool name matching. Hyphens and underscores treated as equivalent — resolve_library_id finds resolve-library-id.

Better errors. When a server is identified but the tool isn't found, the error lists available tools for self-correction.

Impact

Scenario Before After
1 session, 2 of 6 servers used ~1,200 MB ~200 MB
4 sessions, 2 servers each ~4,900 MB ~800 MB
npm parent processes 1 per npx server 0

See CHANGELOG.md for the full list.

Don't miss a new pi-mcp-adapter release

NewReleases is sending notifications on new releases.