MCP Config JSON Schema

The hand-authored JSON Schema (Draft-07) used to validate MCP host configuration files including claude_desktop_config.json and the Cursor MCP config.

Schema verified against MCP spec 2025-11-25, last checked 2026-06-13. View spec source ↗

Schema overview

The root object requires a single mcpServers property. Each key in mcpServers is a server name, and its value must match one of two shapes:

  • stdio server — requires command (string); optionally accepts args (string array) and env (string-valued object).
  • SSE server — requires url (valid URI); optionally accepts headers (string-valued object).

Field reference

Field Type Required Description
mcpServersobjectYesRoot container; keys are server names.
commandstringstdio: YesExecutable to launch (e.g. npx, node, python3).
argsstring[]NoCLI arguments — must be an array of strings, never a single string.
envobjectNoEnvironment variables — all values must be strings (not numbers).
urlstring (URI)SSE: YesSSE endpoint URL — must be a valid http:// or https:// URI.
headersobjectNoHTTP headers sent with SSE requests — values must be strings.

Full schema (JSON)

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "mcp-config",
  "title": "MCP Host Configuration",
  "type": "object",
  "required": [
    "mcpServers"
  ],
  "additionalProperties": false,
  "properties": {
    "mcpServers": {
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "$ref": "#/definitions/stdioServer"
          },
          {
            "$ref": "#/definitions/sseServer"
          }
        ]
      }
    }
  },
  "definitions": {
    "stdioServer": {
      "type": "object",
      "required": [
        "command"
      ],
      "additionalProperties": false,
      "properties": {
        "command": {
          "type": "string",
          "minLength": 1,
          "description": "Executable to run, e.g. \"npx\" or \"node\""
        },
        "args": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "CLI arguments passed to the command. Must be an array of strings."
        },
        "env": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Environment variables. All values must be strings."
        }
      }
    },
    "sseServer": {
      "type": "object",
      "required": [
        "url"
      ],
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "SSE endpoint URL. Must be a valid http:// or https:// URI."
        },
        "headers": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "HTTP headers to send with SSE requests. All values must be strings."
        }
      }
    }
  }
}

Validate your config

Paste your existing MCP config to check it against this schema.