{"version":"2.1.221","anchor":"mcp-servers-can-start-in-a-new-cached-state-instead-of-block","canonical_anchor":"mcp-servers-can-start-in-a-new-cached-state-instead-of-block","heading":"MCP servers can start in a new \"cached\" state instead of blocking on connect","tier":"notice","area":"MCP","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221\/e\/mcp-servers-can-start-in-a-new-cached-state-instead-of-block","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.221","markdown":"### MCP servers can start in a new \"cached\" state instead of blocking on connect\n\nMCP servers with a saved cache now show tools instantly and only connect when you first use them.\n\n**What**\n\nA 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.\n\n**Details**\n\n- Stale cache entries are used right away and revalidated in the background; fresh entries are used as-is.\n- 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.\n- The status-line counter gained a `cached` bucket and the connection summary adds an `N cached` segment; the status label is assembled at runtime from a saved timestamp plus the fixed fragment `connects on first use`.\n- Hook and SDK payloads report a cached server as `pending`, via a mapping helper that returns \"pending\" for \"cached\".\n- Resource-template argument completion now calls ensureConnectedClient with context \"MCP template completion\", skipping or recording failure per server rather than silently returning nothing.\n- Telemetry gained `tengu_mcp_discovery_source` with source `cache_fresh` or `cache_stale`, and startup telemetry gained an `mcpServersCached` count.\n- 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 reason `env-disabled`; non-http\/sse transports are excluded with reason `transport`.\n\n**Evidence**\n\n`cached (connects on first use)`, `connects on first use`, `Template completion skipped for `\n\n- Flag `tengu_mcp_discovery_cache`: Not enough to say (read for one account on one subscription tier against v2.1.221; this account: no value returned, anonymous baseline: no value returned, compiled default: on) 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.\n- Area: MCP\n- Names: `MCP_DISCOVERY_CACHE`, `\/mcp`\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 0\/5"}