Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Connect a remote MCP server to Claude Code with the claude mcp add command and the server’s published endpoint:

claude mcp add --transport http <name> <url>

For example, Anthropic documents:

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

Replace both notion and the URL with values supplied by your MCP server operator. The endpoint must support the HTTP transport Claude Code expects; a normal website or REST API URL is not automatically an MCP endpoint.

Before you connect: confirm the endpoint and prerequisites

Ask the service provider for its MCP endpoint, supported remote transport, and authentication method. Anthropic documents HTTP and SSE as separate remote options. Use --transport http only when the server supports HTTP (often called Streamable HTTP); use SSE only when the provider specifically instructs you to do so.

Claude Code prerequisites

These are general Claude Code setup requirements, not requirements unique to MCP over HTTP. Anthropic lists macOS 10.15 or later, Ubuntu 20.04 or later or Debian 10 or later, and Windows 10 with WSL 1/2 or Git for Windows. The setup guidance also lists at least 4 GB of RAM and Node.js 18 or later. Check the current Claude Code setup guide for current installation details.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What MCP provides

Anthropic describes the Model Context Protocol as “an open protocol that standardizes how applications provide context to LLMs.” In Claude Code, an MCP server exposes tools or resources that Claude can use after the connection is configured.

Add a remote HTTP MCP server

  1. Obtain the exact MCP URL from the operator. Confirm that it is an MCP endpoint, not the service’s home page or an unrelated API endpoint.
  2. Choose a short server name. This name becomes the identifier used by Claude Code commands.
  3. Run the add command from your terminal:
    claude mcp add --transport http <name> <url>
  4. Start Claude Code in the relevant project and inspect the available MCP connections with /mcp.

Anthropic’s documented example is:

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

Do not assume that this example endpoint is suitable for another account, region, or third-party service. Use the URL published by the server’s operator.

Authenticate the connection

Bearer token in a header

If the server requires a static token, Claude Code supports a header argument:

claude mcp add --transport http --header "Authorization: Bearer your-token" <name> <url>

Use a placeholder while documenting or testing a command. Never paste a real credential into a shell history, a ticket, or a committed project file. A token in a command line may be visible through shell history or process inspection, depending on your operating system.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

OAuth 2.0

For an OAuth-protected remote server, add the server first, then run /mcp inside Claude Code. The interactive MCP interface can start the browser-based authorization flow. Anthropic states that OAuth applies to both HTTP and SSE remote transports. Complete authorization in the browser account requested by the provider, then return to Claude Code and check the connection.

Environment variables for shared configuration

Anthropic documents environment-variable expansion in .mcp.json, including ${VAR} and ${VAR:-default}. This keeps shared configuration separate from secret values. For example:

{
  "mcpServers": {
    "internal-tools": {
      "type": "http",
      "url": "${MCP_URL}",
      "headers": {
        "Authorization": "Bearer ${MCP_TOKEN}"
      }
    }
  }
}

Set the variables before launching Claude Code:

export MCP_URL="https://example.invalid/mcp"
export MCP_TOKEN="replace-with-a-secret"

If a referenced variable has neither a value nor a default, parsing fails. Treat the resulting configuration as sensitive even when the secret itself is supplied through the environment.

Choose the right configuration scope

Claude Code can store MCP server entries at different scopes. Choose based on who should receive the connection and where it should be available.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Scope Best for Important consideration
Local A private connection for your current user and project context Useful when the endpoint or credentials should not be shared with the team
Project A team configuration committed in the project root Stored in .mcp.json; Claude Code prompts for approval before using project-scoped servers
User Your server across multiple projects Available to that user’s projects, so review its tools and credentials carefully

Use project scope only when everyone who receives the configuration should understand and approve the tools exposed by that server. Keep tokens out of the JSON by using environment-variable expansion.

Verify, inspect, and remove the server

List configured servers

claude mcp list

This shows the MCP entries Claude Code knows about. A listed entry confirms configuration, not that the remote service is reachable or that your account is authorized.

Inspect one entry

claude mcp get <name>

Replace <name> with the identifier used in claude mcp add. Check the transport, URL, and non-secret settings for spelling errors.

Use the interactive MCP interface

Inside Claude Code, enter:

/mcp

Use this interface to view remote connections and complete OAuth when the server uses browser authorization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remove an entry

claude mcp remove <name>

Remove and re-add a server when you need to replace an incorrect URL, transport, or authentication configuration.

HTTP versus SSE: do not guess

HTTP and SSE are both documented remote transport choices, but they are not interchangeable settings. The server operator determines which one the endpoint supports. If the provider gives an SSE URL, follow its SSE instructions rather than forcing --transport http. If it gives a Streamable HTTP endpoint, use the HTTP command shown above.

A URL that returns JSON in a browser, an ordinary REST endpoint, or a web application login page does not prove that it is an MCP endpoint. The operator should identify the transport and authentication requirements explicitly.

Proxy and network behavior

Claude Code respects the HTTP_PROXY and HTTPS_PROXY environment variables. Anthropic’s corporate proxy guidance says Claude Code does not support NO_PROXY and does not support SOCKS proxies. These are general Claude Code networking notes, so verify your organization’s proxy policy before troubleshooting the MCP server itself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
export HTTPS_PROXY="http://proxy.example:8080"
export HTTP_PROXY="http://proxy.example:8080"
claude mcp list

Do not publish proxy credentials in a project file. If your proxy performs TLS inspection, your organization may also need its approved certificate installed in the operating system or runtime trust store.

Troubleshooting common failures

“Unknown option” or command syntax errors

  • Confirm that the command uses --transport http, followed by a name and URL.
  • Check your Claude Code version and the current CLI reference.
  • Quote URLs containing shell-special characters.

The server appears in the list but tools do not load

  • Run claude mcp get <name> and verify the endpoint exactly matches the provider’s MCP URL.
  • Confirm that the endpoint supports HTTP rather than SSE.
  • Check whether the server requires OAuth or a bearer header.
  • Use /mcp to complete an outstanding OAuth flow.

Authentication fails

  • Regenerate or re-copy the token without surrounding quotation marks becoming part of the value.
  • Ensure the header is formatted as Authorization: Bearer token.
  • For OAuth, sign in with the account that has access to the server and complete every consent screen.
  • Move secrets to environment variables instead of committing them to .mcp.json.

Configuration parsing fails

Inspect every environment-variable reference in .mcp.json. A variable written as ${VAR} must be set, unless a default is provided with ${VAR:-default}. A missing required value can prevent the configuration from loading at all.

Requests time out behind a corporate network

  • Check HTTP_PROXY and HTTPS_PROXY values.
  • Ask your network administrator whether outbound access to the MCP host is allowed.
  • Remember that Claude Code does not support SOCKS proxies or NO_PROXY according to Anthropic’s proxy documentation.
  • Test the same endpoint from the same machine and network, then distinguish a network failure from an MCP authentication failure.

A project server asks for approval

That behavior is expected for project-scoped servers. Review the server’s URL and exposed tools before approving it. If the connection is personal, use a local or user scope instead of adding it to the shared project configuration.

Operational and security practices

  • Obtain endpoints from the service operator and record which transport they support.
  • Use the narrowest scope that meets your sharing needs.
  • Keep bearer tokens and OAuth credentials out of source control and shell transcripts where possible.
  • Review project-scoped MCP changes like any other code or dependency change.
  • Remove stale entries with claude mcp remove when a service is retired or access is revoked.
  • Recheck Anthropic’s documentation before automating setup because CLI syntax, authentication behavior, and third-party endpoints can change.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If what you need is a reliable screenshot service for an AI workflow, ScreenshotNeo provides an MCP server for Claude, Cursor, and other MCP clients, with tools named take_screenshot, get_page_info, and capture_pdf. For a direct API capture, use one request:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo documentation for API options and MCP details. ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and each response reports its page verdict and billing status in headers. The service includes full-page capture, CSS-selector element capture, device and viewport controls, dark mode, PDF output, JavaScript and CSS, custom headers and cookies, geolocation, blocking rules, caching, signed links, asynchronous jobs, bulk capture, and a usage API.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account.

Frequently Asked Questions

Can I connect an MCP server without committing a project file?

Yes. Use a local or user-scoped configuration instead of project scope. Project scope is intended for shared configuration in the project root.

Does a successful `claude mcp list` test the server?

No. It confirms that Claude Code has a configured entry. Reachability, authentication, and tool availability still need to be checked through the MCP interface.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What should I do if the provider gives both HTTP and SSE URLs?

Use the transport the provider recommends for your client and account. Select HTTP with `–transport http` only for the HTTP endpoint.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.