Connect Claude Code to tools via MCP changedmcp
Nearest release: v2.1.284, published 6 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 29 Sep 2026 00:08 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 29 Sep 2026 00:37 UTC.
Upstream edited
Recorded here
Lines+5added
Lines−10removed
From line
265
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits83to this page, all time
The whole hunk
from line 265, old and new numbered
/
from line 265
265265
266266The discovery cache is off by default unless a gradual rollout has enabled it for your account. Set [`MCP_DISCOVERY_CACHE=1`](/docs/en/env-vars) to turn it on, or `0` to keep it off even when the rollout has enabled it. Before v2.1.238, the cache was on by default.
267267
268Two actions in a server's menu in `/mcp` also affect that server's cache entry:
268When you select **Disable** or **Clear authentication** from a server's menu in `/mcp`, Claude Code also discards that server's cache entry. **Reconnect** discards it too on a connected or failed server; on a `cached` server, **Reconnect** connects the server now and keeps the entry. The next time Claude Code connects to the server after discarding the entry, it fetches the tool list from the server instead of from the cache.
269269
270* **Reconnect**: on a `cached` server, Claude Code connects it now rather than on its first tool call and keeps the entry. On a connected or failed server, Claude Code reconnects it and also discards the entry.
271* **Clear authentication**: Claude Code revokes the server's authentication and also discards the entry.
272
273After discarding the entry, Claude Code fetches the server's tool list from the server instead of from the cache.
274
275270When a server's status is `✘ Failed to connect`, `claude mcp list` appends the failure detail to that status line, and `claude mcp get <name>` shows it on an `Issue:` line: the HTTP status or error code, plus any error text the server returned. The server's detail view in `/mcp` includes the same server-reported text in its `Issue:` row. Claude Code redacts credential-like text from this detail and never includes the expanded server URL, which can carry secrets. Claude Code appends no detail to a `✘ Connection error` status, because the exception text it would print there can embed that URL. Before v2.1.219, both commands showed only the bare failure status, without the status code or the server's error text.
276271
277272When you complete authentication from `/mcp` and the connection still fails with an HTTP status or a transport error code, Claude Code adds that code and the origin of the server's URL to the message it prints after the attempt. The origin is the scheme and host, plus the port when the URL names one, such as `https://mcp.example.com`.
from line 594
5995944. [Plugin-provided servers](/docs/en/plugins/components#mcp-servers)
6005955. [claude.ai connectors](#use-mcp-servers-from-claude-ai)
601596
602Claude Code matches duplicates across the three scopes by name. It matches plugins and connectors by endpoint, so one that points at the same URL or command as a server above counts as a duplicate.
597Claude Code matches duplicates across the three scopes by name. It matches plugins and connectors by endpoint, so one that points at the same URL or command as an enabled server above counts as a duplicate.
603598
604599Two URL spellings count as the same endpoint when they differ only in the letter case of the scheme or host, the scheme's default port, such as `:443` on `https`, or a trailing slash. A different path, query string, userinfo, or non-default port makes two servers.
605600
from line 814
819814 <Step title="Register an OAuth app with the server">
820815 Create an app through the server's developer portal and note your client ID and client secret.
821816
822 Many servers also require a redirect URI. If so, choose a port and register a redirect URI in the format `http://localhost:PORT/callback`. Use that same port with `--callback-port` in the next step.
817 If the registration form asks for a redirect URI, pick any available port and enter `http://localhost:PORT/callback` with that port. You'll use the same port in the next step.
823818
824819 In v2.1.229, Claude Code sent `http://127.0.0.1:PORT/callback` instead, and servers that exact-match the registered redirect URI rejected the sign-in with a redirect URI mismatch. Claude Code v2.1.231 restored the `localhost` form. To recover on v2.1.229, upgrade Claude Code, or temporarily add the `http://127.0.0.1:PORT/callback` form to the server's registered redirect URIs.
825820 </Step>
826821
827822 <Step title="Add the server with your credentials">
828 Choose one of the following methods. The port used for `--callback-port` can be any available port. It needs to match the redirect URI you registered in the previous step.
823 The tabs cover both commands: `claude mcp add` takes your client ID and callback port as flags, and `claude mcp add-json` takes them in an `oauth` object. If you registered a redirect URI, set the callback port to the port in that URI.
829824
830825 <Tabs>
831826 <Tab title="claude mcp add">
from line 844
849844 </Tab>
850845
851846 <Tab title="claude mcp add-json (callback port only)">
852 Use `--callback-port` without a client ID to fix the port while using dynamic client registration:
847 To fix only the callback port and let Claude Code register the client automatically, set `callbackPort` on its own:
853848
854849 ```bash theme={null}
855850 claude mcp add-json my-server \
No line in this hunk matches that.