Model Context Protocol (MCP) is an open standard that lets Claude connect to external tools, APIs, and data sources. Each MCP server exposes a set of tools that Claude can call during a session — just like built-in tools, but powered by external processes or services. Common uses include: querying databases, searching documentation, interacting with APIs (GitHub, Jira, Slack), running custom business logic, and accessing resources that Claude cannot reach on its own.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/VineeTagarwal-code/claude-code/llms.txt
Use this file to discover all available pages before exploring further.
Configuration scopes
MCP servers can be configured at different scopes:| Scope | Location | When to use |
|---|---|---|
local | .mcp.json in project root | Project-specific servers that you don’t want to commit to version control |
project | .mcp.json in project root (after team approval) | Project-specific servers shared with the team |
user | ~/.claude/settings.json | Personal servers available in all your projects |
The
.mcp.json file in your project root is the standard way to share MCP server configs with your team. Claude Code prompts each team member to approve the servers in .mcp.json before connecting to them.Transport types
MCP servers communicate with Claude Code over one of three transports:stdio
Claude launches the server as a subprocess and communicates over standard input/output. Best for local tools and CLI wrappers.
HTTP
Claude connects to a running HTTP server using the MCP HTTP transport (streamable HTTP). Best for remote services and microservices.
SSE
Claude connects to a running server using HTTP with Server-Sent Events. Supported for backward compatibility; prefer HTTP for new servers.
Adding an MCP server
- CLI (stdio)
- CLI (HTTP)
- CLI (SSE)
- settings.json
claude mcp add command saves to your local scope (~/.claude/settings.json) by default. Pass --scope project to save to .mcp.json in the current directory instead.
Server configuration format
stdio server
Transport type. Optional — defaults to
"stdio" for backward compatibility.The executable to run. Must not be empty.
Arguments passed to the command. Defaults to
[].Environment variables set for the server subprocess. Values must be strings.
HTTP server
Must be
"http" for HTTP transport.The URL of the MCP HTTP endpoint.
HTTP headers to include with every request. Useful for authentication.
Path to a script that outputs headers as JSON. Use this for headers that require dynamic values (for example, short-lived tokens).
OAuth configuration for servers that require OAuth 2.0 authentication. See Authentication below.
SSE server
Must be
"sse" for SSE transport.The URL of the SSE endpoint.
HTTP headers included with every request.
OAuth configuration. See Authentication below.
Authentication
For HTTP and SSE servers that require OAuth 2.0, add anoauth block to the server config:
OAuth client ID registered with the authorization server.
Fixed loopback port for the OAuth callback. Only required if the authorization server does not support RFC 8252 port-any matching.
URL of the OAuth authorization server’s metadata document (must use HTTPS). Claude Code uses this to discover authorization endpoints.
Managing MCP servers with /mcp
Run /mcp inside a Claude Code session to open the MCP management panel. You can:
- View all connected, failed, and disabled servers
- Enable or disable individual servers
- Check server capabilities and connection status
.mcp.json for project teams
The.mcp.json file in your project root is the recommended way to share MCP server configurations with your team. It uses the same format as the mcpServers key in settings files:
Example: filesystem server
The official@modelcontextprotocol/server-filesystem server gives Claude access to read and write files in specified directories:
read_file, write_file, list_directory, and search_files, restricted to the paths you specified.
Enterprise server management
Enterprise administrators can control which MCP servers users are allowed to configure:allowedMcpServers— if set, only servers matching an entry in this list are permitted. Entries match by name, URL pattern (supports*wildcards), or exact command array.deniedMcpServers— servers matching an entry are always blocked, even if they are also on the allowlist.
allowManagedMcpServersOnly: true in managed settings to restrict the allowedMcpServers allowlist to the managed settings file only (users can still add their own servers but the admin-defined allowlist applies).