Claude Code is Anthropic's CLI-based agentic coding tool that runs in the terminal and can autonomously read, write, and execute code. It supports MCP servers through a format nearly identical to Claude Desktop — an mcpServers root key with the same stdio and remote server structure. The main difference is that remote servers use a type field instead of transport to specify the connection protocol. Claude Code supports both project-level config at .mcp.json (checked into source control alongside your code) and a global user config at ~/.claude.json for servers available across all projects. The getmcp CLI auto-detects Claude Code if the ~/.claude directory exists and handles the minor format differences automatically.
The fastest way to install MCP servers in Claude Code is with the getmcp CLI:
npx @getmcp/cli add <server-id>Example configuration for the github server:
{
"mcpServers": {
"brave-search": {
"command": "npx",
"args": [
"-y",
"@brave/brave-search-mcp-server"
],
"env": {
"BRAVE_API_KEY": ""
}
}
}
}