MCP lets Claude Code use external tools — filesystems, databases, APIs. Adding one is a single command; the only thing to get right first is which of the two shapes you have.
1. Local command, or hosted URL
A stdio server is a program Claude Code launches as a child process. An http server is
one somebody else hosts, reached by URL. sse still exists but is deprecated.
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem C:\path\to\allow
What it does: registers a stdio server. The -- separator is required — everything after
it is passed to the server untouched, and the trailing path is the only directory it may reach.
claude mcp add --transport http stripe https://mcp.stripe.com
What it does: registers a hosted server by URL instead of a command.
2. Choose the scope
--scope local(default) — just you, this project. Stored in~/.claude.json.--scope project— shared with your team via a committed.mcp.jsonat the repo root.--scope user— available in all your projects.
claude mcp add --scope user --transport http github https://api.githubcopilot.com/mcp/
What it does: makes one server available everywhere you work. Never commit a token in a
project-scoped .mcp.json.
3. Pass secrets properly
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY airtable -- npx -y airtable-mcp-server
What it does: sets an environment variable for a stdio server. For hosted servers use a header
instead: --header "Authorization: Bearer YOUR_TOKEN".
4. Confirm it connected
claude mcp list
What it does: lists every configured server with its health status. claude mcp get <name>
shows one in detail, and claude mcp remove <name> deletes it.
/mcp
What it does: the in-session panel — ✔ Connected, ! Needs authentication or
✘ Failed to connect, with a tool count and options to re-authenticate or disable a server.
If it fails
Servers load at session start, so add one and then start a new session. A server that fails
immediately is usually a wrong command path or a missing runtime — run the part after -- in
your own shell and read the error. ! Needs authentication means claude mcp login <name>.
Pick carefully: an MCP server runs with your permissions, and its tool output enters your prompt. Start with the maintained shortlist — several servers people still recommend have been archived. For GitHub, see connect Claude Code to GitHub.
Source: Claude Code MCP documentation.