You're deep in a refactor and Claude Code keeps guessing at a library's API from memory. Or you want it to read the failing test run, or the ticket, instead of you pasting them in. One command fixes that: claude mcp add connects Claude Code to an MCP server, and from then on it can look things up for itself.
The same command handles both kinds of server: a URL on the internet, or a program on your machine.
Add a remote server
The pattern is:
claude mcp add --transport http <name> <url>For example, Context7 serves version-specific library documentation and code examples from a public URL. This is its exact command, built from its registry record:
Context7 in Claude Code. Run in a terminal:
claude mcp add --transport http context7 https://mcp.context7.com/mcpBuilt from the server's registry entry, the same config as on its listing page.
If the server takes a token in a header instead of a sign-in, add --header:
claude mcp add --transport http my-api https://api.example.com/mcp \
--header "Authorization: Bearer your-token"Some older servers only speak SSE. Claude Code's docs call SSE deprecated and, as of 19 November 2026, say that version 2.1.265 and later tries HTTP first and falls back to SSE by itself. On earlier versions, use --transport sse.
Add a local server
Everything after -- is the command that starts the server:
claude mcp add [options] <name> -- <command> [args...]Here is Microsoft's Playwright server, which lets Claude open and test web pages:
Playwright MCP in Claude Code. Run in a terminal:
claude mcp add playwright-mcp -- npx -y @playwright/mcpBuilt from the server's registry entry, the same config as on its listing page.
Pass keys with --env KEY=value, once per key. Put another option, such as --transport stdio, between the last --env and the server name, or Claude Code reads the name as one more key:
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable -- npx -y airtable-mcp-serverChoose who gets the server
Every server is saved in a scope. Pick one with --scope (or -s):
Just for you
- local (the default): you, in this project only. Saved in
~/.claude.json. - user: you, in every project. Also in
~/.claude.json.
For your whole team
- project: everyone who works in this repository.
- Saved in
.mcp.jsonat the project root, so you commit it with the code. - Claude Code asks each person to approve it the first time.
claude mcp add --transport http shared-server --scope project https://example.com/mcpA project's .mcp.json can read secrets from environment variables, so no one commits a key:
{
"mcpServers": {
"api-server": {
"type": "http",
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}To be asked about a project's servers again, run claude mcp reset-project-choices.
Check, sign in and tidy up
claude mcp listshows your servers,claude mcp get <name>shows one,claude mcp remove <name>deletes it.- Inside Claude Code,
/mcpshows each server's status and finishes an OAuth sign-in in your browser. The same menu has Clear authentication.
Servers developers use
Popular servers for development work, from the directory:
MCP servers for developer tools from the directory, most popular first.
More for developer tools
Official MCP server connecting AI assistants to GitHub repos, issues and workflows
- Remote
- Open source
- 34.6K GitHub stars
- Developer tools

Python framework for building MCP servers, clients and interactive apps
Not checked yet- Open source
- 28.7K GitHub stars
- Developer tools

Local MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.8K GitHub stars
- Knowledge and memory

Local search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

CLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 468K GitHub stars
- Developer tools
In short
- Remote:
claude mcp add --transport http <name> <url>. - Local:
claude mcp add <name> -- <command> [args]. --scope projectwrites.mcp.jsonfor the team;/mcpshows status and handles sign-in.
What to try next
Share this lesson- Set up the same servers in Cursor if you switch editors.
- Ready to make your own? Build your first MCP server in about fifteen minutes.