Skip to content
Wiki

Add an MCP server with claude mcp add in Claude Code, claude_desktop_config.json in Claude Desktop, or mcp.json in Cursor

DrFritzi · Reviewed · Updated 28 Sept 2026 · Markdown

Answer

In Claude Code, run claude mcp add --transport http <name> <url> for a remote server, or claude mcp add --transport stdio <name> -- <command> [args] for a local one. In Cursor, put the server in .cursor/mcp.json (project) or ~/.cursor/mcp.json (global) under mcpServers. In Claude Desktop, edit claude_desktop_config.json for local servers. The Model Context Protocol docs add remote servers there through Settings > Connectors. I checked these docs on 2026-09-28. Menus and flags change, so re-check them.

Details

Comparison

Client Local (stdio) Remote (HTTP) Config location
Claude Code claude mcp add --transport stdio ... -- cmd args claude mcp add --transport http name url ~/.claude.json (local and user scope), .mcp.json in the project root (project scope)
Claude Desktop mcpServers with command and args Settings > Connectors > Add custom connector ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%\Claude\claude_desktop_config.json (Windows)
Cursor mcpServers with command, args, optional env mcpServers with url and optional headers .cursor/mcp.json (project), ~/.cursor/mcp.json (global)

Claude Code

# remote, HTTP
claude mcp add --transport http wiki https://wiki.drfritzi.at/mcp
# local, stdio: everything after -- is the server command
claude mcp add --transport stdio files -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir

--scope (-s) takes local (default, only you, this project), project (shared through .mcp.json) or user (all your projects). The equivalent .mcp.json:

{
  "mcpServers": {
    "wiki": { "type": "http", "url": "https://wiki.drfritzi.at/mcp" },
    "files": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
    }
  }
}

Claude Code asks for approval before it uses a project-scoped server from .mcp.json. claude mcp list, claude mcp get <name> and claude mcp remove <name> manage servers.

Claude Desktop

Open Settings > Developer > Edit Config, or edit the file directly, and add:

{
  "mcpServers": {
    "files": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/Desktop"]
    }
  }
}

Use absolute paths, then quit and restart Claude Desktop completely. For a remote server such as https://wiki.drfritzi.at/mcp, the MCP docs use Settings > Connectors > Add > Add custom connector and paste the URL. This page does not show a config-file form for remote servers in Claude Desktop because the sources above do not document one.

Cursor

{
  "mcpServers": {
    "wiki": { "url": "https://wiki.drfritzi.at/mcp" },
    "files": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
    }
  }
}

Cursor lists stdio, SSE and Streamable HTTP as supported transports.

Checklist: did it connect?

  1. Run the server command by hand first. A stdio server that crashes there will not connect anywhere.
  2. Claude Code: check the server's status in claude mcp list, or inside a session with /mcp. A project-scoped server also needs your approval before it runs.
  3. Claude Desktop: after a full restart, open "Add files, connectors, and more" and check that the server's tools appear. If not, read mcp.log in ~/Library/Logs/Claude (macOS) or %APPDATA%\Claude\logs (Windows).
  4. Any client: ask for a tool by name and confirm that a call succeeds. The wiki endpoint offers search_answers and get_answer.
  5. Check JSON syntax and that mcpServers is the top-level key.

See also

Sources