Free toolGenerate .mcp.json configs for Claude Code, Cursor & Codex →
Free · runs in your browser · formats checked Oct 16, 2026

MCP config generator

Every agent wants a different file, key and format. Pick a server and your agents, and copy the exact config for each.

2. Details

3. Agents

Never paste real secrets into config files you commit. Nothing you type here leaves your browser.

MCP config formats, agent by agent

An MCP config tells your coding agent which Model Context Protocol servers to start or connect to. A local server runs on your machine over stdio, so the config gives a command, args and env. A remote server runs over HTTP, so the config gives a URL and, where needed, headers. The idea is the same everywhere, but the file name, the top-level key and the field names are not. Here is what each agent expects, checked against its official docs on Nov 2, 2026.

Claude Code: .mcp.json with mcpServers and a type

Project servers go in .mcp.json at the repo root, which you can commit and share. User and local-scope servers live in ~/.claude.json. You can also skip the file and run claude mcp add or claude mcp add-json. Remote entries need "type": "http" (or "sse" / "ws"); an entry with a url but no type is read as stdio and skipped. "streamable-http" is accepted as an alias for http.

{ "mcpServers": { "example": { "type": "http", "url": "https://mcp.example.com/mcp" } } }

Source: code.claude.com/docs/en/mcp

Codex: TOML tables in config.toml, not JSON

Codex has no mcp.json. Each server is a [mcp_servers.<name>] table in ~/.codex/config.toml, or in a project .codex/config.toml for trusted projects. Stdio servers need command; Streamable HTTP servers need url. The Codex CLI, IDE extension and ChatGPT desktop app share this file, and codex mcp add writes it for you.

[mcp_servers.example]
url = "https://mcp.example.com/mcp"

[mcp_servers.local-tool]
command = "npx"
args = ["-y", "package-name"]

Source: developers.openai.com/codex/mcp

Cursor: mcp.json with mcpServers and a plain url

Create .cursor/mcp.json in a project, or ~/.cursor/mcp.json for servers you want everywhere. Cursor uses the mcpServers key. Remote servers take a url plus optional headers, with no type field needed, and Cursor supports variable interpolation in values.

{ "mcpServers": { "example": { "url": "https://mcp.example.com/mcp", "headers": { "API_KEY": "value" } } } }

Source: cursor.com/docs/mcp

VS Code and GitHub Copilot: "servers", or a portable .mcp.json

VS Code’s own format, used in .vscode/mcp.json and the user-profile mcp.json, puts servers under a top-level servers key with an explicit type. VS Code’s docs now also describe a portable workspace-root .mcp.json that uses mcpServers, offered when an experimental setting is on, and label the older destinations deprecated in the guided flow while keeping them available. The docs warn not to copy config between the two formats without checking. Copilot CLI reads ~/.copilot/mcp-config.json, not .vscode/mcp.json.

{ "servers": { "example": { "type": "http", "url": "https://mcp.example.com/mcp" } } }

Source: code.visualstudio.com/docs/copilot/customization/mcp-servers

Antigravity: mcp_config.json with serverUrl

The Antigravity app, IDE and CLI read ~/.gemini/config/mcp_config.json globally and .agents/mcp_config.json per workspace, under mcpServers. Remote servers must use Streamable HTTP; set the endpoint in serverUrl (the docs say url also works). The Gemini CLI httpUrl field and legacy HTTP+SSE are not supported. In the CLI, type /mcp to open the interactive MCP manager.

{ "mcpServers": { "example": { "serverUrl": "https://mcp.example.com/mcp" } } }

Source: antigravity.google/docs/mcp

Quick reference

AgentFileTop-level keyRemote field
Claude Code.mcp.json · ~/.claude.jsonmcpServersurl + "type": "http"
Codex~/.codex/config.toml[mcp_servers.<name>]url
Cursor.cursor/mcp.jsonmcpServersurl
VS Code / Copilot.vscode/mcp.jsonserversurl + "type": "http"
Antigravity.agents/mcp_config.jsonmcpServersserverUrl

Setting up one agent in depth? See the per-agent guides: Claude Code, Codex, Cursor, GitHub Copilot and Antigravity.

Frequently asked questions

VS Code (GitHub Copilot) uses a top-level "servers" key and an explicit "type", while Cursor, Claude Code and Antigravity use "mcpServers". Copying a file between them without changing the key is the most common cause.