Enter a server once. Get the config entry for your client, the file path for macOS, Windows and Linux, and a warning if a secret would end up in plain text.
To add an MCP server to Claude Desktop, put an entry under mcpServers in claude_desktop_config.json, which lives in ~/Library/Application Support/Claude on macOS and in %APPDATA%\Claude on Windows. Each client has its own file and its own key. As of October 2026 the vendors' docs say: Claude Code reads .mcp.json in the project, or you run claude mcp add; Cursor reads .cursor/mcp.json or ~/.cursor/mcp.json; VS Code recommends a workspace-root .mcp.json with mcpServers for new servers and still reads .vscode/mcp.json, which uses a top-level servers key and is meant for VS Code-only features such as input variables; Codex CLI reads ~/.codex/config.toml and writes each server as a [mcp_servers.name] table. The default entry here, a filesystem server started with npx and given one folder, comes out for Claude Desktop as command npx, three args and an env object with LOG_LEVEL. The page also shows the path for macOS, Windows and Linux. For Claude Desktop the docs list macOS and Windows only, and the page says so.
A stdio server is a program your client starts: you give a command and arguments, one per line, and optional environment variables as KEY=value lines. A remote server is a URL, with an optional list of headers, written as Name: value lines. HTTP means Streamable HTTP, and SSE is the older remote transport. The shapes differ by client. Claude Code writes type http or sse next to the url, Cursor writes only url and headers, and VS Code writes type http or sse. Codex supports stdio and Streamable HTTP, so SSE is refused. Claude Desktop does not read remote servers from its config file, because Anthropic's docs add them under Settings and Connectors, so the page stops with a message instead of writing an entry that would be ignored.
JSON entries are written with JSON string escaping, so a quote, a backslash in a Windows path or a line break inside an argument stays intact. TOML entries use basic strings with the escapes TOML requires, and a server name with a dot or a space is quoted in the table header. The claude mcp add and codex mcp add lines are quoted for a POSIX shell, so use them in bash or zsh. Values and arguments are stored exactly as you type them, including spaces; only the name before the = or : is trimmed, plus the one space after the colon in a header line, and blank lines are skipped. If a name or value looks like a credential, such as API_KEY with a long value, a token starting with sk-, ghp_ or Bearer, the page warns that it will be stored in plain text in that file and, for the command, in your shell history. It then names the safer option the client's own docs give: ${VAR} for Claude Code, ${env:NAME} for Cursor, an inputs entry with ${input:id} for VS Code, and env_vars or bearer_token_env_var for Codex.
It writes one server at a time and does not edit your files, so you merge the entry into the file yourself: add it inside the existing mcpServers or servers object, or append the TOML table. It cannot check that the command exists, that the package name is right, or that the URL answers. Windsurf is not included because its current documentation page covers only the older Cascade agent. Client file formats change, so compare the result with the client's own page if a server does not appear after a restart.
On macOS it is ~/Library/Application Support/Claude/claude_desktop_config.json, and on Windows %APPDATA%\Claude\claude_desktop_config.json. Anthropic's MCP guide lists those two. Add the server under mcpServers and restart Claude Desktop completely.
claude mcp add --env KEY=value --transport stdio --scope project name -- command args. The -- separates Claude's own options from the server command, and --env must not come directly before the name. The page builds this line from your fields and quotes it for bash or zsh.
VS Code's own format in .vscode/mcp.json has a top-level servers object, and each server needs a type of stdio, http or sse. Cursor, Claude Desktop, Claude Code and the portable workspace .mcp.json use mcpServers. Pick VS Code here, then choose .mcp.json (the default, which VS Code recommends for new servers) or .vscode/mcp.json, and the key and type are written for you.
Add a [mcp_servers.name] table with command and args, plus a [mcp_servers.name.env] table for variables. A remote server uses url and an optional [mcp_servers.name.http_headers] table. The page escapes backslashes and quotes as TOML requires.
The key is saved as plain text in the file, and a key passed to claude mcp add also lands in your shell history. Prefer a reference to an environment variable where the client supports it, such as ${API_KEY} in Claude Code's .mcp.json or ${env:API_KEY} in Cursor. The page warns when a value looks like a credential.
No. It is processed in your browser, in this tab, and no server receives it. Your choices of client, name, transport, command and URL are saved in this browser, the arguments, variables and headers are not.