Connect an MCP server to Claude
Three Claude surfaces, three setups. Which one you need depends on the server: remote servers take a URL, local servers take a launch command. Every brand page here tells you which kind you're dealing with.
Remote servers — claude.ai and Claude Desktop
Remote servers live at a URL like mcp.linear.app/mcp and are run by the vendor.
Nothing to install:
- Open Settings → Connectors
- Click Add custom connector
- Paste the server URL
- Complete the sign-in prompt the vendor shows you
- In a chat, enable the connector from the search-and-tools menu
Requires a paid plan. On team and enterprise workspaces an admin may need to allow custom connectors first.
Servers you can add this way right now: fal.ai, Atlassian, Datadog, Buffer, Google Drive, Confluence.
Local servers — Claude Desktop
Local servers ship as npm or PyPI packages and run as a subprocess on your machine. They're
declared in claude_desktop_config.json, which you open via Settings → Developer → Edit Config:
{
"mcpServers": {
"example": {
"command": "npx",
"args": ["-y", "@vendor/mcp-server"],
"env": { "VENDOR_API_KEY": "sk-…" }
}
}
}Python servers use uvx instead of npx. The exact package name, the
arguments and which environment variables it needs come from that server's README — linked
from every verdict page here. Quit and reopen Claude Desktop after saving;
the tools icon appears at the bottom right of the input box.
Claude Code MCP
Claude Code configures MCP from the terminal — one claude mcp add command in
all its variants:
# remote (hosted) server
claude mcp add --transport http linear https://mcp.linear.app/mcp
# local (stdio) server — everything after -- is the launch command
claude mcp add example -- npx -y @vendor/mcp-server
# local server with an API key
claude mcp add example --env VENDOR_API_KEY=sk-… -- npx -y @vendor/mcp-server
# manage what's connected
claude mcp list
claude mcp get example
claude mcp remove exampleInside a session, /mcp shows each server's connection status and is where you
complete the OAuth sign-in for remote servers that need one.
Scopes: local, project, user
Every server lands in one of three scopes. The default, local, is private to
you in the current project. --scope user makes it available in every project
on your machine — right for personal utilities. --scope project writes it to a .mcp.json at the repo root, which is the one you commit: everyone who checks
out the project gets the same servers, and secrets stay in each person's own environment
variables.
{
"mcpServers": {
"example": {
"command": "npx",
"args": ["-y", "@vendor/mcp-server"],
"env": { "VENDOR_API_KEY": "${VENDOR_API_KEY}" }
}
}
}When it doesn't work
| Symptom | Usual cause | Fix |
|---|---|---|
| Server never appears | Invalid JSON | Check for a trailing comma; paste the file into a JSON validator |
| Appears, fails to start | npx not on Claude's PATH | Use an absolute path — /usr/local/bin/npx or the output of which npx |
| Starts, then exits | Missing API key | Most servers exit silently without their key — check the README's env vars |
| Connector 401s | Expired OAuth grant | Remove and re-add the connector to re-authenticate |
| Tools listed, never called | Connector disabled in chat | Enable it in the search-and-tools menu for that conversation |
To see why a local server is failing, run its command directly in a terminal — the error it prints there is the one Claude is swallowing.
A word on trust
An MCP server runs with the credentials you give it and sees the data those credentials unlock. For official servers that's the same trust you already extend to the vendor. For community servers it isn't — it's unaudited third-party code. Prefer official servers where they exist, and give community ones scoped, revocable keys. See which brands have official servers →
Questions
Where is claude_desktop_config.json?
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows: %APPDATA%\Claude\claude_desktop_config.json. The reliable way to open it is Settings → Developer → Edit Config, which creates the file if it doesn't exist yet.
Why doesn't my server show up after editing the config?
Claude Desktop only reads the config at launch, so quit and reopen it — not just close the window. If it still doesn't appear, the JSON is usually invalid; a trailing comma after the last entry is the most common cause.
Do I need a paid plan?
Custom connectors for remote servers require a paid plan, and on team or enterprise workspaces an admin may need to enable them first. Local servers configured through claude_desktop_config.json and Claude Code have no such gate.
What's the difference between Claude Desktop and Claude Code for MCP?
Same protocol, different configuration. Claude Desktop uses a JSON file and a connectors UI; Claude Code uses the claude mcp add command and supports per-project servers via a committed .mcp.json, which is what you want for team setups.