How to set up MCP servers in Claude Code
Updated Oct 26, 2026 · Sources listed at the end
To connect an MCP server to Claude Code, run claude mcp add with a name and either a URL (remote server) or a command (local server). By default the server is available only to you in the current project; add --scope project to share it through a .mcp.json file, or --scope user to use it in all your projects.1
Remote (HTTP) server
claude mcp add --transport http notion https://mcp.notion.com/mcp
Claude Code tries the HTTP transport first and switches to SSE when a server does not accept it. Servers that only speak SSE can be added with --transport sse.1
Scopes
| Scope | Who can use it | Where it is stored |
|---|---|---|
| local (default) | Only you, current project | Your project’s entry in ~/.claude.json |
| project | Everyone in the project | .mcp.json in the repo |
| user | You, in all projects | ~/.claude.json |
Environment variables are set with -e KEY=value.1
Check it worked
Each claude mcp add prints an “Added” line. Run claude mcp get <name> to see the connection status; project servers from .mcp.json need approval before they load.1
Safety
Only connect servers you trust. Anthropic warns that servers fetching external content can expose you to prompt injection.1
Footnotes
Tools mentioned
- Claude Code: paid from $20/mo