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 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 acceptsargs(string array) andenv(string-valued object). - SSE server — requires
url(valid URI); optionally acceptsheaders(string-valued object).
Field reference
| Field | Type | Required | Description |
|---|---|---|---|
mcpServers | object | Yes | Root container; keys are server names. |
command | string | stdio: Yes | Executable to launch (e.g. npx, node, python3). |
args | string[] | No | CLI arguments — must be an array of strings, never a single string. |
env | object | No | Environment variables — all values must be strings (not numbers). |
url | string (URI) | SSE: Yes | SSE endpoint URL — must be a valid http:// or https:// URI. |
headers | object | No | HTTP 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.