Connect to MCP servers changedmcp-quickstart
Nearest release: v2.1.307, published 3 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 22 Oct 2026 00:03 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 22 Oct 2026 18:07 UTC.
Upstream edited
Recorded here
Lines+20added
Lines−20removed
From line
10
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits14to this page, all time
The whole hunk
from line 10, old and new numbered
/
from line 10
1010>
1111> You can also add MCP servers from other surfaces, including the desktop app, VS Code, and the web. See [Connect from other surfaces](#connect-from-other-surfaces).
1212
13For every way to connect and configure MCP servers in Claude Code, see the [MCP reference](/docs/en/mcp).
13For every way to connect and configure MCP servers in Claude Code, see the [MCP reference](/docs/en/mcp.md).
1414
1515## Before you begin
1616
1717Make sure you have:
1818
19* [Claude Code installed](/docs/en/quickstart) and authenticated
19* [Claude Code installed](/docs/en/quickstart.md) and authenticated
2020* A terminal open in a project directory. Any directory works, including an empty one.
2121
2222## Add and verify a server
from line 23
2323
2424The example below connects to the [Claude Code documentation MCP server](https://code.claude.com/docs/mcp), a hosted server with full-text search over the Claude Code docs. It doesn't require authentication or any special configuration, so it works well as a first server to test the setup flow with.
2525
26The steps are the same for any server: add it, check the connection status, then use it in a session, with an optional cleanup step at the end. Some servers add a step, like a browser sign-in, shown in [Additional MCP server examples](#additional-mcp-server-examples). For more servers to connect, browse the [Anthropic Directory](/docs/en/mcp#find-and-build-mcp-servers).
26The steps are the same for any server: add it, check the connection status, then use it in a session, with an optional cleanup step at the end. Some servers add a step, like a browser sign-in, shown in [Additional MCP server examples](#additional-mcp-server-examples). For more servers to connect, browse the [Anthropic Directory](/docs/en/mcp.md#find-and-build-mcp-servers).
2727
2828**1. Add the MCP server**
2929
from line 60
6060| `✘ Failed to connect` | Server didn't respond. See [Troubleshooting](#troubleshooting) |
6161| `✘ Connection error` | The connection attempt threw an error. See [Troubleshooting](#troubleshooting) |
6262| ``⏸ Pending approval (run `claude` to approve)`` | A project-scoped server you haven't approved yet. See [Edit .mcp.json directly](#edit-mcp-json-directly) |
63| `⊘ Disabled for this project (re-enable via /mcp)` | A server turned off for this project by the project's `disabledMcpServers` list. See [Disable a server without removing it](/docs/en/mcp#disable-a-server-without-removing-it) |
63| `⊘ Disabled for this project (re-enable via /mcp)` | A server turned off for this project by the project's `disabledMcpServers` list. See [Disable a server without removing it](/docs/en/mcp.md#disable-a-server-without-removing-it) |
6464
6565Some legacy Windows consoles, such as the default console on Windows 10, don't support these Unicode glyphs and show `√` and `×` in place of `✔` and `✘`.
6666
from line 94
9494
9595> [!NOTE]
9696>
97> Each connected server takes some space in [Claude's context window](/docs/en/how-claude-code-works#the-context-window) because its tool names and server instructions load into every session. Removing servers you no longer use keeps that space free.
97> Each connected server takes some space in [Claude's context window](/docs/en/how-claude-code-works.md#the-context-window) because its tool names and server instructions load into every session. Removing servers you no longer use keeps that space free.
9898
9999## Where servers are saved
100100
from line 122
122122
123123On Windows, `~/.claude.json` resolves to `%USERPROFILE%\.claude.json`, typically `C:\Users\YourName\.claude.json`. If you've set [`CLAUDE_CONFIG_DIR`](/docs/en/env-vars), Claude Code reads `.claude.json` from inside that directory instead.
124124
125Run `claude mcp get claude-code-docs` to see which scope holds a server's definition. For how the scopes interact when the same server is defined in more than one, see [MCP installation scopes](/docs/en/mcp#mcp-installation-scopes).
125Run `claude mcp get claude-code-docs` to see which scope holds a server's definition. For how the scopes interact when the same server is defined in more than one, see [MCP installation scopes](/docs/en/mcp.md#mcp-installation-scopes).
126126
127127## Change server scope
128128
from line 204
204204
205205Hosted services like Sentry, Linear, and Notion run their MCP servers behind OAuth: you add the server's URL, then sign in through your browser.
206206
207The steps below use Sentry as the example. To connect a different service, substitute its URL, which you can find in the [Anthropic Directory](/docs/en/mcp#find-and-build-mcp-servers) or the service's documentation.
207The steps below use Sentry as the example. To connect a different service, substitute its URL, which you can find in the [Anthropic Directory](/docs/en/mcp.md#find-and-build-mcp-servers) or the service's documentation.
208208
209209**1. Add the server**
210210
from line 232
232232
233233Ask Claude something that needs the service, like `What Sentry projects do I have access to?`, and look for tool calls labeled with the `sentry` server name in its output.
234234
235Servers that authenticate with a static token instead of OAuth take the token at add time with `--header "Authorization: Bearer <token>"`. See the [GitHub example](/docs/en/mcp#example-connect-to-github-for-code-reviews) for a worked version.
235Servers that authenticate with a static token instead of OAuth take the token at add time with `--header "Authorization: Bearer <token>"`. See the [GitHub example](/docs/en/mcp.md#example-connect-to-github-for-code-reviews) for a worked version.
236236
237237## Edit .mcp.json directly
238238
from line 271
271271
272272This guide uses the `claude mcp` CLI commands, but every Claude Code surface can connect to MCP servers:
273273
274* **Claude Code desktop app**: add servers through the [Connectors UI](/docs/en/desktop#connect-external-tools).
274* **Claude Code desktop app**: add servers through the [Connectors UI](/docs/en/desktop.md#connect-external-tools).
275275* **Claude Desktop chat app**: a separate app from Claude Code. To copy servers from its `claude_desktop_config.json` into the CLI, run `claude mcp add-from-claude-desktop` on macOS or WSL.
276* **VS Code**: see [Connect to external tools with MCP](/docs/en/vs-code#connect-to-external-tools-with-mcp).
277* **Cloud sessions**: outside a [project](/docs/en/claude-projects#what-threads-pick-up-from-your-repositories)'s threads, commit a `.mcp.json` to your repository; a session with one repository loads it. Cloud threads in a project use your claude.ai connectors instead. See [Edit .mcp.json directly](#edit-mcp-json-directly) and [What carries over from your setup](/docs/en/cloud-environments#what-carries-over-from-your-setup).
278* **Claude.ai**: connectors you add at [claude.ai/customize/connectors](https://claude.ai/customize/connectors) load automatically in the CLI when you sign in with that account. See [Use MCP servers from Claude.ai](/docs/en/mcp#use-mcp-servers-from-claude-ai).
276* **VS Code**: see [Connect to external tools with MCP](/docs/en/vs-code.md#connect-to-external-tools-with-mcp).
277* **Cloud sessions**: outside a [project](/docs/en/claude-projects.md#what-threads-pick-up-from-your-repositories)'s threads, commit a `.mcp.json` to your repository; a session with one repository loads it. Cloud threads in a project use your claude.ai connectors instead. See [Edit .mcp.json directly](#edit-mcp-json-directly) and [What carries over from your setup](/docs/en/cloud-environments.md#what-carries-over-from-your-setup).
278* **Claude.ai**: connectors you add at [claude.ai/customize/connectors](https://claude.ai/customize/connectors) load automatically in the CLI when you sign in with that account. See [Use MCP servers from Claude.ai](/docs/en/mcp.md#use-mcp-servers-from-claude-ai).
279279
280280## Troubleshooting
281281
from line 343
343343> $env:MCP_TIMEOUT = "60000"; claude
344344> ```
345345>
346> Before v2.1.299, some connections to HTTP servers that were up timed out at startup regardless of `MCP_TIMEOUT`. If you use one of those versions and an HTTP server that is up still times out after you raise the limit, [update Claude Code](/docs/en/setup#update-claude-code).
346> Before v2.1.299, some connections to HTTP servers that were up timed out at startup regardless of `MCP_TIMEOUT`. If you use one of those versions and an HTTP server that is up still times out after you raise the limit, [update Claude Code](/docs/en/setup.md#update-claude-code).
347347
348348> **Server already exists**
349349>
from line 361
361361>
362362> Pass the variable with `--env KEY=value` on `claude mcp add`, or in the `env` field of the server's `.mcp.json` entry. The server's documentation lists the variables it needs.
363363>
364> Before v2.1.302, `/mcp` showed the status `tools fetch failed` for a server using [protocol revision 2026-07-28](/docs/en/mcp#mcp-client-runtimes) that left `resultType`, `ttlMs`, or `cacheScope` out of its replies. If you use one of those versions and a server shows that status, [update Claude Code](/docs/en/setup#update-claude-code).
364> Before v2.1.302, `/mcp` showed the status `tools fetch failed` for a server using [protocol revision 2026-07-28](/docs/en/mcp.md#mcp-client-runtimes) that left `resultType`, `ttlMs`, or `cacheScope` out of its replies. If you use one of those versions and a server shows that status, [update Claude Code](/docs/en/setup.md#update-claude-code).
365365
366366> **Changes to .mcp.json don't take effect**
367367>
from line 377
377377
378378> **OAuth sign-in fails or browser doesn't open**
379379>
380> Run `/mcp`, select the server, and choose `Authenticate` again. If the browser doesn't open automatically, copy the URL shown in the terminal and open it manually. See [Authenticate with remote MCP servers](/docs/en/mcp#authenticate-with-remote-mcp-servers) for fixed callback ports and pre-configured credentials.
380> Run `/mcp`, select the server, and choose `Authenticate` again. If the browser doesn't open automatically, copy the URL shown in the terminal and open it manually. See [Authenticate with remote MCP servers](/docs/en/mcp.md#authenticate-with-remote-mcp-servers) for fixed callback ports and pre-configured credentials.
381381
382382## Next steps
383383
384384With one server connected, explore the rest of what MCP enables:
385385
386* [Find more MCP servers](/docs/en/mcp#find-and-build-mcp-servers) in the Anthropic Directory
387* [Share servers with your team](/docs/en/mcp#mcp-installation-scopes) using installation scopes
388* [Manage MCP access for an organization](/docs/en/managed-mcp) with managed settings and policy controls
389* [Reference MCP resources](/docs/en/mcp#use-mcp-resources) in prompts with @ mentions
390* [Run MCP prompts as commands](/docs/en/mcp#use-mcp-prompts-as-commands) from the `/` menu
386* [Find more MCP servers](/docs/en/mcp.md#find-and-build-mcp-servers) in the Anthropic Directory
387* [Share servers with your team](/docs/en/mcp.md#mcp-installation-scopes) using installation scopes
388* [Manage MCP access for an organization](/docs/en/managed-mcp.md) with managed settings and policy controls
389* [Reference MCP resources](/docs/en/mcp.md#use-mcp-resources) in prompts with @ mentions
390* [Run MCP prompts as commands](/docs/en/mcp.md#use-mcp-prompts-as-commands) from the `/` menu
391391* [Build your own server](https://modelcontextprotocol.io/quickstart/server) with the MCP SDK
392392
No line in this hunk matches that.