Short answer: To add MCP servers to Claude Code, run claude mcp add in your terminal. For a remote server use claude mcp add --transport http <name> <url>. For a local one use claude mcp add --transport stdio <name> -- <command>. Then run /mcp inside Claude Code to check the server and sign in.
MCP servers give an AI agent tools for other apps, such as your issue tracker or a browser. If the idea is new, read our guide on what MCP servers are first. This post covers Claude Code, the terminal agent. For Claude on the web and in Claude Desktop, see how to use MCP servers in Claude. Browse the full MCP servers directory to find servers to add.
Claude Code MCP setup at a glance
| What to know | |
|---|---|
| Add a remote server | claude mcp add --transport http <name> <url> |
| Add a local server | claude mcp add --transport stdio <name> -- <command> [args] |
| Add from JSON | claude mcp add-json <name> '<json>' |
| List servers | claude mcp list |
| Inspect or remove one | claude mcp get <name> and claude mcp remove <name> |
| Check status and sign in | /mcp inside Claude Code |
| Choose where it is stored | --scope local, project or user |
| Team config file | .mcp.json in the project root |
| Deprecated transport | SSE, so use HTTP where the server offers it |
What you need first
- Claude Code installed and working in your terminal. If you are still choosing a tool, our Claude Code vs Codex and Cursor vs Claude Code comparisons help.
- For a local server started with
npx, Node.js on your machine. Check it withnode --version. - An account with the service behind the server, such as Notion or Linear. The servers on Klyvoo are free to connect, but they need that account.
How to add a remote MCP server
Remote servers are the easy case. They run on the vendor’s side, so there is nothing to install. Anthropic’s docs recommend the HTTP transport for them:
claude mcp add --transport http <name> <url>
Here is the real example from Anthropic’s documentation, which connects Notion MCP:
claude mcp add --transport http notion https://mcp.notion.com/mcp
The same pattern works for any remote server. Our directory lists the URL on each server page:
claude mcp add --transport http linear https://mcp.linear.app/mcp
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
Those URLs come from the Linear MCP and Sentry MCP pages. If a server wants a fixed key instead of a browser sign-in, pass it as a header:
claude mcp add --transport http secure-api https://api.example.com/mcp \
--header "Authorization: Bearer your-token"
Anthropic marks the older SSE transport as deprecated and says to use HTTP servers where available. SSE still has a flag, --transport sse, for servers that offer nothing else.
Sign in to a remote server
Most remote servers use OAuth. Start Claude Code, type /mcp and follow the browser login. The same menu has a “Clear authentication” option to revoke access. You can also sign in from the shell with claude mcp login <name>, and sign out with claude mcp logout <name>.
How to add a local MCP server
A local server is a program that runs on your computer, started by Claude Code. Use the stdio transport and put the command after a double dash:
claude mcp add [options] <name> -- <command> [args...]
For Playwright MCP, which drives a real browser, the command on our server page is npx @playwright/mcp@latest. Added to Claude Code, it looks like this:
claude mcp add --transport stdio playwright -- npx @playwright/mcp@latest
Anthropic’s own stdio example passes an environment variable with --env:
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
-- npx -y airtable-mcp-server
Why the double dash matters
The -- separates Claude’s own options (--transport, --env and --scope) from the command that starts the server. Everything after it goes to the server untouched. Without it, Claude Code would read the server’s flags as its own and fail. Also, --env takes several KEY=value pairs, so if the server name follows it directly, the CLI reads the name as another pair. Put another option, such as --transport stdio, between them.
Local, project or user scope: where the server is saved
Add --scope (or -s) to choose who gets the server:
| Scope | Where it loads | Shared with the team | Stored in |
|---|---|---|---|
| local (default) | The current project only | No | ~/.claude.json |
| project | The current project only | Yes, through version control | .mcp.json in the project root |
| user | All your projects | No | ~/.claude.json |
For example, this saves a server for everyone who uses the repository:
claude mcp add --transport http shared-server --scope project https://example.com/mcp
If the same server name exists in more than one scope, the order of precedence is local, then project, then user. Claude Code does not merge fields across scopes. A project-scoped server asks each person for approval the first time, and claude mcp reset-project-choices resets those answers.
Share servers with your team in .mcp.json
Project scope writes a .mcp.json file at the root of your repository. You can also write it by hand and commit it:
{
"mcpServers": {
"shared-server": {
"type": "http",
"url": "https://example.com/mcp"
}
}
}
The file supports ${VAR} and ${VAR:-default} in the command, arguments, env, URL and headers. Use that for keys, so the secret stays in each person’s environment and not in git.
Check that it works
- Run
claude mcp list. It shows every configured server and its health. - Run
claude mcp get <name>for the details of one server. - Inside Claude Code, run
/mcpto see status, sign in and clear a login. - Ask Claude to do something only that server can do, such as “list my open Linear issues”.
To remove a server, run claude mcp remove <name>. For a remote server this also deletes its stored OAuth tokens.
Common errors and fixes
- The server shows as failed in
/mcp. Run the exact command in your terminal to see the error. A missing Node.js is the usual cause fornpxservers. - The CLI rejects the server name after
--env. Put--transport stdioor another option between--envand the name, as above. - The server’s flags are read as Claude’s. You left out the
--. Put it before the command. - A slow server times out at startup. Set a longer limit when you launch, for example
MCP_TIMEOUT=10000 claudefor 10 seconds. - A tool returns a very large result. Claude Code warns when output passes 10,000 tokens and limits it to 25,000 by default. Raise the limit with
MAX_MCP_OUTPUT_TOKENS=50000if you need to. - Your claude.ai connectors are missing. Anthropic’s docs say they load when you are logged in with a claude.ai account. They do not load when
ANTHROPIC_API_KEYor a third-party provider is active.
Which MCP servers to add first
Start with servers that match the tools you already use. These all work with Claude Code, according to their pages on Klyvoo:
- GitHub MCP Server: manage repositories, issues and pull requests. Sign-in is OAuth or a personal access token.
- Playwright MCP: open pages, click and fill forms to test your web app. Local, no sign-in.
- Sentry MCP: search errors and look into issues while you debug.
- Linear MCP: find and update issues without leaving the terminal.
- Notion MCP: search and edit pages and databases.
Add two or three, then see how Claude uses them before you add more. Every server adds tools for Claude to choose from, and a short list keeps its choices sharp. For more ideas, see our AI coding agents page and the MCP servers directory.
What MCP servers in Claude Code cannot do
A server only exposes what its maker built, and only within what your account allows. A server runs with your access, so read what a tool is about to change before you approve it, and keep tokens in environment variables. MCP also does not replace good project notes. Rules about your codebase still belong in a CLAUDE.md file, not in a server.
FAQ
How do I add an MCP server to Claude Code?
Run claude mcp add with the transport, a name and either a URL or a command. For a remote server that is claude mcp add --transport http <name> <url>. For a local one it is claude mcp add --transport stdio <name> -- <command>.
Where does Claude Code store MCP servers?
It depends on the scope. Local and user servers are stored in ~/.claude.json. Project servers are stored in a .mcp.json file in the project root, which you can commit so your team gets the same servers.
How do I list or remove MCP servers in Claude Code?
Run claude mcp list to see every server. Use claude mcp get <name> for the details of one. Use claude mcp remove <name> to delete it. Inside Claude Code, /mcp shows status and handles sign-in.
What is the difference between HTTP and SSE transport?
HTTP is the recommended transport for remote servers. SSE is deprecated, and Anthropic says to use HTTP where the server offers it. Use SSE only for a server that supports nothing else.
Do I need Node.js to use MCP servers in Claude Code?
Only for local servers that start with npx. Remote servers need no install at all, because you add them with a URL.
Are MCP servers free in Claude Code?
Adding a server costs nothing, and the servers listed above are free to connect. You still need an account with the service behind them, and that service sets its own prices.
These commands come from Anthropic’s Claude Code MCP documentation, checked in October 2026. Options change between releases, so follow that page if a flag differs. For servers to try next, browse the Klyvoo MCP servers directory.
How do I add an MCP server to Claude Code?
claude mcp add --transport http <name> <url>. For a local one it is claude mcp add --transport stdio <name> -- <command>.Where does Claude Code store MCP servers?
How do I list or remove MCP servers in Claude Code?
claude mcp list to see every server. Use claude mcp get <name> for the details of one. Use claude mcp remove <name> to delete it. Inside Claude Code, /mcp shows status and handles sign-in.