
How to add an MCP server to Claude Code
Add MCP servers to Claude Code with one claude mcp add command, then pick whether the server is for this project, your team or every project.
- Local servers
- Yes
- runs stdio servers
- Hosted servers
- Yes
- connects by URL
- Config
- CLI + JSON
- how servers are added
- Plugins
- Yes
- plugin marketplaces
- Picks
- 7
- ranked
Run claude mcp add in your terminal with the server's web address or launch command, and Claude Code saves it for you. By default the server only loads in the project where you added it; add --scope user for every project or --scope project to share it through .mcp.json. Servers you already connected on claude.ai show up on their own when you sign in with that account.
Good for
- Developers who want Claude Code to reach GitHub, Sentry, Notion or a database
- Teams that want everyone in a repo to get the same servers from one .mcp.json file
- People moving servers over from Claude Desktop, Cursor or another app
- Anyone stuck on "No MCP servers configured" or a server that will not connect
Install Claude Code
Claude Code
- 1
Copy this prompt.
Add the Claude Code MCP server to Claude Code. Run this command: curl -fsSL https://claude.ai/install.sh | bash Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Pro, Max, Ultra, Team, Enterprise or Console account.
The native install updates itself. Homebrew and WinGet installs do not; upgrade them yourself. After installing, run claude and sign in.
From the vendor's docs. Source.
At a glance
- Add a hosted server
- claude mcp add --transport http <name> <url>
- Add a local server
- claude mcp add <name> -- <command> [args]
- Add from JSON
- claude mcp add-json <name> '<json>'
- Default scope
- local: this project, just you
- Personal config
- ~/.claude.json (local and user scope)
- Team config
- .mcp.json in the project root
- Check servers
- claude mcp list, claude mcp get <name>, /mcp
- Startup timeout
- 30 seconds, change with MCP_TIMEOUT
Add an MCP server to Claude Code
Claude
- 1
Open a terminal in your project
Run the add command in your shell, not inside a
claudesession. Go to the project folder first, because the default scope ties the server to that folder. - 2
Add a hosted server by its address
claude mcp add --transport http notion https://mcp.notion.com/mcpThe name (
notion) is yours to choose. If the service gives you a token instead of a sign-in, add it as a header:claude mcp add --transport http secure-api https://api.example.com/mcp \ --header "Authorization: Bearer your-token"Uses Notion MCP
- 3
Or add a local server by its command
Put the launch command after
--, and any keys with--envbefore the name:claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \ -- npx -y airtable-mcp-serverEverything after
--goes to the server unchanged, so flags like-yare not read by Claude Code. - 4
Pick the scope
| Scope | Loads in | Saved in | |---|---|---| |
local(default) | this project, just you |~/.claude.json| |project| this project, whole team |.mcp.jsonin the project root | |user| all your projects |~/.claude.json|Add it to the command, for example
claude mcp add --scope user --transport http sentry https://mcp.sentry.dev/mcp.Uses sentry-mcp
- 5
Have a JSON block from another app?
Pass the object inside
mcpServerstoadd-json. Add"type": "http"to any entry that has aurl, or Claude Code treats it as a local command and skips it.claude mcp add-json example '{"command":"npx","args":["-y","@example/mcp-server"]}'On macOS or WSL,
claude mcp add-from-claude-desktopcopies servers from Claude Desktop. - 6
Check it connected
Run
claude mcp list. You want✔ Connected.! Needs authenticationmeans sign in next;⏸ Pending approvalmeans a.mcp.jsonserver waits for you to approve it inclaude. Useclaude mcp get <name>for the error detail. - 7
Sign in and use it
Start
claude, type/mcp, pick the server and follow the browser sign-in, or runclaude mcp login <name>from the shell. Then ask for something by name.PromptUse the sentry server to list the top unresolved errors in my project from the last 24 hours.Uses sentry-mcp
- 8
Restart the session after editing .mcp.json
Claude Code reads
.mcp.jsonwhen a session starts. After you edit it, type/exitand runclaude -cto continue your last conversation in that folder. To retry servers that failed or need sign-in, type/mcp reconnect all.
Best MCP servers for Claude Code
Official servers with an approved PlugWiki page whose setup for this client is documented by the vendor or client; ordered by GitHub stars, then weekly downloads, then name.
- 1
Context7OfficialHosted or LocalAPI keyGives Claude Code current docs for the libraries you use, so it stops guessing at old APIs.
64,001 GitHub stars - 2
Playwright MCPOfficialLocalLets Claude Code open and test your app in a real browser; the Claude Code quickstart uses it as its local example.
38,887 GitHub stars - 3
GitHub MCP ServerOfficialHosted or LocalOAuthGitHub's own server for pull requests, issues and code search from inside Claude Code.
34,115 GitHub stars - 4
Stripe MCPOfficialHosted or LocalOAuthStripe's hosted server; the Claude Code docs use it to show local scope.
2,014 GitHub stars - 5Canva MCPOfficialHostedOAuth
Create and edit Canva designs from Claude Code after you sign in.
- 6
Exa MCP ServerOfficialHosted or LocalOAuthWeb search built for AI agents, hosted by Exa.
5.2K GitHub stars - 7
Notion MCPOfficialHostedOAuthNotion's hosted server; the Claude Code docs use it as the first example.
MCP servers that work in Claude Code
40 · official first, then servers with a page, then by stars
Scrapling MCP ServerOfficialLocalNo sign-inWeb scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
90.6K GitHub stars
Context7OfficialHosted or LocalAPI keyUp-to-date docs for AI agents
64K GitHub stars
Chrome DevTools MCPOfficialLocalMCP server for Chrome DevTools
54.5K GitHub stars
Playwright MCPOfficialLocalPlaywright MCP server
38.9K GitHub stars
GitHub MCP ServerOfficialHosted or LocalOAuthGitHub's official MCP server. Lets an AI assistant read code, manage issues and pull requests, check Actions runs and security alerts. Hosted at api.githubcopilot.com/mcp or run locally with Docker or a Go binary.
34.1K GitHub stars
OpenWork MCP GatewayOfficialHostedOAuthYour OpenWork org's skills, plugins, workflows, and connections through one OAuth MCP URL.
24.3K GitHub stars
MCP Toolbox for DatabasesOfficialLocaltoken in envMCP Toolbox for Databases enables your agent to connect to your database.
16.8K GitHub stars
apify-mcp-serverOfficialHosted or LocalOAuthExtract data from any website with thousands of scrapers, crawlers, and automations on Apify Store ⚡
14K GitHub stars
SeleniumBase MCPOfficialLocalNo sign-inStealthy browser automation, testing, and web-scraping via CDP Mode.
13.2K GitHub stars
AutoClipOfficialLocalNo sign-inClip long videos into short clips with covers and captions. Local CLI and MCP.
9.9K GitHub stars
Firecrawl MCP ServerOfficialHosted or LocalAPI keyFirecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
7.7K GitHub stars
firecrawl-mcp-serverOfficialLocalAPI keyOfficial Firecrawl MCP server, the context API for AI agents: search, scrape, and interact with the web, plus parse, crawl, map, Agent and Monitor, from any MCP client.
7.7K GitHub stars
MobileBuildMCPOfficialLocalBuild, run and test iOS and macOS apps, drive the simulator and debug with LLDB from your AI assistant. Formerly XcodeBuildMCP.
6.5K GitHub stars
magic-mcpOfficialLocalAPI keyIt's like v0, but in your Cursor / Claude Code / Windsurf: search 10,000+ React/Tailwind components, generate new UI with AI, and publish your own — right from your editor. Magic MCP is now the 21st MCP; this package keeps old configs working. Setup: 21st.dev/mcp
6.3K GitHub stars- Excalidraw MCPOfficialHosted or LocalNo sign-in
Official Excalidraw MCP App server: streams hand-drawn diagrams into the chat with interactive fullscreen editing. Hosted or local.
5.6K GitHub stars
Exa MCP ServerOfficialHosted or LocalOAuthConnect AI agents to Exa for web search, content fetching, and multi-step research.
5.2K GitHub stars
notion-mcp-serverOfficialLocaltoken in envOfficial Notion MCP Server
4.7K GitHub stars
mcp-grafanaOfficialHosted or LocalAn MCP server giving access to Grafana dashboards, data and more.
3.6K GitHub stars- Google Analytics MCP ServerOfficialLocaltoken in env
Google's official Google Analytics MCP server: runs locally and queries GA4 reports and property settings with your Google credentials. Read-only unless you add the --allow-write flag.
3.6K GitHub stars
SupabaseOfficialHosted or LocalOAuthMCP server for interacting with the Supabase platform
3K GitHub stars
Show all 40Show fewer
brightdata-mcpOfficialLocaltoken in envA powerful Model Context Protocol (MCP) server that provides an all-in-one solution for public web access.
2.7K GitHub stars
Perplexity MCP ServerOfficialHosted or LocalOAuthConnector for Perplexity API, to enable real-time, web-wide research.
2.6K GitHub stars
tavily-mcpOfficialLocalProduction ready MCP server with real-time search, extract, map & crawl.
2.5K GitHub stars
Solana MCP by VybeOfficialHostedOAuthSolana MCP developer toolkit: wallets, trades, markets, PnL, transfers, onchain, swaps & API tools.
2.2K GitHub stars
Azure DevOps (ADO)OfficialHostedOAuthThe MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
2.1K GitHub stars
Azure DevOps Local MCP ServerOfficialLocalOAuthThe MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
2.1K GitHub stars
anysearch-mcp-serverOfficialHostedAPI keyUnified real-time search MCP server supporting general web search, vertical domain search, parallel batch search, and full-page URL content extraction.
2.1K GitHub stars
Microsoft Learn MCPOfficialHostedNo sign-inOfficial Microsoft Learn MCP Server – real-time, trusted docs & code samples for AI and LLMs.
2K GitHub stars- WordPress MCP AdapterOfficialLocal
The official WordPress plugin that turns a self-hosted site into an MCP server, exposing Abilities API actions from core, plugins and themes over STDIO (WP-CLI) or HTTP.
1.9K GitHub stars
MeiGen-AI-Design-MCPOfficialHosted or LocalOAuthDiscover inspiration and create images and videos with the latest AI models. Works with ChatGPT, Claude, Cursor, and other MCP clients.
1.8K GitHub stars
MATLAB MCP ServerOfficialLocalNo sign-inConnect AI coding agents to MATLAB. Run code, tests, and analysis via MCP.
1.7K GitHub stars
datagouv-mcpOfficialHostedNo sign-inOfficial data.gouv.fr Model Context Protocol (MCP) server that allows AI chatbots to search, explore, and analyze datasets from the French national Open Data platform, directly through conversation.
1.6K GitHub stars
MiniMax-MCPOfficialLocalAPI keyOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
1.6K GitHub stars
mcp-server-qdrantOfficialLocalAPI keyAn official Qdrant Model Context Protocol (MCP) server implementation
1.6K GitHub stars
TerraformOfficialHosted or LocalAPI keyGenerate more accurate Terraform and automate workflows for HCP Terraform and Terraform Enterprise
1.6K GitHub stars
@brave/brave-search-mcp-serverOfficialLocalBrave Search MCP Server: web results, images, videos, rich results, AI summaries, and more.
1.5K GitHub stars
IDA MCPOfficialLocalNo sign-inOfficial Hex-Rays MCP server that lets AI agents open, decompile and annotate binaries in IDA, alongside you in the IDA GUI or headless.
1.5K GitHub stars- X MCP (X API)OfficialHosted or LocalOAuth
X's hosted MCP server for the X API at api.x.com/mcp: AI clients search posts, read users, trends and news, manage bookmarks and publish Articles through your X developer app, directly or via the xurl mcp bridge.
1.4K GitHub stars
Power BI Authoring MCP Server (Local)OfficialLocalOAuthThe Power BI Authoring MCP server lets an AI agent create and change Power BI semantic models.
1.3K GitHub stars
ref-tools-mcpOfficialLocalAPI keyToken efficient search for coding agents over public and private documentation.
1.2K GitHub stars
Common errors and fixes
/mcp shows No MCP servers configured
Cause: The server was added in another project folder, or the config was edited at a path Claude Code does not read.
Fix: Re-add it from this project or with --scope user; edit only ~/.claude.json or .mcp.json.
claude-code Source
MCP server has a "url" but no "type"
Cause: Claude Code reads an entry without type as a local command.
Fix: Add "type": "http" (or "sse" or "ws") to the entry.
claude-code Source
Server shows Pending approval
Cause: Servers from a project .mcp.json need your approval first.
Fix: Run claude in the project and approve it, or approve it later from /mcp.
claude-code Source
Failed to connect or MCP endpoint not found
Cause: Wrong URL path, a rejected token, or a local command that does not start.
Fix: Run claude mcp get <name>, check the path, and run the local command by hand to see its error.
claude-code Source
Connection timed out at startup
Cause: A local server took longer than 30 seconds, often while npx downloads it.
Fix: Raise MCP_TIMEOUT, in milliseconds, before starting claude.
claude-code Source
Server flags like -y or --port are rejected
Cause: The -- separator is missing, so Claude Code reads the server's flags as its own.
Fix: Remove the server and add it again with -- before the launch command.
claude-code Source
Verdict
Claude Code covers every common MCP setup: local, hosted and WebSocket servers, three scopes and a shared .mcp.json for teams. The main limit is that local scope ties a server to one folder, which is why servers seem to disappear in other projects.
Claude Code covers every common MCP setup: local, hosted and WebSocket servers, three scopes and a shared .mcp.json for teams. The main limit is that local scope ties a server to one folder, which is why servers seem to disappear in other projects.
Best for
- Developers who want MCP servers inside their terminal and repo
- Teams sharing one server setup through git
Skip it if
- You want to set up servers by clicking, not by commands
- You only have a free claude.ai plan
Questions
How do I add an MCP server to Claude Code?
Run claude mcp add --transport http <name> <url> for a hosted server, or claude mcp add <name> -- <command> for a local one. Run it in your terminal before you start claude.
Where is the Claude Code MCP config file?
Personal servers live in ~/.claude.json, and team servers live in .mcp.json at the project root. Claude Code does not read ~/.claude/mcp.json or ~/.claude/.mcp.json, a common mistake.
What is the difference between local, project and user scope?
Local, the default, loads the server only in this project and only for you. Project writes it to .mcp.json so your team gets it through git. User loads it in every project on your computer.
How do I use claude mcp add-json?
Give it a name and the JSON for one server: claude mcp add-json weather-api '{"type":"http","url":"https://api.weather.com/mcp"}'. Pass only the object inside mcpServers, and include type for any server with a URL.
How do I restart Claude Code?
Type /exit, then run claude -c to continue your last conversation in that folder, or claude -r <name> to pick a named one. The /restart command restarts and resumes a session to apply an update; it needs a Pro, Max or Ultra plan and the native install on macOS or Linux, not WSL.
Why does /mcp say No MCP servers configured?
You probably added the server in a different project folder, since local scope is tied to the folder. Re-add it here, or add it with --scope user. A hand-edited file at the wrong path or a broken .mcp.json entry causes the same message.
How do I sign in to a remote MCP server?
Type /mcp inside Claude Code and follow the browser steps, or run claude mcp login <name> in your shell. Over SSH, add --no-browser and paste the redirect URL back.
Do my claude.ai connectors work in Claude Code?
Yes, when you log in to Claude Code with your claude.ai subscription. They do not load when you use an API key or a cloud provider such as Amazon Bedrock.
Do I need a paid plan for Claude Code?
Yes. Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account; the free claude.ai plan does not include it.
Information
updated Nov 1, 2026
- Transports
- stdio, SSE, Streamable HTTP
- Config file (all)
.mcp.json (project) or ~/.claude.json (user)- MCP docs
- code.claude.com
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- Set up Claude Code · code.claude.com
- Connect Claude Code to tools via MCP · code.claude.com
- MCP quickstart · code.claude.com
- Commands · code.claude.com
- CLI reference · code.claude.com