Claude Code MCP Setup: Connect, Verify and Troubleshoot One Server

Connect one MCP server to Claude Code, check scope and actual tools, diagnose common failures and remove it cleanly. Includes an unexecuted public-docs walkthrough.

Published: 28 October 2026 · Last updated: 24 November 2026

Add one connection, then prove the lookup

From the project where you use Claude Code, register the provider’s documented endpoint or local launch command. Check the saved entry, connection status and actual tools before asking for one bounded task. For a first HTTP example, use OpenAI’s public documentation MCP: it searches and reads documentation without calling the OpenAI API for you. Begin at local configuration scope, inspect the result and remove the entry when finished.

An MCP setup is complete when you can explain which server is connected, where its configuration is saved, what it can access and how to stop it. A line saying that a server was added answers only the configuration part. This guide walks through the remaining checks with a small public-documentation example.

Research disclosure: this is an official-documentation-based guide reviewed on 27 October 2026. The commands and prompts below were not executed for this article. We did not install Claude Code, connect an MCP service, authenticate a vendor account or measure a result. The two repair scenarios are fictional teaching examples, with no fabricated terminal output or successful test claim.

How this guide was researched — The MCP specification (revision 2026-07-28), Claude Code’s MCP documentation and OpenAI’s public documentation server were checked on 16 November 2026. The OpenAI docs server was verified live by an HTTP request (HTTP 200, protocol version 2025-11-25, server openai-docs-mcp 1.0.0) — but no `claude mcp` command was run, no server was added to Claude Code and no lookup was executed for this guide. The six checks are a recipe, not observed output. Run them once with a Claude Code account and record the actual outputs with dates.

If you are still choosing a provider, start with our MCP server workflow guide. It compares useful connections. This article is for the next task: connecting one chosen server, checking its behavior and repairing a specific setup problem.

Docs MCP — OpenAI. Public read-only developer-documentation search/page content at https://developers.openai.com/mcp; official Claude Code HTTP setup. Documentation-only; does not invoke the OpenAI API for the user. (Accessed 2026-10-27.)

Understand the two choices before copying a command

MCP is a standard connection between an AI application and an external capability. Claude Code is the application in this walkthrough. The server may supply information or expose actions, depending on its implementation. Installing a connection does not turn every server into a trustworthy source or give you permission to use every resource it can reach.

What is the Model Context Protocol (MCP)? — Model Context Protocol. MCP connects AI applications to external capabilities; a protocol does not establish provider trust or task success. (Accessed 2026-10-27.)

Transport describes how Claude Code talks to the server. A hosted HTTP connection points to a service endpoint. A stdio connection starts a program and exchanges messages through that process’s standard streams. A local process can still contact outside services, so “runs on my computer” is not a privacy guarantee.

Transports: overview — Model Context Protocol. stdio carries messages through a client-launched subprocess; Streamable HTTP carries messages to an endpoint. Transport is distinct from configuration scope. (Accessed 2026-10-27.)

Configuration scope answers a different question: where should this server entry be available? In particular, local scope does not mean the server runs locally. The public HTTP example below is remote, even though its configuration is personal to one project.

Claude Code MCP Setup: Connect, Verify and Troubleshoot One Server
One client, two connection paths: a local stdio server or a remote HTTP server.
Original conceptual map of two independent choices. It is not a screenshot of a configured or tested connection. — AI Tech Bench

Prepare a small project and a clear stopping point

Use a non-sensitive practice project that you own or are authorized to use. Open its folder in a terminal, and establish that Claude Code already starts there. Do not use a private production repository as the first place to investigate an unfamiliar server. Follow Anthropic’s current installation instructions if the client itself is missing; MCP configuration will not repair a missing executable.

Terminal — inspect your client version; unexecuted example

claude --version

Record the version you actually see if you later need support. This article does not assign a tested version to your machine. Commands beginning with claude run in your terminal; slash commands such as /mcp run inside an interactive Claude Code session. The MCP add command is supported in PowerShell and Command Prompt as well as other shells.

Advanced setup — Anthropic. Official supported-platform, installation and update guidance. The article assumes an installed working Claude Code client and records no executed version. (Accessed 2026-10-27.)

You also need valid Claude Code access. Its login and account or provider requirements are separate from authentication for an MCP server. A public documentation service does not make the Claude Code client free, waive usage limits or establish availability in every organization.

Authentication — Anthropic. Claude Code has its own account/provider authentication, separate from any downstream MCP service login. Account, organization and provider conditions apply. (Accessed 2026-10-27.)

Before adding the example, set a simple completion rule: retrieve one public documentation page, inspect its citation, and then either keep or remove the connection. No private files, API keys, customer records or repository contents are needed in the request.

Connect a public documentation server in six checks

1. Confirm the provider and endpoint

OpenAI documents a public MCP server at https://developers.openai.com/mcp. Its stated capabilities are documentation search and page content across its developer documentation. It is a useful introductory choice because the task can stay on public reference material. The server does not call the OpenAI API on your behalf. No API key appears in this documented connection example.

Read the provider’s current setup page before copying the endpoint. A normal website homepage and an MCP endpoint are not interchangeable. Keep this exercise separate from any existing connection with a similar name. The name openai-docs-demo below is an example label for this walkthrough, not a built-in Claude Code feature.

2. Save one personal project entry

Run this from the practice project’s terminal. It changes your Claude Code configuration by registering one remote server at local scope; it is not merely a connectivity check.

Terminal — register the public documentation server; unexecuted

claude mcp add --scope local --transport http openai-docs-demo https://developers.openai.com/mcp

Read the actual command response. An Added message means configuration was written. It does not prove that the endpoint connected or a lookup succeeded. If the command reports that the entry was not saved, stop and address that message before continuing. Do not repeatedly add the same name in several scopes to make an error disappear.

3. Inspect the saved definition and status

Terminal — inspect configuration and connection status; unexecuted

claude mcp get openai-docs-demo
claude mcp list

Check that the entry names the intended provider URL and local scope. Compare the reported connection status with the task you are trying to perform. If the name is absent, first confirm that this terminal is in the same project where you added it. If it needs authentication or fails, use the matching diagnosis below rather than treating registration as success.

Connect to MCP servers — Anthropic. Official add/check/use procedure; local/project/user configuration locations; shell versus session commands; troubleshooting and scoped removal. Added configuration differs from connection and execution. (Accessed 2026-10-27.)

4. Inspect the connection inside the session

Start Claude Code in that project, then open its MCP panel:

Inside Claude Code — inspect the server and available tools; unexecuted

/mcp

Inspect the actual tools offered by openai-docs-demo and any approval or authentication state. Tool names and counts can change; this guide does not supply a pretend count or sample connection log. If the tool list describes capabilities beyond the public documentation task, pause and recheck the provider and configuration.

5. Request one lookup with a citation

Documentation lookup — original, unexecuted request

Use the openai-docs-demo MCP server to find the official OpenAI documentation explaining the difference between input tokens and output tokens. Read the relevant page and explain the distinction in plain English, with its official URL. Use public documentation only. Do not edit project files, install packages, call the OpenAI API or access unrelated services. If this server is unavailable, say so instead of implying that you used it.

Watch which tool is actually called. Merely including a server name in a prompt does not prove that the agent used it. Open the cited official page and compare the explanation with the relevant passage. If the response came from a web search or general knowledge instead, record that honestly; it has not verified this MCP lookup.

A correct citation still does not establish that generated application code works. Keep code changes and normal project tests as a separate task. For this exercise, the useful output is a supported explanation and a traceable source, with the connection’s actual behavior visible to you.

6. Decide whether to keep the connection

Write a short private note recording the client version, scope, endpoint, permitted task, observed tool and whether the cited answer was supported. Leave unknown results unknown. This is a record to fill after your own attempt, not an outcome this article claims to have achieved. If the service adds little to your workflow, remove it using the scoped command later in this guide.

The same six checks work for any other server — for example, Linear’s read-only endpoint at `https://mcp.linear.app/mcp/readonly` — with only the name, endpoint and consent screen changing.

Choose scope deliberately when the example becomes useful

Scope changes availability, not the provider’s authorization
Scope Stored definition Appropriate reason to choose it
local ~/.claude.json, in the current project entry A personal connection used in one project; the default
project .mcp.json at the project root A reviewed definition the team intends to share
user ~/.claude.json, top-level mcpServers A personal connection needed across projects

On Windows, the default home-file location is under your user profile. An explicitly configured CLAUDE_CONFIG_DIR changes where Claude Code reads its configuration, so do not assume that a file you found by search is the active one. Use the reported scope and current project to orient the investigation.

For a shared repository, review .mcp.json before approving its servers. A teammate’s configuration may launch a local executable or point at a service you have not approved. Sharing a definition does not share an OAuth login or establish access to the same private resources.

If you choose project scope later, the HTTP entry has this shape. This is an alternative representation, not a second entry to add alongside the local demonstration. Merge it carefully with an existing file; do not replace unrelated servers.

Project .mcp.json — illustrative alternative, unexecuted
{
  "mcpServers": {
    "openai-docs-demo": {
      "type": "http",
      "url": "https://developers.openai.com/mcp"
    }
  }
}

The explicit type is important. A URL copied from another client’s configuration can be incomplete for Claude Code. To move your demonstration to a different scope, remove its old scoped definition and re-add it with the new scope after checking the current instructions. Keep one intentional definition while learning.

Adapt the process for a local stdio server

For stdio, the registration contains a reviewed executable command and arguments instead of an HTTP URL. Claude Code’s add syntax separates that command with –. Follow the specific maintainer’s Claude Code instructions; runtime requirements belong to the server you chose. A Node-based package and a Python-based server do not automatically have the same prerequisites.

Do not run a copied package installer just to confirm that MCP exists. Check the publisher, maintained repository, executable path, version policy, dependencies and requested file access first. Use a disposable working area when a trial is justified. An instruction saying “read only” does not sandbox the process or remove its access to environment variables and network services.

Security Best Practices — Model Context Protocol. Local MCP server compromise, command execution and credential exposure risks; implementation security and scoped authorization remain separate from a prompt. (Accessed 2026-10-27.)

When a local server fails, distinguish failure to launch its process from failure of a later tool call. A missing executable, a wrong argument or a path resolved from a different working directory is a different problem from a remote HTTP login. Never fix an unknown local command by granting administrator privileges without understanding why the documented setup needs them.

Diagnose the status before changing access

Use the exact status and a sanitized error from your installed client. The table is a source-based checklist; it is not a collection of errors reproduced by AI Tech Bench. Current documentation includes richer failure details than some older versions, so compare the behavior with the version you recorded.

A small diagnosis path for common MCP setup problems
Observed symptom First check Restrained next action
No MCP servers configured Current folder, configured scope and malformed-entry warnings Return to the intended project; inspect the saved entry before adding another
Failed to connect Status detail from claude mcp get or list; endpoint and authentication Correct the documented URL or credential problem; preserve the original error
Connection error without useful detail Transport, endpoint reachability or reviewed local command Investigate that layer; do not assume an authentication failure
Needs authentication The provider’s supported sign-in flow and permitted account Use /mcp to authenticate only after reviewing requested access
Connected, but zero tools Actual tool list and server-side discovery Reconnect from /mcp; investigate persistent zero-tool behavior
Works in one project but not another Local versus user/project scope; conflicting definitions Choose the intended scope and endpoint instead of broadening permissions

An HTTP browser or HEAD response is not a complete MCP protocol test. Some endpoints accept POST requests and reject other methods. A response to a basic reachability check can show that a host answered without proving that Claude Code’s MCP exchange or authentication worked. Read the client’s own status alongside the provider’s instructions. The current MCP specification revision is 2026-07-28. That revision is still current as of 16 November 2026, but a hosted server may speak an older revision — OpenAI’s public documentation server still negotiates 2025-11-25 (checked 16 November 2026).

Similarly, a 401, 403, 404, timeout or rate-limit response narrows the investigation but does not by itself prove one root cause. Check the exact endpoint path, credential state, organization policy and service documentation. Keep the client and provider errors separate from an assumption that a firewall must be disabled.

Connect Claude Code to tools via MCP — Anthropic. Explicit HTTP/stdio configuration, management commands, statuses and failure details, duplicate-scope warnings, disabling versus removal, OAuth cleanup and current client-specific behavior. (Accessed 2026-10-27.)

Fictional repair: the server disappears in another folder

Suppose Maya registers openai-docs-demo at local scope in a practice repository, then opens Claude Code in an unrelated repository and cannot find it. This is a teaching scenario, not an observed incident. The first question is which project the registration belongs to. Return to the original project and inspect its entry. If cross-project availability is actually needed, deliberately move it to user scope; otherwise leave the original scope alone.

The lesson is a change in availability, not a reason to grant more data access. Do not create three differently scoped copies before checking the first one.

Fictional repair: HTTP JSON exists, but tools do not

Suppose a team copies a URL-only JSON entry from a different client and the server does not load correctly. Compare the saved structure with the explicit HTTP example above, then read parse warnings and the active scope. If it is connected but returns zero tools, examine discovery separately. A syntactically valid entry can still point at the wrong service or a server that is not offering tools.

Anthropic’s configuration guide recommends /mcp to inspect actual loaded servers. For a persistent connected-with-zero-tools case, it describes MCP debug logging. Review logs locally and sanitize anything you share; a diagnostic file can contain private paths, source content, account details or credential-bearing URLs.

Debug your configuration — Anthropic. Inspect actual loaded MCP servers with /mcp; project approval, relative executable paths, connected-with-zero-tools diagnostics and MCP debug logs. (Accessed 2026-10-27.)

Treat trust, tool approval and data access as separate checks

Server configuration, permission to call a tool and authorization inside the provider are separate decisions. Check your actual Claude Code permission mode and rules rather than assuming that every tool call will show the same prompt. If your goal is direct review of proposed actions, inspect Manual mode and the rules that apply; organization settings can also affect what you may connect.

Configure permissions — Anthropic. Tool approval depends on permission mode, rules and managed policies. MCP tool rules are distinct from server registration and provider authorization. No blanket first-call prompt guarantee. (Accessed 2026-10-27.)

Use the narrowest resource and action set that meets the task. A read-only documentation tool reduces the available action surface, but its request still goes to another service and its response enters the agent’s context. Keep credentials and private project data out of a public-reference query when they are not needed to answer it.

Treat retrieved text as evidence to inspect. If a page or tool response tells the assistant to send a secret, change a permission rule or ignore your task, stop that expansion. A provider can be legitimate while individual content is misleading or malicious. Prompt wording helps state your intention; technical controls and review are still necessary.

Security — Anthropic. Untrusted-content and prompt-injection risks, server trust, permission-mode differences, and Directory review versus security auditing. Safeguards are not immunity. (Accessed 2026-10-27.)

A listed server is not a security certification. Anthropic states that Directory review does not mean it security-audits or manages the server. If a company policy blocks a connection, use the approved administrator process instead of renaming the server, bypassing the restriction or disabling protection to make the example work.

Control MCP server access for your organization — Anthropic. Managed server sets and allow/deny policies may restrict connections. Directory inclusion is not an Anthropic security audit; administrators govern supported access. (Accessed 2026-10-27.)

For the related distinction between reusable instructions and connections, our Claude Code skills guide explains where skills fit. A skill can describe a procedure without supplying the server’s data access or replacing its permissions.

Disable or remove the connection, then verify the result

For a temporary pause, the /mcp panel offers a disable control that preserves the configured entry. To remove the local demonstration definition entirely, use the same server name and scope you recorded:

Terminal — remove this walkthrough’s local entry; unexecuted

claude mcp remove openai-docs-demo --scope local

Terminal — inspect what remains; unexecuted

claude mcp list

If the name still appears, inspect whether another scope, a plugin or organization configuration provides it. Removing a personal entry does not remove a plugin’s server or override managed policy. Handle the configuration source you actually intend to change. For plugin lifecycle details, use the plugin’s supported controls rather than deleting arbitrary configuration files.

Claude Code documents removal of its stored OAuth tokens and client registration when a remote server is removed. That is distinct from revoking a grant in the provider’s account settings, deleting information previously retrieved or erasing the provider’s retained data. The public-docs example does not demonstrate any private-account revocation.

Our Claude Code plugin guide covers packages that can supply their own extensions and connections. Keep that package lifecycle separate from removing this manually configured example.

Leave with one understandable connection

The practical finish is a small record you can defend: this project, this scope, this provider, this allowed task, this observed tool result and this stop procedure. If you cannot explain one of those items, resolve it before connecting a private repository, database or business workspace.

Start with the public-documentation exercise, check the original cited passage and then make a deliberate keep-or-remove decision. Expand only when the next task needs a capability you can identify and authorize. More configured servers are not evidence of a more useful coding workflow.

What is the MCP protocol version I should expect?

The current specification revision is 2026-07-28, but a hosted server may speak an older revision — OpenAI’s public docs server negotiates 2025-11-25. A version mismatch does not always mean the connection is broken.

How do I check whether a server actually connected?

Run `claude mcp list` and `claude mcp get <name>`, then open `/mcp` inside a session and run one bounded lookup. An “added” message only means configuration was written.

How do I remove a server?

Use the scoped removal command from the setup guide, then check that the entry is gone from `claude mcp list` and revoke any token you issued for it.

Sources

  1. What is the Model Context Protocol (MCP)? — Model Context Protocol. MCP connects AI applications to external capabilities; a protocol does not establish provider trust or task success. (Accessed 2026-10-27.)
  2. Transports: overview — Model Context Protocol. stdio carries messages through a client-launched subprocess; Streamable HTTP carries messages to an endpoint. Transport is distinct from configuration scope. (Accessed 2026-10-27.)
  3. Connect to MCP servers — Anthropic. Official add/check/use procedure; local/project/user configuration locations; shell versus session commands; troubleshooting and scoped removal. Added configuration differs from connection and execution. (Accessed 2026-10-27.)
  4. Connect Claude Code to tools via MCP — Anthropic. Explicit HTTP/stdio configuration, management commands, statuses and failure details, duplicate-scope warnings, disabling versus removal, OAuth cleanup and current client-specific behavior. (Accessed 2026-10-27.)
  5. Docs MCP — OpenAI. Public read-only developer-documentation search/page content at https://developers.openai.com/mcp; official Claude Code HTTP setup. Documentation-only; does not invoke the OpenAI API for the user. (Accessed 2026-10-27.)
  6. Configure permissions — Anthropic. Tool approval depends on permission mode, rules and managed policies. MCP tool rules are distinct from server registration and provider authorization. No blanket first-call prompt guarantee. (Accessed 2026-10-27.)
  7. Security — Anthropic. Untrusted-content and prompt-injection risks, server trust, permission-mode differences, and Directory review versus security auditing. Safeguards are not immunity. (Accessed 2026-10-27.)
  8. Debug your configuration — Anthropic. Inspect actual loaded MCP servers with /mcp; project approval, relative executable paths, connected-with-zero-tools diagnostics and MCP debug logs. (Accessed 2026-10-27.)
  9. Advanced setup — Anthropic. Official supported-platform, installation and update guidance. The article assumes an installed working Claude Code client and records no executed version. (Accessed 2026-10-27.)
  10. Control MCP server access for your organization — Anthropic. Managed server sets and allow/deny policies may restrict connections. Directory inclusion is not an Anthropic security audit; administrators govern supported access. (Accessed 2026-10-27.)
  11. Authentication — Anthropic. Claude Code has its own account/provider authentication, separate from any downstream MCP service login. Account, organization and provider conditions apply. (Accessed 2026-10-27.)
  12. Security Best Practices — Model Context Protocol. Local MCP server compromise, command execution and credential exposure risks; implementation security and scoped authorization remain separate from a prompt. (Accessed 2026-10-27.)
Avatar photo
M.R. Vale

M.R. Vale writes practical guides on AI coding agents, workflows and tools, researched from primary sources, for AI Tech Bench. The focus is on clear limitations and useful real-world examples rather than hype or unverified claims.

Articles: 37

Leave a Reply

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