Command reference Β· Claude Code
/mcp
Manages MCP server connections and OAuth authentication.
Opens an interactive list of all configured MCP servers, with connection status and tool count per server, when called without an argument. From there, OAuth login can also be started or refreshed for a server (Re-authenticate), for example when a call fails with 401 Unauthorized or 403 Forbidden and the server is therefore marked as needing authentication.
With arguments, the command targets individual servers: /mcp reconnect <server> rebuilds the connection to a disconnected server, /mcp enable/disable <server> (or all) turns servers on or off without deleting their configuration β a disabled server stays visible in the list but marked as disabled. For HTTP or SSE servers, Claude Code first tries to automatically rebuild an interrupted connection (up to five attempts with increasing wait time); only after that is manual intervention via /mcp needed.
Also usable non-interactively since version 2.1.205 (-p); without an argument, the command then outputs a text summary of server status instead of the interactive list. New servers are not set up here but via claude mcp add.
π THE SAME TASK (βMANAGE MCP SERVERSβ) ON OTHER PLATFORMS
β WHEN TO USE IT?
Fix the connection status of an MCP server
An MCP server stops responding β run /mcp reconnect <server> to rebuild the connection.
Selectively disable individual MCP servers
Use /mcp disable <server> to temporarily turn off a rarely used server without losing its configuration.
Refresh OAuth login for a server
If /mcp shows a server as needing authentication after a 401 error, select 'Re-authenticate' in the server menu.
β WHEN NOT TO?
Setting up a new MCP server for the first time
/mcp only manages existing connections (reconnect, enable, disable) and OAuth authentication; it doesn't create a new server configuration.
Better: Add the server first with claude mcp add, before using /mcp to manage it.
Checking server status automatically in a script
Interactively, /mcp opens a selection dialog that's unsuitable for automated checks.
Better: Run /mcp non-interactively with -p (from v2.1.205) for a text summary, or claude mcp list for the configuration list.
SOURCES
- Claude Code docs (official) β code.claude.com
MORE COMMANDS Β· Claude Code