How to add an MCP server to your client

Every MCP client reads its own config file, in its own place, under its own key — which is why a config that works in Claude Desktop is silently ignored by VS Code. These guides cover where the file lives, the JSON to paste, how to pass a token without committing it, and what to check when a server never shows up.

Config file, per client

ClientConfig fileTop-level key
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonmcpServers
Claude Code.mcp.jsonmcpServers
Cursor~/.cursor/mcp.jsonmcpServers
VS Code.vscode/mcp.jsonservers
Windsurf~/.codeium/windsurf/mcp_config.jsonmcpServers

Frequently asked questions

Is the MCP config the same for every client?

Nearly. Claude Desktop, Claude Code, Cursor and Windsurf all use an mcpServers object keyed by server name, with command, args and optional env. VS Code uses the same entry shape under a servers key instead.

Do I need to restart my client after adding an MCP server?

For Claude Desktop, yes — quit fully and reopen. Cursor and Windsurf can reconnect from their MCP panel, and Claude Code picks up a server as soon as claude mcp add returns.

Can one MCP server be used by several clients at once?

Yes. A server is just a process started by the client, so each client starts its own copy from its own config. The same command works in all of them.