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.
string
required
Unique name to identify this MCP server.
string
required
For
For
stdio transport: the executable command to run.For
sse or http transport: the server URL.string
Configuration scope. Choices:
local (default), user, project.string
Transport type. Choices:
stdio (default), sse, http.string[]
Set environment variables for the server process (e.g.
-e KEY=value).
Only applies to stdio transport.string[]
Set HTTP/WebSocket headers (e.g.
-H "Authorization: Bearer abc"). Only
applies to sse and http transports.string
OAuth client ID for
http or sse servers.boolean
Prompt for an OAuth client secret (or set the
MCP_CLIENT_SECRET environment
variable instead).string
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.
string
required
Name of the server to remove.
string
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.
string
required
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.
boolean
Enable debug mode.
boolean
Override the verbose mode setting from config.
mcp add-json
Add an MCP server by providing the configuration as a raw JSON string.
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).
string
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
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.