Skip to content
← All articles

How to Add an MCP Server to Claude Code

One command does it: claude mcp add --transport http, plus --header for the key. Add an MCP server to Claude Code, pick a scope and share it safely.

John Guerrero, with a beard and round glassesBy John GuerreroUpdated November 9, 2026
Abstract illustration: a server rack where a single command slides a new unit into its slot

Frequently asked questions

What command adds an MCP server to Claude Code?

For a remote server, run claude mcp add --transport http followed by a name and the server URL. If the server needs a key, add --header with an Authorization header. Claude Code stores the server and loads its actions in new sessions.

What is the difference between local, project and user scope?

Local is the default and applies only to you in the current project. Project writes to a .mcp.json file in the project root so the whole team shares it. User applies to you across all your projects. If a server is defined in more than one scope, local wins over project, and project over user.

How do I check that a server is connected?

Run claude mcp list in the terminal, or type /mcp inside a Claude Code session to see each server's status. If the server needs OAuth sign-in, /mcp also handles that.

Where should I keep an API key for an MCP server?

In an environment variable, not in a file you commit. In a project .mcp.json you can write the header as Bearer ${CLAUTIA_API_KEY}, and Claude Code expands it from your environment. Each teammate then sets their own key.

Why does Claude Code say a server failed to connect?

Common causes are a wrong URL, a missing or revoked key, an environment variable that was not set in the shell where Claude Code started, or the wrong transport. Test the URL and key with curl outside the agent, then open a new session.

How do I remove an MCP server?

Run claude mcp remove followed by the server name. Use claude mcp get with the name first if you want to check its details and scope.

Can Claude Code use Clautia's MCP server today?

Yes. Clautia documents the setup for Claude Code, Codex and Cursor. You create an API key in Clautia and add the server with a bearer token header. The full command is in the example below and in the Claude Code page.