MCP servers with a saved cache now show tools instantly and only connect when you first use them.
tengu_mcp_discovery_cache Not enough to sayNothing here resolved what this flag was doing on this version, so nothing here should be read as on or off.
This account: no value returned · anonymous baseline: no value returned · compiled default in v2.1.221: off
These values were read against a different version of Claude Code, so treat them as the nearest reading available instead of one taken on this release.
Read once, for one account on one subscription tier, against v2.1.221. It isn't a statement about your account. What a flag value here can and cannot tell you
What's wrong with this entry?
A fifth MCP client state, cached, joins connected, pending, failed, needs-auth and disabled. When a fresh or stale discovery-cache entry exists for an http or sse server, its tools, commands and resources are published from cache immediately and the real connection is only opened on the first call.
- Stale cache entries are used right away and revalidated in the background; fresh entries are used as-is.
- Cached is treated like connected across the codebase: the /mcp panels show tool, prompt and resource counts for cached servers, cached clients count as connected for serverInfo purposes, and the hooks mcp_tool path accepts them.
- The status-line counter gained a
cachedbucket and the connection summary adds anN cachedsegment; the status label is assembled at runtime from a saved timestamp plus the fixed fragmentconnects on first use. - Hook and SDK payloads report a cached server as
pending, via a mapping helper that returns "pending" for "cached". - Resource-template argument completion now calls ensureConnectedClient with context "MCP template completion", skipping or recording failure per server rather than silently returning nothing.
- Telemetry gained
tengu_mcp_discovery_sourcewith sourcecache_freshorcache_stale, and startup telemetry gained anmcpServersCachedcount. - Gated on
tengu_mcp_discovery_cache, which falls back to true when remote config says nothing, so the real value comes from the server. Setting MCP_DISCOVERY_CACHE to false disables it with reasonenv-disabled; non-http/sse transports are excluded with reasontransport.
cached (connects on first use), connects on first use, Template completion skipped for
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.238
The MCP discovery cache is now off unless explicitly turned on
Both mention discovery cache
-
v2.1.238
MCP servers can connect lazily from a cached entry
Both mention discovery cache