Skip to main content
The Model Context Protocol (MCP) is an open standard that lets Claude Code connect to external tools and services — databases, APIs, internal systems, and more. When you connect an MCP server, Claude gains new tools it can invoke during a session.

What MCP adds

Without MCP, Claude can only use built-in tools like file reads, shell commands, and web fetch. With an MCP server connected, Claude can also call tools provided by that server — for example:
  • Querying a database with natural language
  • Creating or updating records in a project management tool
  • Fetching data from a private API that requires authentication
  • Running company-specific workflows
MCP servers expose their tools to Claude, and Claude calls them the same way it calls any other tool — with your permission.

/mcp — manage connections

Run /mcp to open the MCP server management panel. From here you can see connected servers, their status, and enable or disable individual servers.
You can also enable or disable servers directly:

Adding an MCP server

Use the claude mcp add CLI subcommand to register a new server. The command supports three transport types: stdio (subprocess), HTTP, and SSE (Server-Sent Events).

Stdio server (subprocess)

HTTP server

SSE server

Configuration scope

By default, servers are added to the local scope (your current project directory). Use --scope to change this:

Config file format

MCP server configurations are stored in a JSON file. The structure looks like this:

Authentication for MCP servers

Some HTTP and SSE servers require OAuth authentication. Use --client-id and --client-secret when adding the server:
The --client-secret flag prompts you to enter the secret interactively (or you can set it via the MCP_CLIENT_SECRET environment variable). If the server requires a fixed redirect URI (pre-registered with the OAuth provider), use --callback-port to pin a specific port:

Example: connecting a database MCP server

1

Add the server

Register the database MCP server as a stdio subprocess:
2

Verify the connection

Start a Claude Code session and run /mcp to confirm the server shows as connected.
You should see db-server listed with a connected status.
3

Use the new tools

Claude now has access to the database tools exposed by the server. Ask it to use them in plain language:
Claude will call the database tools automatically and return the results.

Troubleshooting MCP connections

Check that the command or URL is correct and that any required environment variables are set. For stdio servers, verify the package is installed:
Use /mcp reconnect my-server to retry the connection after fixing the issue.
The server requires authentication but Claude doesn’t have valid credentials. Re-add the server with --client-id and --client-secret, or check that your OAuth token is still valid.
The server may have connected but failed to expose its tool list. Check the server’s own logs or documentation. You can also try /mcp disable my-server followed by /mcp enable my-server to force a reconnect.
If you see a warning like “The command looks like a URL but is being interpreted as a stdio server”, you forgot the --transport flag. Add --transport http or --transport sse: