DEV Community

Beyen
Beyen

Posted on

MCP Config Schema Differences in 2026: Claude Code (mcpServers) vs VS Code (.vscode/mcp.json inputs) vs OpenAI Codex (config.toml)

If you switch between Claude Code, VS Code (GitHub Copilot Agent Mode), OpenAI Codex CLI, Cursor, and Windsurf, you have probably hit a frustrating wall: every client uses a slightly different root key, file path, or secret-injection syntax for the Model Context Protocol (MCP).

Copying a working "mcpServers" block from Claude Desktop or Cursor directly into .vscode/mcp.json or ~/.codex/config.toml silently fails.

Here is the exact 2026 6-Client MCP Schema Mapping Matrix, side-by-side conversion examples, and a 100% browser-local converter so you don't have to rewrite JSON into TOML by hand.


1. The 2026 6-Client MCP Schema Mapping Matrix

AI Coding Client & Config Path Root Key / Table Syntax Environment & Secret Injection Remote HTTP / SSE Server Key
Claude Code (.mcp.json) & Claude Desktop "mcpServers": { "<name>": { ... } } "env": { "KEY": "${KEY}" } (or claude mcp add -e KEY=...) `"type": "http" \
VS Code / Copilot ({% raw %}.vscode/mcp.json) "servers": { "<name>": { "type": "stdio", ... } } Top-level "inputs": [{"id": "k", "type": "promptString", "password": true}] → "${input:k}" `"type": "http" \
OpenAI Codex CLI ({% raw %}~/.codex/config.toml) TOML table [mcp_servers.<name>] Inline env = { KEY = "VAL" } or subtable [mcp_servers.<name>.env] url = "https://..." + optional bearer_token_env_var
Cursor (.cursor/mcp.json) "mcpServers": { "<name>": { ... } } "env": { "KEY": "..." } "url": "https://..."
Windsurf (mcp_config.json) "mcpServers": { "<name>": { ... } } "env": { "KEY": "..." } "serverUrl": "https://..."

2. Side-by-Side Conversion Example (Filesystem + GitHub MCP)

A. Claude Code (.mcp.json) & Cursor (.cursor/mcp.json)

Claude Code and Cursor expect "mcpServers" at the root:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./src"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

B. VS Code (.vscode/mcp.json) — "servers" + "inputs"

VS Code ignores "mcpServers" and instead requires "servers" plus an "inputs" array so you never commit plaintext API keys to Git:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "github-personal-access-token",
      "description": "GitHub Personal Access Token",
      "password": true
    }
  ],
  "servers": {
    "filesystem": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "${workspaceFolder}/src"]
    },
    "github": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github-personal-access-token}"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

C. OpenAI Codex CLI (~/.codex/config.toml) — TOML Sections

OpenAI Codex CLI stores its configuration in TOML rather than JSON. Each server becomes a [mcp_servers.<name>] table:

[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "./src"]

[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]

[mcp_servers.github.env]
GITHUB_PERSONAL_ACCESS_TOKEN = "${GITHUB_PERSONAL_ACCESS_TOKEN}"
Enter fullscreen mode Exit fullscreen mode

3. Watch Out for the "Idle MCP Server Token Tax"

Every active MCP server injects 500 to 2,000+ tokens of JSON tool schemas into your system prompt on every turn. Running 8 local npx MCP servers simultaneously can add $15–$40/month in unnecessary prompt-cache write and read fees on Anthropic API billing.

  • You can calculate the exact dollar impact of your active MCP servers (or drag-and-drop your local ~/.claude/projects/**/*.jsonl logs offline) using the Claude Code Cost Calculator & JSONL Analyzer.
  • For occasional workflows (like database migration checks or PR security audits), consider packaging them as progressive-disclosure SKILL.md files (~50 tokens at startup) using the SKILL.md Visual Builder & YAML Validator.

4. Free Browser-Local Converter & Open-Source Templates

Top comments (0)