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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To connect an MCP server to Claude Code, add it with the appropriate transport, choose whether its configuration is local, shared with a project, or personal across projects, then inspect and approve the connection before using it. Anthropic’s Claude Code MCP documentation, accessed October 7, 2026, recommends HTTP for remote servers and supports local stdio servers as well. The right setup depends on where the server runs, how it authenticates, and what access its tools require.

What MCP adds to Claude Code

The Model Context Protocol (MCP) is an open standard for connecting AI applications to tools and data. An MCP server can give Claude Code access to services such as issue trackers, databases, monitoring systems, design systems, messaging platforms, and workflow automation. That can save you from copying information into chat, or let Claude Code work with a connected service. What it can actually read or do depends on the server’s tools and the permissions of the account it uses.

Choose how the server connects

Claude Code’s documented setup options include remote HTTP, local stdio, legacy SSE compatibility, and WebSocket configuration. Choose based on the server’s supported transport and where it runs; do not substitute one transport for another unless the server supports it.

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

Remote HTTP

For a remote server, the current reference recommends HTTP. Add one with this pattern:

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

For example, the documentation shows:

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

Use the endpoint supplied by the server operator. The example illustrates the command format, not an endorsement of the service.

Local stdio

A stdio server runs as a process on your machine. Use the pattern:

claude mcp add [options] <name> -- <command> [args...]

For example, Anthropic’s reference uses an environment variable and a local command:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable -- npx -y airtable-mcp-server

The -- separator matters: Claude Code reads its own options before the separator, and passes the command and its arguments after it to the server. Supply credentials only through an appropriate mechanism for your environment; avoid putting secrets in shared project configuration.

SSE compatibility

Server-Sent Events (SSE) remains supported for services that expose it, but Anthropic labels SSE deprecated and recommends HTTP where available. The documentation says Claude Code v2.1.265 or later automatically falls back from HTTP to SSE; on older versions, use --transport sse explicitly when required by the server.

WebSocket

WebSocket is configured through JSON or claude mcp add-json, rather than claude mcp add --transport; that command does not accept ws. The reference describes WebSocket authentication as header-only. Use it when the server’s integration calls for a persistent, bidirectional connection or pushed events.

Choose who can use the configuration

Claude Code documents three scopes. Pick the narrowest one that matches the intended sharing and credential handling.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Scope Where it applies When it fits
Local Current project and current user A server configuration meant for your use in this project.
Project Shared through the project’s .mcp.json A server definition intended for project collaborators. Each user must review and approve project-configured servers before use.
User Available to you across projects A personal server you want available in multiple projects.

Configuration scope affects sharing, not the server’s trustworthiness. A project file can define a server, but you should inspect it before approving it. If a remote server is imported from an mcpServers JSON block using claude mcp add-json, ensure the entry specifies its transport type; a URL without a type is interpreted as stdio and will fail. Duplicate names across scopes can also cause conflicts, so inspect loaded configurations and remove unintended duplicates.

Add a server and complete authentication

  1. Identify the server’s transport and endpoint or command. Confirm the details with its operator, including what tools it exposes and what account access it needs.
  2. Add it with the matching configuration. Use claude mcp add for a command-line setup, or claude mcp add-json for an mcpServers JSON block. For local stdio, put the server command after --.
  3. Review the scope and any project approval prompt. Project-scoped servers from .mcp.json require approval before use. Approve only after reviewing the server definition and deciding its access is appropriate.
  4. Sign in if the server requires OAuth. For a remote OAuth server, add the endpoint and then run /mcp inside Claude Code to complete its browser sign-in flow. Anthropic documents OAuth for HTTP and SSE; not every server uses OAuth.
  5. Check the connection status. Use the commands below and resolve any authentication or connection issue before relying on the server.

The /mcp interface includes a control to clear authentication. For project approval choices, Anthropic documents claude mcp reset-project-choices to reset them; use it when you need to make those approval decisions again.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify status and diagnose connection failures

Use the command line to inspect configured servers and the Claude Code interface to check status and controls:

Check How What it tells you
List configured servers claude mcp list Shows the servers Claude Code has configured.
Inspect one server claude mcp get <name> Shows details for the named server.
View status and controls Run /mcp inside Claude Code Shows server status and available controls, including authentication actions.

Anthropic’s reference lists statuses such as Connected, Needs authentication, and Failed to connect. A failed status indicates a connection problem; it does not mean that listing configured servers failed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • If a stdio server fails: Check that the executable is installed and available, the command and arguments are correct, and required environment variables are set.
  • If a remote server fails: Check the endpoint, whether authentication is complete, and whether the server is available.
  • If the wrong server appears or a name conflicts: Inspect the loaded configuration and check for duplicate definitions at different scopes.

Use MCP servers with appropriate caution

Anthropic’s guidance is direct: “Verify you trust each server before connecting it.” A server can expose read or action tools, and its output may contain external content. Anthropic warns that fetched content can create prompt-injection risk; treat returned content as input to assess, not as an instruction to follow automatically.

  • Identify who operates the server and review its tools before connecting.
  • Check what data and actions the connection can access, and use an account with only the permissions needed for the task.
  • Use Claude Code’s permission controls deliberately, especially before allowing actions with external effects.
  • Do not infer that a third-party server has been audited or endorsed by Anthropic. The official documentation provides setup guidance, not a blanket guarantee about individual servers.

Anthropic’s Claude Code security guidance and IAM documentation provide additional context on permissions and access management.

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.