What is MCP?

The Model Context Protocol (MCP) is an open standard that lets AI assistants use tools and data through servers. A server is either a local program that the assistant starts on your computer, which talks to it over standard input and output (stdio), or a remote server that the assistant reaches over HTTP. Every assistant keeps its servers in its own config file, and each file looks a little different.

How to use it

  1. Pick your client: the assistant or editor you use.
  2. Give the server a name made of letters, numbers, hyphens and underscores.
  3. For a local server, enter the command that starts it (such as npx, uvx or docker), its arguments one per line, and any environment variables, such as API keys, as KEY=value. If you pasted a whole command line into the command field, the split button inside it moves everything after the first word into the arguments.
  4. For a remote server, pick Remote URL and enter the server's URL and any headers, such as Authorization: Bearer <token>.
  5. Copy the config into the file listed under Where it goes, or download it. If the file already has servers, add the new entry next to them inside mcpServers ([mcp_servers] in Codex) rather than replacing the whole file.
  6. Restart the app or reload its MCP servers.

For Claude Code, Codex CLI, Gemini CLI and VS Code, the Command box also gives the terminal command that adds the server for you.

Clients

Client Config file Good to know
Claude Desktop claude_desktop_config.json Holds local servers only. Remote servers are added in the app under Settings > Connectors > Add custom connector.
Claude Code .mcp.json in the project root claude mcp add stores servers in ~/.claude.json instead, for you alone.
Cursor .cursor/mcp.json in the project, or ~/.cursor/mcp.json
VS Code with GitHub Copilot .mcp.json in the workspace root, or ~/.copilot/mcp-config.json The older servers format in .vscode/mcp.json is only for VS Code's deprecated local harness.
Codex CLI ~/.codex/config.toml A TOML file. Headers of a remote server can only be set in the file, not with codex mcp add.
Gemini CLI .gemini/settings.json in the project, or ~/.gemini/settings.json Remote servers use httpUrl.
Devin Desktop (Windsurf) ~/.config/devin/mcp_config.json, or .devin/mcp_config.json Windsurf was renamed Devin Desktop. Personal keys go in .devin/mcp_config.local.json, which stays out of version control.

Chrome saves a download named .mcp.json as mcp.json, so add the leading dot back when you move it into place.

Keeping keys safe

Config files keep API keys as plain text. Don't commit a project file with real keys to a shared repository. Most clients can read a key from your environment instead of the file, each with its own syntax, which their documentation describes.

Everything is put together in your browser, so the commands, URLs and keys you enter aren't sent anywhere.