October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Anthropic

How to Connect Claude Code to an MCP Server over HTTP

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

To connect a remote MCP server to Claude Code over HTTP, run claude mcp add --transport http <name> <url> in a terminal. Replace the name and URL with values supplied by the server operator; an ordinary website or API URL is not necessarily an MCP endpoint. For example, Anthropic documents claude mcp add --transport http notion https://mcp.notion.com/mcp. See Anthropic’s Claude Code MCP guide for the official setup instructions.

Before you connect: get the right endpoint and transport

Ask the MCP server operator for the server’s MCP endpoint, supported transport, and authentication method. A service may publish a dedicated MCP URL that differs from its homepage or ordinary REST API. Do not assume a URL supports MCP just because it is reachable in a browser.

Claude Code’s documentation describes HTTP and SSE as separate remote transport choices. Use --transport http when the server supports HTTP (commonly described as Streamable HTTP); use SSE only when the server operator says that is the transport it provides. Choosing a transport does not convert one type of endpoint into another. Anthropic’s [MCP guide] shows the HTTP setup and distinguishes the remote options.

  • Server name: a short label you choose, such as notion. Use a distinct name for each configured server.
  • Server URL: the exact MCP endpoint supplied by the operator, including its path.
  • Credentials: the method the server requires, such as an authorization header or OAuth.

Add an HTTP server from the terminal

Run this command in a terminal where Claude Code is installed:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
claude mcp add --transport http <name> <url>

Replace both placeholders with the server name and endpoint. For example, Anthropic’s documented example is:

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

The Notion URL is an example, not a universal MCP endpoint or a guarantee that any third-party service will continue to provide that endpoint. For another service, use the URL its operator currently publishes.

The command adds a server entry to Claude Code’s MCP configuration. The claude mcp command family is also documented in Anthropic’s CLI reference. If the CLI reports that the command or option is unknown, first check that Claude Code is installed and that the command follows the documented spelling, including --transport http.

Choose where the server configuration belongs

Claude Code supports local, project, and user configuration scopes. Pick the scope based on who should be able to use the server and where the configuration should apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Scope When it fits Important consideration
Local A private setup for the current project and user context. It is not the shared project configuration.
Project A server configuration intended to be shared with a project through its root .mcp.json. Claude Code prompts for approval before using project-scoped servers. Review shared server entries before approving them.
User A server you want available across projects for your user. It is broader than a single project’s configuration.

Choose deliberately before sharing a project configuration: an MCP server can make tools available to Claude Code, and project scope involves an approval step. The documentation describes these scopes; consult Anthropic’s MCP guide for current CLI configuration details.

Configure authentication without exposing secrets

Authentication is determined by the server, not by the fact that the connection uses HTTP. If its operator requires a bearer token in an HTTP header, Anthropic documents this command pattern:

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

Replace your-token with the credential supplied to you, and keep the real value out of shell history, screenshots, shared documentation, and committed configuration. The example shows the header format; it does not mean every HTTP MCP server uses bearer authentication.

When the server uses OAuth

Add the remote server using its HTTP endpoint, then open Claude Code’s interactive interface and enter /mcp. Use that interface to complete the browser-based OAuth flow. Anthropic says OAuth applies to both HTTP and SSE remote servers. A token-header setup and OAuth are alternatives only when the server supports them; follow the server operator’s instructions rather than selecting whichever seems convenient.

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

When configuration is shared in .mcp.json

Anthropic documents environment-variable expansion in .mcp.json for URL and header fields. It supports forms such as ${VAR} and ${VAR:-default}. This lets a shared file refer to a credential held in the environment instead of embedding the literal secret in the file. If a required variable has neither a value nor a default, parsing fails. Set the needed variable in the environment used to run Claude Code, and check the variable name and spelling if the configuration cannot be parsed.

Do not put a real token in a default value in a shared file: the default is still part of the configuration text. Keep credentials private and use the server’s recommended secret-handling method.

Verify the configured server

After adding the entry, use the CLI to check that Claude Code recognizes it:

  1. Run claude mcp list to see configured MCP servers.
  2. Run claude mcp get <name>, substituting the name you chose, to inspect that server’s entry.
  3. In the interactive Claude Code session, enter /mcp to open the MCP interface; use it for remote OAuth authentication when required.

These checks confirm that an entry is present and help expose configuration problems. They do not establish that a remote endpoint is always available or that every tool it advertises will work for every request. If the server does not appear, check the name, URL, transport, and selected configuration scope before changing credentials.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

HTTP, SSE, and network constraints

HTTP and SSE are separate supported remote choices in the Claude Code guide. The deciding factor is the transport the MCP server actually implements. If the operator supplies an SSE endpoint, do not register it as HTTP merely because both are network connections; if the endpoint is documented for HTTP, use the HTTP command shown above.

In some work or corporate networks, a proxy can affect whether Claude Code reaches a remote server. Anthropic’s general proxy guidance says Claude Code respects HTTP_PROXY and HTTPS_PROXY, does not support NO_PROXY, and does not support SOCKS proxies. These are general Claude Code network notes, not a guarantee about every MCP server or proxy setup. See the corporate proxy documentation if your environment requires a proxy.

Claude Code’s general setup page lists macOS 10.15 or later, Ubuntu 20.04 or Debian 10 or later, Windows 10 with WSL 1/2 or Git for Windows, 4 GB or more of RAM, and Node.js 18 or later among its setup prerequisites. Those are general Claude Code setup details, not requirements unique to an HTTP MCP connection; check the setup guide for the applicable installation instructions.

Troubleshooting common connection problems

  • Unknown command or option: confirm Claude Code is installed and the command is entered as claude mcp add --transport http. Refer to the CLI reference for the current command family.
  • Server is not listed: run claude mcp list, then inspect the intended entry with claude mcp get <name>. Check that you are looking in the expected local, project, or user context and that the name matches.
  • Connection fails or the endpoint rejects the request: verify the exact MCP URL with the operator, including its path, and confirm it supports HTTP rather than SSE. A homepage URL or regular API endpoint may not be an MCP endpoint.
  • Authentication is rejected: confirm whether the server expects a bearer header or OAuth. For OAuth, use /mcp in the interactive CLI to complete the browser flow. For a header, check the required header scheme and token value without publishing the secret.
  • Configuration parsing fails: if the entry uses environment-variable expansion, verify that every required variable exists in the environment used by Claude Code. An unset variable without a default can cause parsing to fail.
  • It works at home but not on a managed network: ask whether the network requires a proxy and review Anthropic’s proxy notes. Do not assume unsupported proxy variables or SOCKS settings will be honored.
  • Project server awaits approval: project-scoped servers prompt for approval before use. Review the entry and its source before approving it; approval is a configuration-scope behavior, not a transport error.

Or skip the browser setup

If the job is taking a website screenshot rather than connecting Claude Code to an arbitrary MCP server, ScreenshotNeo offers a one-request screenshot API and an MCP server for AI agents. Its MCP tools include take_screenshot, get_page_info, and capture_pdf. The API call below requests a screenshot of Stripe; replace the target URL as needed. See the ScreenshotNeo API documentation for request options.

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

ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots. These are product-specific terms, not features of Claude Code’s MCP connection.

Sign up for ScreenshotNeo’s free plan for 1,000 screenshots a month with no card.

What MCP means in this setup

MCP is the protocol that lets applications expose context and tools to language-model clients. Anthropic describes it as “an open protocol that standardizes how applications provide context to LLMs” in its MCP overview. In practice here, Claude Code is the client, the remote service is the MCP server, and the endpoint plus supported transport and authentication determine whether the connection can be configured.

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.