Hotfix Daily

Guide · Updated October 2026 · Last reviewed

How to add MCP servers to your coding agent: commands, config files and fixes

You found an MCP server you want, maybe from our MCP servers worth knowing list. Now you need to plug it in. Every client does this a bit differently: Claude Code, Codex and Gemini CLI have an mcp add command, Cursor and VS Code use JSON files, and Codex stores its config in TOML. Below are the commands and file locations for each client, taken from their own docs, then how to test a server before your agent touches it and how to fix the usual problems.

At a glance

ClientAdd it with · config fileScopes
Claude Codeclaude mcp add · ~/.claude.json or project .mcp.jsonlocal (default), project, user
CursorCustomize page or Marketplace · .cursor/mcp.json or ~/.cursor/mcp.jsonproject, global
Codexcodex mcp add · ~/.codex/config.toml or .codex/config.tomluser, project (trusted projects only)
VS Code with CopilotCommand Palette → MCP: Add Server · ~/.copilot/mcp-config.json or workspace .mcp.jsonglobal, workspace
Gemini CLIgemini mcp add · .gemini/settings.json or ~/.gemini/settings.jsonproject (default), user
ClineMCP Servers panel · cline_mcp_settings.jsonper install
Claude DesktopSettings → Developer → Edit Config · claude_desktop_config.jsonper app

Keep this list current without the research

Tools change every week. Hotfix Daily tells you what changed, why it matters and links the source. Free, weekdays, about 3 minutes.

Follow by RSS

Before you start: local or remote?

MCP servers use one of two transports. Stdio runs the server as a local process on your machine and typically serves a single client. Streamable HTTP connects to a server at a URL, supports standard HTTP auth such as bearer tokens, API keys and custom headers, and typically serves many clients. The current spec release is dated July 28, 2026.

How to tell which one you have

  • If the vendor gives you a URL (like https://mcp.notion.com/mcp), it's a remote HTTP server, and it usually signs you in with OAuth.
  • If the vendor gives you a command (like npx -y @playwright/mcp@latest), it's a local stdio server, and you need its runtime, such as Node.js.
  • SSE is the older remote transport. Claude Code's docs call it deprecated and say to use HTTP servers where available.

MCP architecture · Spec releases

Client by client

Claude Code

Add it with · config file: claude mcp add · ~/.claude.json (local and user scopes) or .mcp.json at the project root (project scope)

# Remote (HTTP) server
claude mcp add --transport http notion https://mcp.notion.com/mcp

# Local (stdio) server: everything after -- goes to the server untouched
claude mcp add --env AIRTABLE_API_KEY=YOUR_KEY --transport stdio airtable \
  -- npx -y airtable-mcp-server

# Manage
claude mcp list
claude mcp get <name>
claude mcp remove <name>
  • Scopes: local is the default and private to you in that project. project writes .mcp.json so the whole team gets it through git. user is private to you and loads in every project. Add --scope project or --scope user to change it.
  • Inside a session, /mcp shows status and handles OAuth sign-in. Already set up Claude Desktop? claude mcp add-from-claude-desktop imports its servers.
  • Claude Code prompts for approval in interactive sessions before using project-scoped servers from .mcp.json. Its docs say claude -p runs and Agent SDK sessions load them without asking.

Our take: Use project scope for servers that need no secrets, and local or user scope for anything that uses a token.

Source

Cursor

Add it with · config file: Customize page or Cursor Marketplace · .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

  • Cursor supports stdio, SSE and Streamable HTTP, and remote servers can use OAuth.
  • A local server uses command, args and env under mcpServers. A remote server uses url and optional headers.
{
  "mcpServers": {
    "my-remote": {
      "url": "https://api.example.com/mcp",
      "headers": { "Authorization": "Bearer ${env:MY_TOKEN}" }
    }
  }
}
  • Cursor resolves ${env:NAME} in command, args, env, url and headers, so tokens stay out of the file.
  • Cursor asks for approval before using MCP tools by default, and MCP follows the same Run Modes as terminal commands.

Our take: Commit .cursor/mcp.json with ${env:...} references only, never with real keys.

Source

Codex (CLI, IDE extension and ChatGPT desktop app)

Add it with · config file: codex mcp add · ~/.codex/config.toml, or .codex/config.toml in a trusted project

# Local (stdio) server
codex mcp add context7 -- npx -y @upstash/context7-mcp

# Remote server, then sign in if it uses OAuth
codex mcp add <name> --url https://mcp.example.com
codex mcp login <name>

codex mcp list
  • In TOML, each server is a [mcp_servers.<name>] table. Local servers use command, args and env; remote servers use url, and optionally bearer_token_env_var or http_headers.
[mcp_servers.figma]
url = "https://mcp.figma.com/mcp"
bearer_token_env_var = "FIGMA_OAUTH_TOKEN"
default_tools_approval_mode = "writes"
startup_timeout_sec = 20
tool_timeout_sec = 60
  • The ChatGPT desktop app, Codex CLI and IDE extension share this config. In the terminal UI, /mcp lists your active servers.
  • Useful options: enabled_tools and disabled_tools (allow and deny lists), default_tools_approval_mode (auto, prompt, writes or approve), startup_timeout_sec (default 10) and tool_timeout_sec (default 60).

Our take: Set default_tools_approval_mode = "writes" on servers that can change things, so Codex prompts for any tool that isn't marked read-only.

Source

VS Code with GitHub Copilot

Add it with · config file: Command Palette → MCP: Add Server · ~/.copilot/mcp-config.json (Global > Copilot) or a workspace-root .mcp.json

  • The guided flow asks for a server URL (HTTP or SSE) or a launch command (stdio). It can also generate a config from an npm package, pip package or Docker image name, and shows the publisher for you to confirm first.
  • A workspace-root .mcp.json needs the experimental chat.mcp.workspaceRootConfig.enabled setting. The older .vscode/mcp.json and user-profile mcp.json still work and are labeled deprecated in the guided flow.
  • Format gotcha: portable files use a top-level mcpServers object, while the VS Code format uses servers. Check which one before you copy a config across.

Our take: Copilot's Free plan already includes MCP in agent mode, so you can try all of this at no cost.

Source · Copilot plans

Gemini CLI

Add it with · config file: gemini mcp add · .gemini/settings.json (project, the default) or ~/.gemini/settings.json (user, with -s user)

gemini mcp add [options] <name> <commandOrUrl> [args...]

# Remote server over HTTP
gemini mcp add -t http my-server https://mcp.example.com/mcp

gemini mcp list
  • The transport defaults to stdio; use -t http or -t sse for remote servers. --include-tools and --exclude-tools limit which tools load, and --timeout sets the connection timeout in milliseconds.
  • --trust bypasses all tool call confirmation prompts, so use it only for servers you fully trust.
  • In settings.json, command is for stdio, url for SSE and httpUrl for Streamable HTTP. /mcp shows server status, and gemini mcp enable, disable and remove manage servers.

Our take: Leave --trust off. The confirmation prompts are your safety net.

Source

Cline

Add it with · config file: MCP Servers icon → Configure (IDE), or ~/.cline/data/settings/cline_mcp_settings.json (CLI)

  • In the IDE, the Remote Servers tab takes a name and URL, and offers Streamable HTTP (recommended) or SSE (legacy).
  • In the JSON file, servers go under mcpServers. The CLI path can be changed with the CLINE_MCP_SETTINGS_PATH environment variable, and cline mcp opens a setup wizard.

Source

Claude Desktop

Add it with · config file: Settings → Developer → Edit Config · claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. Windows: %APPDATA%\Claude\claude_desktop_config.json.
  • The MCP docs walk through it with the Filesystem server. Logs are in ~/Library/Logs/Claude (macOS) or %APPDATA%\Claude\logs (Windows).

Source

Test and find servers

Which servers to install: see MCP servers worth knowing.

MCP Inspector

The official tool for inspecting MCP servers. List a server's tools and try them by hand before an agent gets them.

npx @modelcontextprotocol/inspector        # web UI (default)
npx @modelcontextprotocol/inspector --cli  # CLI
npx @modelcontextprotocol/inspector --tui  # terminal UI
  • The README says it stores secrets such as OAuth tokens in the OS keychain by default. On machines with no keychain (headless Linux, SSH sessions, some containers) they go to ~/.mcp-inspector/secrets.json, unencrypted unless you supply a key.

Our take: Seeing exactly what a server exposes, and checking whether a problem is the server or your client.

Source

Official MCP Registry

The MCP project's list of published servers, which it describes as "like an app store for MCP servers." It launched in preview on September 8, 2025, and the project says it is still a preview release, so breaking changes or data resets may happen.

Our take: Checking whether a vendor publishes an official server before you install a community one.

Source

Troubleshooting

Claude Code · Codex · Gemini CLI

Safety settings worth turning on

How to choose a setup (our take)

FAQ

How do I add an MCP server?

Find out whether the server is remote (a URL) or local (a command). Then use your client's add command (claude mcp add, codex mcp add, gemini mcp add), its UI (Cursor's Customize page, VS Code's MCP: Add Server), or its config file. Then check the server's status, for example with /mcp in Claude Code, Codex or Gemini CLI.

Where is the MCP config file?

Claude Code: ~/.claude.json and project .mcp.json. Cursor: .cursor/mcp.json or ~/.cursor/mcp.json. Codex: ~/.codex/config.toml or project .codex/config.toml. VS Code: ~/.copilot/mcp-config.json or workspace .mcp.json. Gemini CLI: .gemini/settings.json or ~/.gemini/settings.json.

What's the difference between stdio and Streamable HTTP?

Stdio runs the server as a local process on your machine. Streamable HTTP connects to a server at a URL and supports standard HTTP auth such as bearer tokens, API keys and headers; MCP recommends OAuth to get tokens. SSE is the older remote transport.

Can I use the same MCP config in every client?

Not always as-is. Most clients use an mcpServers object, the VS Code format uses servers, and Codex uses TOML tables. The server itself works in any client that supports its transport.

How do I test an MCP server without an agent?

Run npx @modelcontextprotocol/inspector, connect to the server, and call its tools by hand.

Is it safe to commit .mcp.json?

Yes, if it has no secrets. Use environment variable references or OAuth. Claude Code prompts for approval before using project-scoped servers in interactive sessions, but not in claude -p runs.

Related

Every command and setting on this page comes from the client's own docs (linked as Source) and was checked on October 21, 2026. Placeholder values like <name> and https://mcp.example.com are examples; use your server's real name and URL.

How we write these: each tool description is based on the tool's own site or docs (linked as Source) and checked on the date above. "Our take" lines are our opinion. Something out of date? Email hello@hotfixdaily.com. No tool paid to be listed.

Get the next issue in your inbox

Five things worth your attention in AI, agents, vibe coding and game dev, every weekday. Plus the free AI Builder Starter Stack PDF when you join.

Follow by RSS