Advertise hereReach developers building with AI coding agents. →

Based on each vendor’s official docs, checked

How to add an MCP server: Claude Code, Codex, Cursor, Copilot and Antigravity

Every major coding agent speaks the Model Context Protocol, but each one adds servers differently: some have a CLI command, some a JSON or TOML file, some a marketplace button. This page is a short map of the first step in each agent, taken from the official docs and checked October 31, 2026. For transports, OAuth, scopes and troubleshooting, follow the link to that agent’s full guide.

  1. 1. Claude Code

    Use claude mcp add. Remote servers take --transport http and a URL; project servers are shared in .mcp.json and user servers live in ~/.claude.json. Sign in to OAuth servers from /mcp. Full guide: Claude Code MCP setup.

    claude mcp add --transport http notion https://mcp.notion.com/mcp
  2. 2. OpenAI Codex

    Use codex mcp add, with the server command after a double dash, or --url for a remote server. Codex stores servers in ~/.codex/config.toml (or .codex/config.toml in a trusted project), shared by the CLI, IDE extension and desktop app. Run codex mcp login for OAuth. Full guide: How to add an MCP server to Codex.

    codex mcp add context7 -- npx -y @upstash/context7-mcp
  3. 3. Cursor

    Click Add to Cursor on a Cursor Marketplace entry, use the Customize page, or edit .cursor/mcp.json (project) or ~/.cursor/mcp.json (global) under an mcpServers key. Full guide: How to add an MCP server to Cursor.

  4. 4. GitHub Copilot

    In VS Code, use the guided add flow or an mcp.json file such as .vscode/mcp.json. In Copilot CLI, run /mcp add or copilot mcp add; servers go to ~/.copilot/mcp-config.json, or .mcp.json or .github/mcp.json in a repository. Copilot CLI does not read .vscode/mcp.json. Full guide: How to add an MCP server to GitHub Copilot.

  5. 5. Google Antigravity

    Open MCP Servers from the agent side panel and choose Manage MCP Servers, or type /mcp in the CLI. Custom servers go in mcp_config.json (global, or .agents/mcp_config.json per workspace), with serverUrl for remote servers. Full guide: How to add an MCP server to Antigravity.

Config formats at a glance

Claude Code, Cursor and Antigravity use JSON with an mcpServers key, but the file names differ. VS Code uses a servers key in mcp.json. Codex uses TOML tables in config.toml. A server block copied from one agent usually needs renaming or reformatting before another agent will read it.

Our MCP config generator writes the right file for each agent from one server definition.

Before you add a server

Each connected server adds its tool descriptions to the agent’s context, and OpenAI’s Codex docs advise disabling servers you don’t need. Only install servers you trust, and prefer OAuth or environment variables over pasting tokens into a committed file.

Tips

Next steps

How to add an MCP server to Codex

→

How to add an MCP server to Cursor

→

How to add an MCP server to GitHub Copilot in VS Code

→

How to add an MCP server to Google Antigravity

→

How to migrate from Gemini CLI to Antigravity CLI

→

Portable agent skills: one SKILL.md for every coding agent

→

Safe “always allow” rules for Claude Code and Codex CLI

→

GitHub Copilot CLI yolo mode: --allow-all and safer tool rules

→

Codex sandbox modes and approval policies explained

→

How to install Claude Code on macOS, Linux and Windows

→

How to install the OpenAI Codex CLI

→

Claude Code auto mode: what runs, what gets blocked, how to turn it off

→

Agent Skills moves to the Agentic AI Foundation: what changes

→

MCP security: the risks in MCP servers and how to lock them down

→

Claude Code in VS Code: install, shortcuts and CLI differences

→

What is AGENTS.md? The open instruction file for coding agents

→

Claude Code on Windows: native, WSL and common errors

→

Codex skills: create, install and use SKILL.md skills in Codex

→

GitHub Copilot CLI: install, sign in and start using it

→

Cursor Agent SDK: build, test and deploy agents as code

→

GPT-6.1 Terra in Codex and the API: setup, pricing and limits

→

MCP OAuth: connect a remote MCP server in Claude Code, Codex and Cursor

→

Codex config.toml: location, precedence and the settings to change

→

Codex on Windows: native sandbox setup, WSL and fixes

→

Antigravity CLI (agy): install, sign in, modes and commands

→

Google Antigravity on Windows: install, WSL, sandbox and fixes

→

GitHub Copilot coding agent (now cloud agent): how to use it

→

GitHub Copilot agent mode: how to use it in your IDE

→

Claude Code tips from Anthropic’s best practices

→

Claude Code with OpenRouter: setup, models and troubleshooting

→

Supabase RLS for AI-built apps: grants, policies and tests

→

Antigravity skills: create, store and run SKILL.md skills

→

Claude Code in JetBrains IDEs: install, connect and fix issues

→

GitHub Copilot skills: create, install and use agent skills

→

Claude Code subagents: create, configure and run them

→

Check which plugins, hooks and MCP servers your agent loads

→

Cursor rules examples: .mdc files for each rule type

→

Fix spawn npx ENOENT when starting an MCP server

→

Frequently asked questions

No. Each agent reads its own file: .mcp.json for Claude Code, config.toml for Codex, .cursor/mcp.json for Cursor, mcp.json or ~/.copilot/mcp-config.json for Copilot, and mcp_config.json for Antigravity.

Sources