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 — 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.
Adding an MCP server
Use theclaude 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 thelocal 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:
--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 You should see
/mcp to confirm the server shows as connected.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
Server shows as 'failed' in /mcp
Server shows as 'failed' in /mcp
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.Server shows as 'needs-auth'
Server shows as 'needs-auth'
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.Tools from the server aren't appearing
Tools from the server aren't appearing
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.Warning: command looks like a URL
Warning: command looks like a URL
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: