Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.238 Home All releases olderv2.1.237 v2.1.239newer
Claude Code v2.1.238

MCP discovery cache evicts on repeated connection failures, with a hard cap on lifetime

You'll notice
Useful3 Signal2
MCP

Cached MCP server discovery is dropped after repeated connection failures instead of only on age.

What

Cached results of discovering MCP servers (the external tool servers Claude Code connects to over the Model Context Protocol) are now dropped based on how often a server fails to answer, rather than purely on how old the entry is. A separate ceiling still bounds how long any entry can live, so a generous cache lifetime cannot keep a stale entry around indefinitely.

Details
  • The number of failed connections tolerated before an entry is discarded comes from the environment variable MCP_DISCOVERY_CACHE_STRIKES, which defaults to 1 when unset or set to a value that is not positive, so out of the box a single failed dial drops the entry.
  • MCP_DISCOVERY_CACHE_MAX_STALE_S no longer ages entries out on its own; it now serves as an upper bound on the cache lifetime configured by MCP_DISCOVERY_CACHE_TTL_S, and is itself clamped to a built-in ceiling, so a very large TTL is silently reduced to that bound.
  • A failed-dial signal is emitted alongside the existing cache-adopt signal, so a cached server that cannot be reached is reported rather than quietly expiring.
Evidence

MCP_DISCOVERY_CACHE_STRIKES, MCP_DISCOVERY_CACHE_MAX_STALE_S

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.238 →