ClaudeMap

Claude Code MCP Docs

The official guide to wiring MCP servers into Claude Code — scopes, transports, and auth.

Tutorials & Guidesofficialdocsmcpclaude-code

The MCP section of the official Claude Code documentation: adding servers via claude mcp add and .mcp.json, how project/user/enterprise scopes interact, stdio versus HTTP transports, and OAuth for remote servers. The ground truth for client-side MCP configuration — pair it with the protocol-level spec for what happens on the wire.

What it does

  • Four documented ways to add a server — remote HTTP, remote SSE, local stdio, and remote WebSocket — plus imports from setup instructions written for another client, from a URL, from an npx/uvx/binary command, or from an mcpServers JSON block
  • Scope model spelled out: local, project, and user scopes, their hierarchy and precedence, project server approvals, and workspace trust
  • Client runtime behavior in production terms: dynamic tool updates, notification streams on the v2 runtime, automatic reconnection, mid-session drops, failed first connections and retries, push messages with channels, and automatic backgrounding of long tool calls
  • OAuth and auth depth: authenticate from the command line, fixed OAuth callback port, pre-configured credentials, overriding metadata discovery, restricting scopes, dynamic headers — plus environment variable expansion in .mcp.json with unset-variable and empty-credential semantics

When to use it

The ground truth for client-side MCP configuration in Claude Code — before debugging a server connection, check scopes, transport, and the failure-retry semantics documented here.

Getting started

No package — configuration. Local stdio example, in .mcp.json at the project root:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "my-mcp-server"],
      "env": {
        "API_KEY": "${MY_API_KEY}"
      }
    }
  }
}

Environment variables expand with the documented syntax; unset variables follow the documented default semantics.

Things to know

Scope choice is a team decision as much as a technical one — project scope shares servers with everyone on the repo (and needs approval/trust), user scope does not; pick deliberately rather than accepting the default.

Charted

Related on the map

  • Anthropic's official "Code with Claude" workshop materials — nine hands-on courses on skills, MCP, evals and Claude Managed Agents.

    • official
    • workshops
    • anthropic
    • managed-agents
  • Anthropic's canonical essay on agent design — workflows vs agents, and five composable patterns.

    • official
    • agents
    • engineering
    • patterns