{"slug": "claude-code-mcp-add-servers-with-one-command-2026-guide", "title": "Claude Code MCP: Add Servers with One Command (2026 Guide)", "summary": "Anthropic's Claude Code now connects remote MCP servers with a single command, `claude mcp add --transport http <name> <url>`, followed by `/mcp` inside a session to sign in, according to the official Claude Code MCP documentation. Servers can be scoped to local (default, stored in `~/.claude.json`), project (shared with a team via a committed `.mcp.json` in the project root), or user (all projects); when names collide, local wins over project and project wins over user. The guide notes the SSE transport is deprecated, that `claude mcp add-from-claude-desktop` imports existing Claude Desktop servers, and that headless `claude -p` runs have no `/mcp` panel, so sign-in must happen in an interactive session first.", "body_md": "**TL;DR:** Run `claude mcp add --transport http <name> <url>` to connect a remote MCP server to Claude Code, then `/mcp` inside a session to sign in. Add `--scope project` to share the server with your team through `.mcp.json`. Local servers use the same command with `--` before the launch command.\n\nClaude Code MCP support is what lets the agent read an issue, query a database or check an error tracker without you pasting anything into the terminal. This guide covers the `claude mcp add` command, the three scopes, authentication, seven servers to install first and the errors you are most likely to hit. Every command here comes from the [official Claude Code MCP docs](https://code.claude.com/docs/en/mcp) or the server's own README.\n\n## Add a remote MCP server[#](#add-a-remote-mcp-server)\n\nRemote servers over HTTP are the recommended option. One command adds one:\n\nThe name is yours to choose. It is how the server appears in `/mcp` and in the other `claude mcp` commands.\n\nFor a server that takes an API key instead of a sign-in, pass a header:\n\nThe SSE transport is deprecated. If a service still exposes only an SSE endpoint, the same `--transport http` command works on recent versions, because Claude Code tries HTTP first and falls back to SSE.\n\n## Add a local stdio server[#](#add-a-local-stdio-server)\n\nA stdio server runs as a process on your machine. It suits tools that need direct access to local files or a database on your network.\n\nThe double dash matters. Everything before `--` is an option for Claude Code, and everything after it is the command that starts the server. Without it, Claude Code tries to parse the server's own flags.\n\n## Choose a scope: local, project or user[#](#choose-a-scope-local-project-or-user)\n\nScope decides where a server loads and who else gets it.\n\n| Scope | Loads in | Shared with team | Stored in | \n|---|---|---|---|\n| Local (default) | Current project | No | `~/.claude.json` | \n| Project | Current project | Yes, through version control | `.mcp.json` in the project root | \n| User | All your projects | No | `~/.claude.json` | \n\nA project-scoped server lands in `.mcp.json`, which you commit:\n\nClaude Code asks each teammate to approve project-scoped servers before using them. When the same server name exists in more than one scope, local wins over project, and project wins over user.\n\nKeep secrets out of `.mcp.json`. Use local scope for servers with personal credentials, or reference environment variables in the project file.\n\n## Sign in to a server[#](#sign-in-to-a-server)\n\nMany remote servers use OAuth. Add the server, then authenticate from inside a session:\n\nThen, in Claude Code:\n\nSelect the server and follow the browser flow. Tokens are stored and refreshed for you. You can also sign in from your shell with `claude mcp login sentry`, which helps over SSH because it prints the URL when no browser is available. `claude mcp logout sentry` clears the stored credentials.\n\nHeadless runs with `claude -p` have no `/mcp` panel, so complete the sign-in from an interactive session first.\n\n## Manage your servers[#](#manage-your-servers)\n\nInside a session, `/mcp` shows the status of each server and whether it needs sign-in. If you already set up servers in Claude Desktop, `claude mcp add-from-claude-desktop` imports them.\n\n## Seven MCP servers to add to Claude Code first[#](#seven-mcp-servers-to-add-to-claude-code-first)\n\nThese cover the work most sessions involve: code hosting, errors, docs, a browser and a database. Each command is copied from Anthropic's docs or the project's README.\n\n**1. GitHub.** Review pull requests, open issues and search repositories. It authenticates with a fine-grained personal access token.\n\n**2. Sentry.** Pull the stack trace for a production error into the session that will fix it.\n\n**3. Context7.** Fetch current library documentation, so the agent does not code against an API from its training data. The [Context7 README](https://github.com/upstash/context7) recommends a free API key for higher rate limits.\n\n**4. Playwright.** Drive a real browser to check a UI change. The command is from the [Playwright MCP README](https://github.com/microsoft/playwright-mcp).\n\n**5. A database through DBHub.** Query PostgreSQL and other relational databases. Use a read-only database user so the agent cannot change data.\n\n**6. Notion.** Read specs and write docs back to the workspace.\n\n**7. Stripe.** Work with your Stripe account from the session while you build billing code.\n\nAdd servers when a task needs them. A server that duplicates something Claude Code already does, such as reading files, adds noise without adding ability.\n\n### More servers, one command each[#](#more-servers-one-command-each)\n\nEvery server on the [MCPize marketplace](https://mcpize.com/marketplace) is hosted at its own HTTPS endpoint, and its page shows the ready-made `claude mcp add --transport http` command, with your API key in a header when the server needs one. Browse [database servers](https://mcpize.com/marketplace/database), [version control](https://mcpize.com/marketplace/version-control) or [project management](https://mcpize.com/marketplace/project-management). Authentication, API keys and usage limits run through the [MCPize gateway](https://mcpize.com/gateway).\n\n[Browse MCP servers for Claude Code](https://mcpize.com/marketplace)\n\n## Connectors from claude.ai show up automatically[#](#connectors-from-claude-ai-show-up-automatically)\n\nIf you sign in to Claude Code with a claude.ai account, the connectors you added in claude.ai are available in Claude Code without extra setup. `/mcp` lists them with a marker showing where they come from. They do not load when you authenticate with an API key or through a third-party provider such as Amazon Bedrock.\n\nA server you add with `claude mcp add` takes precedence over a claude.ai connector that points at the same URL. For the claude.ai side, see the [Claude connectors guide](https://mcpize.com/blog/claude-connectors).\n\n## Keep context usage low[#](#keep-context-usage-low)\n\nTool definitions take up context. Tool search, on by default, defers them: only tool names and server instructions load at session start, and Claude fetches a tool's full definition when it needs it. Adding another server costs little context.\n\nLarge tool results are the other cost. Claude Code warns when a tool returns more than 10,000 tokens, and by default caps MCP output at 25,000 tokens. Raise the cap for a session when you need to:\n\n## Fix common errors[#](#fix-common-errors)\n\n| What you see | Cause | Fix | \n|---|---|---|\n| `has a \"url\" but no \"type\"` | A JSON entry with a URL and no transport type is read as stdio | Add `\"type\": \"http\"` to the entry | \n| `MCP server <name> already exists in local config` | You added the same name at the same scope twice | Remove it first, or pick another name | \n| Server listed as needing authentication | The server returned 401 or 403 | Run `/mcp` , select the server and sign in | \n| Connection fails with a header configured | The token in `--header` is wrong or expired | Fix the token. Claude Code does not fall back to OAuth | \n| The server's flags are rejected | The `--` separator is missing | Put `--` before the launch command | \n| A teammate's `.mcp.json` server does not load | The approval prompt was declined | Run `claude mcp reset-project-choices` | \n\n`claude mcp add` saves a configuration without checking credentials. A placeholder token is accepted at add time and fails at connect time, so check `/mcp` for a checkmark after you add a server.\n\n## FAQ[#](#faq)\n\n### How do I add an MCP server to Claude Code?[#](#how-do-i-add-an-mcp-server-to-claude-code-)\n\nRun `claude mcp add --transport http <name> <url>` for a remote server, or `claude mcp add <name> -- <command>` for a local one. Then open a session and run `/mcp` to confirm it connected.\n\n### Where does Claude Code store MCP servers?[#](#where-does-claude-code-store-mcp-servers-)\n\nLocal and user scopes are stored in `~/.claude.json`. Project scope is stored in `.mcp.json` at the project root, which you commit so the team shares the same servers.\n\n### What are the best MCP servers for Claude Code?[#](#what-are-the-best-mcp-servers-for-claude-code-)\n\nStart with the ones that match daily work: GitHub for code review, Sentry for errors, Context7 for current docs, Playwright for browser checks and a database server such as DBHub. Add others when a task needs them.\n\n### Does Claude Code support remote MCP servers?[#](#does-claude-code-support-remote-mcp-servers-)\n\nYes. HTTP is the recommended transport for remote servers, and Claude Code supports OAuth sign-in for them through `/mcp` or `claude mcp login <name>`.\n\n### How do I remove an MCP server from Claude Code?[#](#how-do-i-remove-an-mcp-server-from-claude-code-)\n\nRun `claude mcp remove <name>`. For a remote server this also deletes the OAuth tokens Claude Code stored for it. To revoke them at the provider as well, run `claude mcp logout <name>` first.\n\n### Can I use Claude Desktop servers in Claude Code?[#](#can-i-use-claude-desktop-servers-in-claude-code-)\n\nYes. Run `claude mcp add-from-claude-desktop` and pick the servers to import. Remote connectors from your claude.ai account appear automatically when you sign in with that account.\n\n## Next steps[#](#next-steps)\n\n1. Add one remote server and sign in through `/mcp` .\n2. Move the servers your team shares into project scope and commit `.mcp.json` .\n3. Have an API of your own? [Host it as a remote MCP server](https://mcpize.com/hosting) and anyone can add it with one command.\n\n[Find servers on MCPize](https://mcpize.com/marketplace)\n\n[Build your own server](https://mcpize.com/developers/build-mcp-server)\n\n**Sources:**\n\n- [Connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp) , Claude Code docs\n- [Get started with connectors](https://claude.com/docs/connectors) , Claude docs\n- [Playwright MCP](https://github.com/microsoft/playwright-mcp) , Microsoft\n- [Context7](https://github.com/upstash/context7) , Upstash", "url": "https://wpnews.pro/news/claude-code-mcp-add-servers-with-one-command-2026-guide", "canonical_source": "https://mcpize.com/blog/claude-code-mcp", "published_at": "2026-12-03 00:00:00+00:00", "updated_at": "2026-12-03 13:46:12.268522+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["Anthropic", "Claude Code", "GitHub", "Sentry", "Context7", "Claude Desktop"], "also_reported_by": [], "takeaway": "Add remote MCP servers to Claude Code with `claude mcp add --transport http <name> <url>`, then run `/mcp` to sign in; use `--scope project` to share via a committed `.mcp.json` and keep secrets out of that file by using local scope or environment variables.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/claude-code-mcp-add-servers-with-one-command-2026-guide", "markdown": "https://wpnews.pro/news/claude-code-mcp-add-servers-with-one-command-2026-guide.md", "text": "https://wpnews.pro/news/claude-code-mcp-add-servers-with-one-command-2026-guide.txt", "jsonld": "https://wpnews.pro/news/claude-code-mcp-add-servers-with-one-command-2026-guide.jsonld"}}