DIRTY STATIC / DISPATCH Tutorials03 DEC 2026 • 9 MIN READ
A laptop terminal on a steel desk in a concrete room, cabled to a distant server tower, the cable glowing caution yellow
TutorialsINTELLIGENCE FOR THE MACHINE AGE

Add Remote MCP Servers In Claude Code

Claude Code can use tools from services you already work in, once you connect those services as remote MCP servers. This tutorial adds one server over HTTP, covers OAuth sign in and header auth, explains local, project, and user scope, shares a server through a project file, and verifies the connection before any real work starts.

Start reading ↓

Copying data into a chat window is a slow way to work. You paste an issue, a dashboard figure, or a page from a tool, Claude answers from the paste, and the real system stays out of reach. A remote MCP server ends that loop. Once it is connected, Claude Code can read and act on that system directly, using the tools the server offers.

MCP is short for Model Context Protocol, an open standard for linking AI tools to outside services. Anthropic says Claude Code can connect to hundreds of tools and data sources through it. The useful part is also the part that needs care. A connected server acts through your account, so scope and sign in choices matter as much as the add command itself.

This guide follows the official Claude Code MCP documentation at code.claude.com, checked on December 3, 2026. It claims no test run of its own. Every command below matches the documentation as published on that date.

What You Will Build or Learn

You will connect one remote MCP server to Claude Code and prove the connection is sound. The worked example uses Notion, because the official documentation uses its server address as the example. The same steps apply to any remote server in the Anthropic Directory, since directory connectors use the same MCP setup as Claude Code.

You will also learn where each scope stores its settings, how header auth differs from OAuth, and how to share one server with a team through a project file. For a single service example in depth, see our tutorial on connecting the ngrok MCP server to coding agents. For the local server side of the picture, see giving a local model real tools with Ollama and MCP.

A concrete desk with a terminal showing abstract connected nodes and a checked list, one cable glowing caution yellow The list check matters more than the add command. A server that is listed but not connected gives Claude no tools at all. Illustration: Dirty Static

Before You Begin

Pick the server from a source you trust. Anthropic points readers to the Anthropic Directory for reviewed connectors, and a server setup page should give you either a server URL, a launch command, or a JSON block. This tutorial covers the URL case, which is the remote case. A launch command means the server runs on your own machine instead, and that is a local stdio server, not this guide.

One version note before the steps. Claude Code tries the HTTP transport first and switches to SSE on its own when a server accepts only SSE. That automatic switch needs Claude Code version 2.1.265 or later, per the documentation. On an older version, pass the SSE transport flag in Step 2 instead.

Step 1: Choose a Scope

Action: decide where this server should live before you add it. Scope decides who can use the server and where its settings are stored.

ScopeWho can use itWhere it is stored
localOnly you, in the current project~/.claude.json, under the current project
projectEveryone who works in the projectA .mcp.json file at the project root
userOnly you, in every project~/.claude.json

Expected result: you have one scope in mind. Local is the default when you add no scope flag, and it is the right first choice for a server you are trying out. Use project scope only when the team should share the server. Use user scope for a personal server you want in every project.

Step 2: Add the Server Over HTTP

Action: run the add command with the HTTP transport, a name, and the server URL. HTTP is the transport Anthropic recommends for remote servers, and it is the most widely supported option for cloud services.

Terminal

claude mcp add --transport http notion https://mcp.notion.com/mcp

To set the scope at the same time, place the scope flag before the server URL, as the documentation shows for shared servers:

Terminal

claude mcp add --transport http shared-server --scope project https://example.com/mcp

Expected result: the command prints a line that starts with Added, which means the settings were written. A server name can use letters, numbers, hyphens, and underscores. If the service gives you an SSE endpoint and your version is older than 2.1.265, use --transport sse in place of --transport http.

Step 3: Sign In When the Server Asks

Action: start Claude Code and open the MCP panel, then choose the new server and complete its sign in flow in your browser.

Terminal

/mcp

The documentation also gives a shell route for sign in:

Terminal

claude mcp login notion

Expected result: the server moves to a connected state, or to a state that says it needs authentication until you finish the browser flow. Sign in interactively first if you plan to use the server in a scripted run, because scripted runs cannot complete an OAuth flow on their own, per the documentation notes gathered for this guide.

Step 4: Use a Header Instead of OAuth, When a Service Requires One

Action: some services use a fixed token rather than OAuth. For those, pass the token as a header when you add the server, with the value read from your environment.

Terminal

claude mcp add --transport http example https://mcp.example.com/mcp --header "Authorization: Bearer ${EXAMPLE_TOKEN}"

Expected result: the server connects with that header on each request. The ${EXAMPLE_TOKEN} form keeps the real value out of the command history file and out of any project file, as long as you set the variable in your own environment and never replace the placeholder with a real token in a shared place.

Step 5: Share a Server Through a Project File

Action: for project scope, you can also write the entry by hand in .mcp.json at the project root and commit that file. A remote entry must carry a type. An entry with a URL and no type is a fault: Claude Code reads it as a stdio server, skips it, and reports the fault.

{
  "mcpServers": {
    "notion": {
      "type": "http",
      "url": "https://mcp.notion.com/mcp"
    }
  }
}

The type value streamable-http also works in JSON, as an alias for http, so settings copied from a server page work without edits. You can add the same entry from the shell with claude mcp add-json, passing the object inside mcpServers, not the wrapper around it.

Expected result: a teammate who opens the project is asked to approve the server before it connects. That approval step is a feature. A cloned project cannot approve its own servers, per the documentation, so each person makes that call for themselves.

Verification

Run the list command in your shell:

Terminal

claude mcp list
claude mcp get notion

The list shows a health state beside each server, such as Connected, Needs authentication, or Failed to connect. The get command shows the detail for one server, and it shows an Issue line when a connection failed. In an open session, the /mcp panel shows the tool count beside each connected server.

Finish with a question that changes nothing. Ask Claude to read one item through the new server, such as listing pages or fetching a single record you name. A correct read, with no writes, proves the tools load and the sign in works. Only then ask for work that creates or changes anything.

Troubleshooting

ProblemWhat it usually meansFix
Server skipped, with a note about a URL but no typeA JSON entry has a URL and no type fieldAdd "type": "http" to the entry, or the type that matches the endpoint
Needs authenticationThe OAuth flow has not finishedOpen /mcp, choose the server, and finish sign in, or run claude mcp login <name>
Failed to connectThe server could not be reached, or it returned an errorRun claude mcp get <name> and read the Issue line, then check the URL for errors
Pending approvalA project server from .mcp.json awaits your approvalRun claude in the project and approve the server in the prompt
Same name shown with a warningThe same server name exists in more than one scope, with different endpointsKeep the entry you want and remove the others with claude mcp remove <name> --scope <scope>
Auth fails with a hidden space warningA pasted value carries leading or trailing whitespaceEdit the settings and remove the extra space; Claude Code does not trim values
No tools listed for a connected serverThe server advertises tools but exposes none to ClaudeCheck the tool count in /mcp; if it stays at zero, the fault sits with the server

To remove a server, run claude mcp remove <name>. Removing a remote server also deletes the OAuth tokens Claude Code stored for it, though it does not revoke those tokens at the service itself. To revoke first, run claude mcp logout <name> before you remove it, per the documentation. You can also switch a server off in the /mcp panel without removing it, which keeps its settings for later.

Next Steps

Add one server at a time and learn what its tools can do before you add the next one. A second server is easier to judge once you know how the first one behaves, where its prompts appear, and what its reads look like. When a server earns a place in team work, move it to project scope and let each teammate approve it on their own machine.

Sources

  • Anthropic, Claude Code documentation, Connect Claude Code to tools via MCP, code.claude.com/docs/en/mcp-servers, checked December 3, 2026. All commands, scope storage, transport notes, status names, and removal behaviour in this tutorial come from this page.
  • Anthropic Directory, for reviewed remote connectors that can be added with claude mcp add, as linked from the documentation above.
  • Illustration: Dirty Static, generated for this article.
■

END OF TRANSMISSION

Stay curious. Question everything.

CONTINUE THE DESCENT

MORE FROM DIRTY STATIC ↘