Claude Code MCP

Connect a local or hosted MCP server to Claude Code, check sign-in, and choose between a shared .mcp.json and a claude.ai connector.

Published

Claude Code MCP

You can give Claude Code access to the issue, documentation, or error report you’re working from, so you can leave the original in its own system. MCP, the Model Context Protocol, gives Claude a common way to call those tools. For a first connection, run claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp in your terminal. That adds Anthropic’s searchable documentation to your current project.

Connect your first server and check the result

Start in your project directory with Claude Code installed and signed in. The docs server is a good first choice because it requires no separate account. Here’s the command and its first example confirmation line from Anthropic’s MCP quickstart.

Text
claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
Added HTTP MCP server claude-code-docs with URL: https://code.claude.com/docs/mcp to local config

The confirmation tells you where the setting was saved. Now run claude mcp list in the same terminal. Look for ✔ Connected, then start a session with claude. Try the quickstart’s request: “Use the claude-code-docs server to look up what MCP_TIMEOUT does”. The tool call in the response should carry the server name. That label is how you tell whether Claude actually consulted the docs.

A server can also be a program on your laptop. The distinction matters when you’re reading somebody else’s installation instructions. A hosted HTTP server gives you an address to connect to. A stdio server gives you a program to launch. Claude Code talks to that program through its standard input and output.

One Claude Code console connects over HTTP to a hosted URL and over stdio to a local process.
Look at what the provider gives you. A URL goes in the HTTP command. A launch command goes after the double dash.

For a local example, Playwright gives Claude a browser it can operate. With Node.js 20 or newer installed, run the quickstart’s command in your terminal:

Bash
claude mcp add playwright -- npx -y @playwright/mcp@latest

Claude Code uses stdio by default here. Everything after -- belongs to the program that starts the server. That includes -y, which lets npx install the package without prompting. Check with claude mcp list, then give Claude a page on your local development server to inspect.

For a hosted service that needs your account, the quickstart uses claude mcp add --transport http sentry https://mcp.sentry.dev/mcp. Inside a Claude Code session, type /mcp, select sentry, press Enter, and choose Authenticate. Approve access in the browser and check the status back in the panel. This browser authorization flow is called OAuth.

Choose who gets the connection

Start with local for a trial. In Claude Code, “local” describes two different choices. A local server runs on your machine. A local scope makes the configuration private to you in one project. The hosted docs server you just added has local scope.

ScopeWho can use the configurationWhere it livesWhen to use it
Local (default)You in this projectThe project’s entry in ~/.claude.jsonTry a server before asking teammates to adopt it.
Project (--scope project)People who clone the repository.mcp.json at the project rootGive each contributor the same docs endpoint or browser setup.
User (--scope user)You across your projectsThe top-level mcpServers entry in ~/.claude.jsonKeep a personally useful service available as you switch repositories.
Three floor plans show one person in one project, a team in one project, and one person across all projects.
Choose scope by asking who needs the configuration and where they work.

To share the docs server you tried above, run claude mcp remove claude-code-docs --scope local, then claude mcp add --scope project --transport http claude-code-docs https://code.claude.com/docs/mcp. Review and commit the resulting .mcp.json. A teammate who clones the repo and starts Claude Code can review and approve the server. For services that need credentials, keep secrets out of the committed file. The configuration supports references to environment variables.

Already set up in Claude Desktop? On macOS or Windows Subsystem for Linux (WSL), run claude mcp add-from-claude-desktop. Select the servers in the dialog and verify with claude mcp list. Add --scope user to make the imports available across your projects. If one goes missing, check its Desktop name. The importer skips names containing characters outside letters, numbers, hyphens, and underscores, including spaces.

Use --web when you want the connector in the Claude app too

The December 3, 2026 Claude Code 2.1.335 release notes put it precisely: “Added claude mcp add --web to add a remote MCP server as a claude.ai connector from your terminal, on paid plans”.

Take Notion as the example. Run claude mcp add --web notion https://mcp.notion.com/mcp. Finish connecting in the browser with the same claude.ai account and organization you use in Claude Code. If a browser doesn’t open, follow the printed link. In an open Claude Code session, run /reload-plugins, or start a fresh session. Open /mcp to find the connector listed under claude.ai.

This is the choice for a founder who consults the same product notes in the app and while coding. The connection belongs to the claude.ai account and can be available in both places. There’s no repository file to commit. For a team that wants a checkout to carry its configuration, project scope still fits. On Team and Enterprise plans, an Owner can add a connector for the organization and members can connect it. Anthropic’s connector setup instructions

Five jobs worth connecting a server for

Start with the handoff you repeat most. These workflows draw on Anthropic’s MCP examples. Each depends on the relevant services being connected and on the access you grant.

  1. Turn a ticket into a reviewable change. A developer picking up Jira issue ENG-4521 could ask Claude to read the requirements, implement the feature, and open a GitHub pull request. The reviewer gets a proposed change, and the developer can skip transcribing the acceptance criteria into chat.
  2. Investigate a rollout. A release owner could ask Claude to check Sentry and Statsig for the feature in that issue. Looking at errors alongside usage helps the owner decide what to investigate before declaring a rollout healthy.
  3. Check a browser regression. A frontend developer could point Playwright at the local development server and ask Claude to follow the steps in a bug report. The payoff is seeing which interaction breaks while the relevant code is still open.
  4. Update an email template from a design. A developer could ask Claude to find the Figma design shared in Slack and update the team’s template. That removes a handoff where someone ordinarily has to find the design and describe its changes.
  5. Recruit people who used a feature. A product lead could ask for a PostgreSQL query to identify feature users, then ask for Gmail drafts inviting them to give feedback. Drafts leave the lead a chance to check the recipients and wording before sending.

Diagnose the first error you see

What you seeWhat to do next
! Needs authentication after adding SentryOpen /mcp inside the session, select the server, and finish Authenticate in the browser. Re-adding the URL repeats the setup step.
Pending approval after cloning a repoStart claude interactively in that repository and review the project server prompt.
Failed to connect on the first Playwright checkGive npx time to download the package, then run claude mcp list again. If it persists, check the installed Node.js version and run claude mcp get playwright for details.
A copied HTTP entry has a URL but no typeAdd "type": "http" to that server’s JSON entry. Without a type Claude Code reads it as stdio and skips the URL entry.

If a local server repeatedly takes too long to start, see the Claude Code MCP startup timeout guide.

Connected tools use context even when you’re working on something else. Context is the information Claude can hold in a session. Think of tool search as an index: the tool names and server instructions load at startup, and Claude retrieves full tool definitions when it needs them. In environments where tool search is unavailable, definitions can load up front. There’s no fixed per-server tool cap. The practical budget is the room left for your conversation and work. Remove a trial server you no longer use with claude mcp remove claude-code-docs if it’s still at the original local scope. MCP tool search reference

Two small products a team could buy

The stronger idea is a setup check for teams that ship MCP configurations. A developer tools vendor could sell it to engineering teams that field the same “it’s in the repo, why can’t I use it?” question on every new hire’s first day. Start with a read-only check for one repository. Compare its declared servers with the statuses from claude mcp list, then tell the developer which step needs attention: approve the project config, install a missing runtime, or authenticate. The check can tell a maintainer exactly where a teammate got stuck.

A guided first ticket could serve engineering managers onboarding developers. Package one approved project configuration, a documentation lookup, and a starter issue. The new hire finishes by opening a pull request a teammate can review. A first version could be a maintained template for one team’s stack. Its weakness is maintenance: if the starter issue, tools, or permissions drift, the template becomes another stale checklist. The setup check has the better starting point because it can diagnose existing repositories without requiring managers to redesign onboarding.

Can I add MCP servers to Claude Code?

Yes. Run claude mcp add with the server details in your shell. For a service you already use as a claude.ai connector, first check /mcp in a Claude Code session signed in with the same account. It may already be available.

Do I need to install an MCP server?

Only if the tool runs locally. For a hosted service you need its MCP endpoint URL and any authorization it requires. A local stdio server needs a program Claude Code can launch, including any runtime that program depends on.

How do I install MCP?

MCP is the protocol Claude Code already speaks. Choose a server for the job you want to do. For a first local browser tool, the Playwright command above tells Claude Code how to start it. For a first hosted tool, the docs server lets you try a search without creating another account.

If your team needs a connector for an internal tool, I can help build and run the integration.

Published
Category
Build
Related Articles
Vercel Sandbox Desktop

Vercel Sandbox Desktop

Start a cloud desktop, watch an agent drive Chrome, or open Blender. See the exact commands, SDK example, and what a viewer link lets a teammate do.Dec 3, 2026Build
Claude Code REVIEW.md

Claude Code REVIEW.md

Where Claude Code reads REVIEW.md, what to put in it, and how to check your rules with a sample change. Includes a full web team example.Dec 3, 2026Build
Claude Code Auto Compact

Claude Code Auto Compact

Check why Claude Code compacted near 400K, what survived the summary, and when to use /autocompact 1M for a long codebase review.Dec 3, 2026Build
Ponytail Claude Code Plugin: How It Works and When to Turn It Off

Ponytail Claude Code Plugin: How It Works and When to Turn It Off

See how Ponytail chooses a smaller patch, install it in Claude Code or Codex, and compare the project’s code savings with JetBrains’ independent test.Dec 3, 2026Build
Building a Voice Agent With the Gemini Live API

Building a Voice Agent With the Gemini Live API

Choose a thinking level, open an audio session, and keep callers talking during a lookup. Includes Gemini 4 Live pricing, phone integrations and limits.Dec 3, 2026Build
Vercel MCP

Vercel MCP

Connect Claude Code or Codex to Vercel, diagnose a failed build, call a second model, and set up team access with Claude Enterprise-managed auth.Dec 3, 2026Build
LobeChat Is Now LobeHub: What It Does, What It Costs, and How to Start

LobeChat Is Now LobeHub: What It Does, What It Costs, and How to Start

Connect multiple models in LobeHub, add a provider key, and start a local Docker install. Check the license before distributing a modified app.Dec 3, 2026Build
AWS Kiro: What It Is, What It Costs, and How to Start

AWS Kiro: What It Is, What It Costs, and How to Start

How AWS Kiro turns a feature request into a spec, which models and plans you can use, and how to start in the IDE or terminal.Dec 3, 2026Build
Newsletter

One letter, every Sunday.Working systems, not hot takes.

Weekly. No spam. Unsubscribe anytime.