How to Add a Custom MCP Connector to Claude

Add a remote MCP server to Claude as a custom connector, choose the right sign in option, and fix the Couldn't reach the MCP server error with a two minute check first.

Jahanzaib Ahmed
Updated 15 min read

Explore with AI

Claude and Model Context Protocol logos joined by an arrow for adding custom Claude MCP connectors

When Claude says "Couldn't reach the MCP server", one common reason is that Claude rejects your hostname before any request leaves Anthropic's network, so your server logs show nothing. This guide adds a two minute check you run before touching Claude's settings, then walks through adding a custom MCP connector: paste a remote server URL, pick how people sign in, and switch it on in a chat. It works on every plan, Free included (one connector), and takes about five minutes once the server is reachable.

The short answer to how you add a custom connector in Claude: open Customize, then Connectors, click + Add, then Add custom connector, enter a name and the server's HTTPS URL, keep the sign in settings Claude marks Detected, and click Add. As of November 21, 2026, Anthropic's help center lists custom connectors on the Free, Pro, Max, Ultra, Team and Enterprise plans, with Free limited to one. On Team and Enterprise an Owner adds the connector for the organization and each member clicks Connect (Step 4). Troubleshooting covers each error message by name.

Before you start

  • A Claude account on any plan. Free allows one custom connector, according to Anthropic's connector docs.
  • The HTTPS URL of a remote MCP server, for example https://mcp.example.com/mcp. If the server only runs on your laptop, this guide is the wrong route; the Claude Code setup with claude mcp add handles local servers.
  • Node 18 or newer for the check script in Step 2 (it uses the built in fetch and top level await). If you would rather use curl, the equivalent is curl -i with a POST of the same JSON body, plus dig A your-host for the DNS part.
  • On Team, an Owner or Primary Owner has to add the connector first. On Enterprise, an Owner, a Primary Owner or a member with a custom role that includes Manage access to Libraries can (Step 4 covers it). A member without one of those roles can't add one, per Anthropic's docs, so if the option is missing or greyed out, ask an Owner.

Step 1: Know where Claude connects from

Start here, because the rest depends on it. When you add a custom connector, the call comes from Anthropic's servers and never from your laptop. Per Anthropic's help center, the connection comes from Anthropic's cloud infrastructure, and that holds for claude.ai, Claude Desktop, Cowork and the mobile apps alike.

So a server that works in Claude Code or in your browser can still fail here. A server behind a VPN, on a private network, or behind a firewall that blocks Anthropic's address range will not connect. The help center adds one more rule: the server must answer on the standard HTTPS port, 443, so a URL that names another port, such as https://example.com:8443/mcp, fails. Once you know the path, the error messages read differently.

Diagram of a Claude custom connector request passing from Claude through Anthropic cloud and public DNS to an MCP server
The request starts in Anthropic's cloud, so your hostname must resolve to a public IPv4 address from the outside.

Note: Anthropic's troubleshooting page says Claude resolves your hostname first and rejects the connection if any returned address is private, loopback, carrier grade NAT, or missing a public A record. Connectors are IPv4 only, so an AAAA only hostname fails.

Step 2: Run a two minute check on your server

Save this as preflight.mjs. It does what Claude will do in its first seconds: resolve the hostname, then send an MCP initialize request without following redirects. The protocol version is a date string for the MCP revision, and it reads only the first chunk of the reply so a streaming server cannot hang it.

import dns from 'node:dns/promises'
const url = new URL(process.argv[2])
const out = {}
try { out.A = await dns.resolve4(url.hostname) } catch (e) { out.A = 'none: ' + e.code }
try { out.AAAA = await dns.resolve6(url.hostname) } catch (e) { out.AAAA = 'none' }
try {
  const r = await fetch(url, {
    method: 'POST', redirect: 'manual', signal: AbortSignal.timeout(10000),
    headers: { 'content-type': 'application/json', accept: 'application/json, text/event-stream' },
    body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'initialize', params: {
      protocolVersion: '2025-06-18', capabilities: {}, clientInfo: { name: 'preflight', version: '0.1' } } }),
  })
  out.status = r.status
  out.location = r.headers.get('location')
  out.wwwAuth = r.headers.get('www-authenticate')
  const reader = r.body.getReader()
  const first = await reader.read()
  out.bodyHead = new TextDecoder().decode(first.value || new Uint8Array()).slice(0, 200)
  await reader.cancel()
} catch (e) {
  out.error = String(e.cause?.code || e.name + ': ' + e.message)
}
console.log(JSON.stringify(out, null, 2))

Run node preflight.mjs https://your-server.example.com/mcp from a network that is not your office (a phone hotspot works), because Claude sees your server from the outside. An A record is just the DNS entry that maps a hostname to an IPv4 address; AAAA is the IPv6 version. I ran the script against two public servers on 2026-10-18, and again on 2026-10-23 with the same results, to show what the two healthy outcomes look like. The current MCP revision, 2026-07-28, removes the initialize handshake and adds server/discover, so a server that speaks only that revision may not answer this script. Servers that still support 2025-06-18 or 2025-11-25 do.

ServerStatusWhat it tells you
mcp.deepwiki.com/mcp200, text/event-streamOpen server. The body starts with a JSON result naming the server "DeepWiki". Pick No sign in.
mcp.linear.app/mcp401 with a WWW-Authenticate headerOAuth server. The header points to /.well-known/oauth-protected-resource/mcp and asks for scope "read write". Pick a sign in option.

A 401 is not a failure here: Anthropic's authentication docs say Claude needs that 401 to start sign in, and it ignores a WWW-Authenticate header sent on a 200.

Table mapping each result of the preflight check to the next step: fix DNS, register the redirect target, allowlist Anthropic's IP range, check the path, pick No sign in or pick a sign in option
Your preflight output tells you the next step: fix the network, change the URL, or choose the sign in option.

Now read your own output against this list:

  • A is "none" or private: fix DNS before anything else. Nothing else matters until a public IPv4 record exists.
  • location is set to another host: register the URL in the location header. Claude drops the Authorization header on a cross host redirect, so an apex to www redirect turns a working OAuth server into an authorization failure.
  • On a 403 or 429, a firewall (WAF) or CDN is blocking requests. Allowlist Anthropic's published IP range.
  • A 200 with an HTML body means you reached a web page. Check the path (/mcp versus /sse or the root).

Step 3: Add the connector on a Free, Pro, Max or Ultra plan

On an individual plan, Anthropic's help article gives these steps. Labels shift a little between accounts, so match by meaning.

  1. Open Customize, then Connectors. Click + Add, then Add custom connector.
  2. Name it and paste the URL. The name is what you see in the connectors list. Paste the exact URL your check passed, then click Continue.
  3. Review the authentication settings Claude detected. A second screen shows Authentication, OAuth client and, if available, Request headers. Compare them with your Step 2 result and change anything that does not match, then click Continue. Options Claude read from the server are marked Detected; if it could not read them, you get a message such as "Couldn't check the server" instead (see Troubleshooting).
  4. Click Add. If the connector then shows Connect, click it. If the server uses OAuth, a sign in window opens. Approve the scopes.

One account layout shows everything on a single screen. In that layout the OAuth client and request headers sit under Advanced, per the Claude docs. The same docs say authentication settings can't be changed after you add a connector, so to change them, remove it and add it again.

Step 4: Choose how people sign in to your Claude MCP connector

Pick this wrong and either sign in fails or the connector is open to anyone with the URL. The same docs describe three Authentication choices and, for OAuth, three OAuth client choices.

Your Step 2 resultAuthenticationOAuth client
200, no auth at allNo sign inNot shown
200, but some tools need an accountSign in when neededUse Claude's published identity
401 with WWW-AuthenticateSign in nowUse Claude's published identity, or Register automatically if the server rejects that
Server gave you a client ID and secretSign in nowUse your own OAuth client
Server wants an API key or bearer tokenNo sign in, plus a request header (a beta feature that may be missing on your account)Not shown
Decision tree mapping an MCP server response to the Claude connector sign in option: open, OAuth or API key
Your Step 2 result picks the option. For an API key, choose No sign in and put the key in a request header.

The published identity option is the one Anthropic recommends: the server reads Claude's client details from a metadata document Anthropic hosts, so you set nothing up, but the server must support that method. Register automatically uses Dynamic Client Registration and works with most servers. The MCP spec revision dated July 28, 2026 deprecates Dynamic Client Registration in favor of the Client ID Metadata Documents behind the published identity option, and keeps it for authorization servers that do not support those documents.

If you pick Use your own OAuth client, the help center says to register https://claude.ai/api/mcp/auth_callback as the redirect URL for that client, and to enter the Client Secret only if the server issued one.

Warning: No sign in means anyone holding the URL can use the connector. With an API key in a request header, Anthropic notes that on Team and Enterprise plans everyone using the connector reaches the service with that same credential. My advice, not Anthropic's: use a key scoped to read only access and rotate it if the URL ever leaks.

Team and Enterprise: someone with the right role (see Before you start) goes to Organization settings, then Connectors, clicks Add, hovers Custom and picks Web. The settings screens match Step 3. Members then find the connector marked "Custom" and click Connect to sign in with their own account. If the URL's domain matches a directory listing, such as a Workato workspace URL, the help center says the connector shows that service's name and branding instead of the Custom label.

Step 5: Turn it on and test it with a harmless prompt

Adding a connector does not enable it everywhere. In a chat, click + at the lower left, open Connectors (or Plugins), and flip the toggle for this one. Use the Search and tools menu, or set a tool to Blocked under Tool permissions on the connector's page as Anthropic's docs describe, to switch off tools you do not want in play.

Then ask for something read only and verifiable, such as "List the tools the connector gives you and what each one does." If Claude names tools that match your server's docs, the handshake worked. Run read only requests first and allow anything that writes only after you have seen what the tools do.

Read each approval prompt. Anthropic's guidance is to click Always allow only for a server and tool you trust to run unsupervised, and the same page warns that a malicious server can embed hidden instructions meant to push Claude into unintended actions. For the security side of handing Claude tools, see the Playwright MCP setup and connecting Claude to n8n's MCP server.

Troubleshooting

Three Claude connector errors and the first check for each: private address, OAuth discovery and token problems, or a tool call to reproduce
Each of the three connector errors has a different first check, so read the message before you change settings.

Anthropic's troubleshooting page splits failures into three messages. Each failed connection or sign in attempt also shows a reference ID starting with ofid_ in the error and the page URL. It is time limited, so copy it right after a failure if you plan to file a report. A failed tool call has no ID, so note the tool name and the UTC time instead.

"Couldn't reach the MCP server"

This is not always a network failure. Anthropic lists four causes: a private or missing public address, a firewall or WAF block, a redirect to another host, and failed OAuth discovery. If your server's access logs show no request at all, suspect the private address rejection from Step 1, because Claude rejects those before any HTTP request leaves Anthropic's network. A WAF block shows up only in your edge logs. Rerun the check and look at the A line. The classic version is a hostname that resolves to a public address on the internet and a private one inside your network (split horizon DNS): it works from your desk and fails from Claude. A URL with a port other than 443 fails too, per the help center rule in Step 1.

OAuth discovery is the fourth cause. If the 401 has no resource_metadata pointer, Claude looks at the /.well-known/ paths on your origin, and a 404 there stops it. With a path like /mcp, the path is appended: /.well-known/oauth-protected-resource/mcp. A discovery failure can surface as this error or as an authorization failure.

Anthropic's authentication docs give the order: the path form first, then the root form. For the authorization server, the troubleshooting page says Claude tries /.well-known/oauth-authorization-server first and falls back to /.well-known/openid-configuration, so a 404 on one is fine when the other returns 200.

"Authorization with the MCP server failed"

Work through these in order, all from Anthropic's page:

  • A redirect to a different host, as in Step 2.
  • Claude sends a PKCE challenge with S256 on every authorization request, so a server without S256 support fails at the token endpoint.
  • An audience or issuer mismatch between your tokens and your metadata.
  • Slow endpoints: Claude gives discovery, registration and token endpoints 10 seconds to respond, and token refresh 30 seconds.

My advice, not Anthropic's: if the flow worked once and then broke, disconnect and reconnect the connector under Customize, then Connectors, to force a fresh OAuth flow.

"Unexpected error while invoking tool"

The connection works and one tool call returned an error. Reproduce the same call directly against your server, for example in MCP Inspector as Anthropic's page now suggests, and read its logs.

The five messages below appear earlier, while you add a connector, most of them inside the Add custom connector dialog. As of November 21, 2026, Anthropic's troubleshooting page does not list them, so for each one I mark what comes from Anthropic's docs and what is my own reading of those docs, the MCP authorization spec and public reports on Anthropic's tracker.

"Couldn't check the server. Couldn't determine how this server signs in"

It appears after you click Continue on the name and URL screen and goes on: "You can continue and configure it manually. Select Continue anyway to configure the connector manually." The message "No server responded at this URL. Check it for typos before continuing." offers the same choice, and "Couldn't connect to the server. Check that the URL points to a valid MCP server." points the same way.

Anthropic's docs say Claude marks a server's settings Detected when it can read them. My reading: these messages mean the check, which runs from Anthropic's cloud, got no answer it could classify, for the reasons covered under "Couldn't reach the MCP server" above, including a port other than 443. In one open public report, the server's operator found a host firewall that answers the discovery documents with 403 for a generic browser user agent and suspects the check hits that rule; Anthropic has not confirmed it.

My advice, not Anthropic's: run the Step 2 check, then try https://mcp.deepwiki.com/mcp in the same dialog. If that fails too, the fault is most likely on Claude's side. On November 13, 2026, Anthropic's status page said adding a new connector on claude.ai was temporarily unavailable, and many reports of this message date from that day. If only your server fails and you know its sign in method, select Continue anyway and set the options from the Step 4 table.

"Couldn't discover OAuth settings. Check the server URL or enter settings manually"

My reading: the check saw that the server wants a sign in but could not read its OAuth details, the failure Anthropic's troubleshooting page files under OAuth discovery. The MCP spec has Claude find, in order, the protected resource metadata (RFC 9728), the authorization server metadata (RFC 8414 or OpenID Connect Discovery) and a way to get a client ID. Anthropic's docs list what each link needs:

  • A 401 with WWW-Authenticate: Bearer resource_metadata="...", or /.well-known/ paths that do not return 404.
  • A resource field equal to the URL you typed, path included. Claude uses only the first entry in authorization_servers.
  • An authorization server that answers its own discovery path from Anthropic's IP range, even when it sits on another host behind its own WAF.
  • A registration_endpoint for Register automatically, or both "client_id_metadata_document_supported": true and "none" in token_endpoint_auth_methods_supported for Claude's published identity.

Run the three curl requests on the troubleshooting page from a public network to find the broken link. If the server offers no registration at all, "enter settings manually" is the way out: choose Use your own OAuth client with a client ID you registered and the callback URL from Step 4. That matches the last resort in the spec's client registration rules: prompt the user for the client information.

"A connector with this URL already exists in your organization"

The message ends "Use the existing connector instead of adding it again." Your organization already has a connector with this exact URL, and Claude won't add a second. Find it under Customize, then Connectors, and click Connect. It may show a directory service's name instead of the Custom label (see Step 4), and a public report shows this message when the URL belonged to a directory connector the organization had already added.

Sign in settings can't be edited, so to change them an Owner removes the connector under Organization settings, then Connectors, and adds it again, and members reconnect. A shorter form, "A connector with this URL already exists. You can update or remove it in your connectors settings.", points to your own connectors list instead. Two connectors on one URL, say for two accounts on the same service, is an open feature request.

"Failed to add connector"

On the tracker this shows up in Claude Desktop alongside "A server with this URL already exists" after a connector was removed and added back. A maintainer's reply on that issue explains it: custom connectors added in Desktop live on your account, so removing the local entry can leave the account copy. Remove the stale entry on claude.ai in a browser, then add the server again; the reporter confirmed that worked. The variant "Failed to add the connector" also appears on directory listings.

Also rule out the two documented limits: one custom connector on Free, and on Team and Enterprise only the roles in Before you start.

"Connector couldn't be added. You can try again."

It appears after you click Add, in public reports often when the settings were already marked Detected. My reading is that the check passed and saving the connector failed; Anthropic does not document the message. Work through it in this order:

  • Check status.claude.com. The November 13, 2026 incident above is when many reports of this message were filed.
  • Try https://mcp.deepwiki.com/mcp. If it fails too, wait and retry, as the message suggests.
  • Use a request header name from Claude's list or one Anthropic has approved. The docs say Claude rejects the save for a custom header name it has not approved.

Still stuck after the checklist? Report it on the anthropics/claude-ai-mcp tracker with the ofid_ ID, your server URL and your access logs.

Going further

There are other routes. For a server on your own machine, Claude Desktop accepts a desktop extension, and Claude Code adds servers from the command line. For a server inside a private network, Anthropic documents MCP tunnels as a separate route. If you want to build the server rather than connect one, start with how I build MCP servers that run in production, and for agent frameworks see using MCP servers in LangGraph.

Every tool you hand Claude is a route to your data, so decide what it may reach before you switch it on. For an agent that runs unattended, I lay out that lockdown step by step in my Harness2 setup guide.

When this is the wrong tool: anything where one shared credential would let every member of a team touch data they should not. Fix the credential scoping first. If you would rather hand the build and monitoring to someone, the agents page shows what I build.

Frequently asked questions

Can I add a custom connector on the free Claude plan?

Yes, but only one. Anthropic's connector docs say custom connectors are added to your own account and the Free plan allows a single one. Pro, Max, Ultra, Team and Enterprise plans are not limited that way in the docs I read, though plan rules change, so check your own Customize page.

Why does my MCP server work in Claude Code but not on claude.ai?

Claude Code connects from your machine, while claude.ai connects from Anthropic's cloud. A server on localhost, a private IP, a VPN, or a hostname that resolves differently inside your network fails from the cloud. Run the Step 2 check from outside your network to see what Claude sees.

How do I connect a server that uses an API key instead of OAuth?

Choose No sign in, then add the key under Request headers, for example an Authorization header with a bearer token. Anthropic marks static credentials as a beta feature, so the option may not appear for every account. Use a key limited to the access you want Claude to have.

What does the ofid_ number in the error mean?

It is a reference ID Anthropic uses to trace a failed connection or sign in. It appears in the error message and the page URL for a failed connection or sign in. A failed tool call has none. Copy the ID right after the failure, because it is time limited, and include it when you report the problem.

Do I need to know OAuth to add a connector?

No. If the server supports it, leave the OAuth client on Claude's published identity and sign in when the window opens. You only need OAuth details when you run the server yourself or when it hands you a client ID and secret.

Feed to Claude or ChatGPT

Last updated

November 21, 2026

Jahanzaib Ahmed

Jahanzaib Ahmed

AI Systems Engineer & Founder

AI Systems Engineer with 126 production systems shipped. I run AgenticMode AI (AI agents, RAG systems, voice AI) and ECOM PANDA (ecommerce agency). I build AI that works in the real world for businesses across home services, healthcare, ecommerce, SaaS, and real estate.

Want this built for your business? See Workflow Automation, or browse the free tools and guides.