Claude Code MCP Server Setup: First Server in 5 Minutes
Claude Code MCP server setup in plain English: one command, one check, and your AI gets real tools — docs search, databases, even a browser it can drive.
Claude Code MCP server setup comes down to one terminal command — claude mcp add — and one check with claude mcp list. That's genuinely it; the other five minutes go on understanding what you just plugged in. I'm Evgeny, I teach non-programmers to build with Claude Code, and MCP is the moment my students' eyes light up: it's where the AI stops being a chat window and starts touching real tools.
What is an MCP server, in plain words?
Think of MCP (Model Context Protocol) as a universal power socket. Claude Code is the appliance; the services you use — an issue tracker, a database, a browser, the documentation — are the electricity. An MCP server is the adapter between them. Plug one in, and instead of you copy-pasting data into the chat, Claude reads and acts on that system directly. Some servers are hosted on a URL (like a web service), others are small programs that run right on your computer. You don't need to write any of them — there are hundreds of ready-made MCP servers, and the best MCP servers for Claude Code are listed in the Anthropic Directory.
How to setup an MCP server in Claude Code
The friendliest first server is the official Claude Code docs server. It's hosted, needs no account, no API key, no sign-in — perfect for testing the flow without anything going wrong.
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
Three parts: 'claude mcp add' registers a server, '--transport http' says it lives at a URL, 'claude-code-docs' is just a name you make up, and the URL is where the server is hosted.
How do I verify the MCP server connected?
Then verify it actually works
- 1Run claude mcp list — your server should show '✓ Connected'. If you see '✗ Failed to connect', wait a moment and run it again.
- 2Start a session with claude, then say: 'Use the claude-code-docs server to look up what MCP_TIMEOUT does'.
- 3The first time, Claude asks permission to use the new tool — approve it. The tool call in the output is labeled with your server's name, so you know the answer came through MCP.
- 4Done experimenting? claude mcp remove claude-code-docs cleans up. Every connected server eats a slice of Claude's context window, so unplug what you don't use.
How do I add an MCP server globally, for all projects?
By default, claude mcp add registers the server at 'local' scope: just for you, just in the current project folder. Add --scope user and it follows you into every project (it's saved in ~/.claude.json). Add --scope project instead and the server lands in a .mcp.json file in the project root — commit that file, and teammates who clone the project get a prompt to approve the same server. That .mcp.json is also the famous 'Claude Code MCP JSON' you see in tutorials: a small config file you can write by hand, with a 'url' field for hosted servers or 'command' and 'args' for local ones.
claude mcp add --scope user --transport http claude-code-docs https://code.claude.com/docs/mcp
A server's scope is fixed when you add it — to move one, remove it and re-add it at the new scope.
Which MCP servers should you try next?
Two more shapes cover almost everything: local servers that run on your machine, and hosted servers that sit behind a sign-in. The docs server you just added was the third, simplest shape — hosted and open. Once you've seen these two, almost every server in the Anthropic Directory is just a variation you already understand.
How do I give Claude a browser with Playwright?
Local servers are programs Claude starts on your machine, ideal for tools that need your computer — like a browser. The Playwright server gives Claude a real browser it can navigate and click, no account needed. It's the most popular local server people add right after the docs one.
claude mcp add playwright -- npx -y @playwright/mcp@latest
No --transport flag because local servers use the default 'stdio'. Everything after the -- separator is the command Claude Code runs to start the server. Then say to Claude: 'Use playwright to open example.com and tell me the page title'.
How do I connect a server that needs a sign-in?
The other shape is servers behind a sign-in: hosted services like Notion, Sentry or Linear. You add the URL, then run /mcp inside a session, pick the server, choose 'Authenticate' — your browser opens, you sign in, done. Services that use a token instead take it at add time with --header "Authorization: Bearer <token>".
Only connect servers you trust. A server that fetches external content can expose you to prompt injection — sneaky instructions hidden in web pages or data. Also, project-scoped servers from .mcp.json always ask for your approval first, precisely so a cloned repository can't silently launch programs on your machine. That prompt is a feature, not a bug.
What if it doesn't connect?
Run claude mcp list and read the status. '! Needs authentication' means run /mcp and sign in. '✗ Failed to connect' on a local server is often just npx downloading the package — wait and retry, or start with MCP_TIMEOUT=60000 claude to give it a minute instead of thirty seconds. And remember: Claude Code reads .mcp.json at session start, so after editing it, exit and restart the session. If you ran the add command in a different folder, the local-scoped server stayed there — re-add it here or use --scope user.
Lab: your first two sockets
0/4Here's the mindset shift: stop asking 'what does Claude know?' and start asking 'what is Claude plugged into?'. Every adapter you add this week — docs, a browser, your task tracker — is a chore you'll never copy-paste again. Plug in one today; future you sends regards.

Author
Evgeny Arsentyev
PhD · Chief Product Officer at a healthtech company
▌ Reading is the blue pill
Want to actually build this?
Guides explain. The free course transforms — personalized, gamified, and built to get you shipping fast.
◉ Start the free course →