MCP code loads only when first needed, so startup is cheaper.
What's wrong with this entry?
The MCP client, authentication, prompt-handling, task-watching, directory and error-classification code is no longer loaded when Claude Code starts. It is fetched through small accessors the first time an MCP path is used, which cuts startup cost. Behaviour is unchanged.
- The cache of per-server connections moved from a memoised function's own cache onto a single shared registry used by both MCP implementations, so connection state now has one home.
- Tool and resource discovery calls take the storage handle as an explicit argument instead of reaching for it.
mcpIsListAuthErrorModule, mcpSdkErrorClassificationModule
Strings lifted out of the shipped bundle, so the claim above can be checked against them.