claude mcp command group lets you add, remove, list, and inspect MCP servers, as well as run Claude Code itself as an MCP server.
Subcommands
mcp add
Add an MCP server to Claude Code.
Unique name to identify this MCP server.
For
For
stdio transport: the executable command to run.For
sse or http transport: the server URL.Configuration scope. Choices:
local (default), user, project.Transport type. Choices:
stdio (default), sse, http.Set environment variables for the server process (e.g.
-e KEY=value).
Only applies to stdio transport.Set HTTP/WebSocket headers (e.g.
-H "Authorization: Bearer abc"). Only
applies to sse and http transports.OAuth client ID for
http or sse servers.Prompt for an OAuth client secret (or set the
MCP_CLIENT_SECRET environment
variable instead).Fixed port for the OAuth callback. Use this for servers that require
pre-registered redirect URIs.
mcp remove
Remove an MCP server from the configuration.
Name of the server to remove.
Configuration scope to remove from (
local, user, or project). If not
specified, the server is removed from whichever scope it exists in.mcp list
List all configured MCP servers.
The workspace trust dialog is skipped and stdio servers from
.mcp.json are
spawned for health checks. Only use this command in directories you trust.mcp get
Get details about a specific MCP server.
Name of the server to inspect.
The workspace trust dialog is skipped and stdio servers from
.mcp.json are
spawned for health checks. Only use this command in directories you trust.mcp serve
Start Claude Code itself as an MCP server. This lets other tools connect to
Claude Code over the MCP protocol.
Enable debug mode.
Override the verbose mode setting from config.
mcp add-json
Add an MCP server by providing the configuration as a raw JSON string.
Configuration scope:
local (default), user, or project.mcp add-from-claude-desktop
Import MCP servers from a Claude Desktop installation (macOS and WSL only).
Configuration scope:
local (default), user, or project.mcp reset-project-choices
Reset all approved and rejected project-scoped (.mcp.json) servers within
the current project.
Configuration scopes
| Scope | File location | When to use |
|---|---|---|
local | .claude/settings.local.json | Personal, not committed to git |
user | ~/.claude/settings.json | Available across all projects |
project | .claude/settings.json | Shared with the team via git |
The /mcp slash command
Inside an interactive session, run /mcp to open the MCP settings panel where you can view server status, enable/disable servers, and reconnect.