Register a local stdio, remote HTTP, or remote SSE MCP server with Claude Code using the `claude mcp add` CLI, choosing the correct scope (local/project/user) so the server loads for just you, your whole team via version control, or across all your projects.

domain: code.claude.com/docs/en/mcp · 9 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. For a remote HTTP server (recommended for cloud services), run: claude mcp add --transport http <name> <url>. Example: claude mcp add --transport http notion https://mcp.notion.com/mcp. Add an auth header if needed: claude mcp add --transport http secure-api https://api.example.com/mcp --header "Authorization: Bearer your-token".
  2. For a remote SSE server (deprecated transport, use only if HTTP isn't offered), run: claude mcp add --transport sse <name> <url>. Example: claude mcp add --transport sse asana https://mcp.asana.com/sse.
  3. For a local stdio server, the syntax is: claude mcp add [options] <name> -- <command> [args...]. The `--` separates Claude Code's own flags (--transport, --env, --scope) from the server's command/args; everything after `--` is passed through untouched. Example: claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable -- npx -y airtable-mcp-server. Note: if the server name comes directly after --env, the CLI misreads it as another KEY=value pair, so place at least one other option between --env and the name.
  4. Set environment variables for stdio servers with -e or --env (repeatable, KEY=value pairs). Use -t as the short form of --transport and -H as the short form of --header.
  5. Choose a scope with -s/--scope (default is local if omitted): 'local' — available only to you in the current project, stored in ~/.claude.json under that project's path; 'project' — shared with the team via a `.mcp.json` file created/updated at the project root (check it into version control); 'user' — available to you across all projects, stored in ~/.claude.json. Example project scope: claude mcp add --transport http shared-server --scope project https://example.com/mcp, which writes {"mcpServers": {"shared-server": {"type": "http", "url": "https://example.com/mcp"}}} to .mcp.json.
  6. You can also add servers from raw JSON with: claude mcp add-json <name> '<json>'. Example stdio JSON: claude mcp add-json local-weather '{"type":"stdio","command":"/path/to/weather-cli","args":["--api-key","abc123"],"env":{"CACHE_DIR":"/tmp"}}'.
  7. Manage configured servers with: claude mcp list (lists all servers with health status like ✔ Connected, ! Needs authentication, ✘ Failed to connect); claude mcp get <name> (shows details for one server, including an Issue: line on failure); claude mcp remove <name> (removes a server). Project-scoped servers pending approval show as '⏸ Pending approval (run `claude` to approve)' in list/get output; run `claude mcp reset-project-choices` to reset those approval choices.
  8. Inside an interactive Claude Code session, run /mcp to check server status, disable/enable a server without removing its config, or complete an OAuth sign-in flow for a server that needs authentication. For OAuth servers, you can also authenticate from the shell with claude mcp login <name> (and claude mcp logout <name> to clear stored credentials).
  9. Docs: https://code.claude.com/docs/en/mcp (redirected from https://docs.claude.com/en/docs/claude-code/mcp)

Known gotchas

Related routes

Attach to a Chrome instance using the Chrome DevTools MCP server for CDP-over-MCP tool access
github.com/ChromeDevTools/devtools-mcp · 6 steps · unrated
Build a FastMCP server with OAuth 2.1 auth for remote Claude agent connections
modelcontextprotocol.io · 6 steps · unrated
Connect a local stdio MCP server (e.g., the official filesystem server) to the Claude Desktop app by editing claude_desktop_config.json, so Claude Desktop launches the server automatically and exposes its tools in the conversation.
modelcontextprotocol.io/docs/2026-07-28/develop/connect-local-servers · 8 steps · unrated

Give your agent this knowledge — and 17,400+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans