SCHEMA SPECIFICATION • DRAFT-07

MCP Config JSON Schema

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

Verified against spec 2026-07-28 • Checked 2026-08-30 • View official spec ↗

Schema Architecture Overview

The root object requires a single mcpServers property. Each key in mcpServers represents a unique server identifier and must match one of two transport shapes:

stdio Transport

Requires command (string). Optionally accepts args (string[]) and env (key-value strings).

SSE Transport

Requires url (valid URI). Optionally accepts headers (key-value strings).

Field Reference

Field Type Required Description
mcpServersobjectYesRoot container; keys are unique server names.
commandstringstdio: YesExecutable binary to launch (e.g. npx, node, python3, uv).
argsstring[]NoCLI arguments — must be an array of strings.
envobjectNoEnvironment variables — all values must strictly be strings.
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 (Draft-07 JSON)

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 configuration

Check existing JSON configs against this schema in real-time.