Last active
April 17, 2025 20:57
-
-
Save timheuer/7b092645f01fe15fad2a96677d0b34e6 to your computer and use it in GitHub Desktop.
MCP Server Config JSON Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "https://json.schemastore.org/mcp-config-0.1.0.json", | |
"title": "MCP Servers Configuration", | |
"description": "Configuration schema for MCP (Model Context Protocol) servers", | |
"type": "object", | |
"required": ["servers"], | |
"additionalProperties": true, | |
"properties": { | |
"inputs": { | |
"type": "array", | |
"description": "Array of input configurations", | |
"items": { | |
"$ref": "#/definitions/input" | |
} | |
}, | |
"servers": { | |
"type": "object", | |
"description": "Map of server configurations", | |
"minProperties": 1, | |
"patternProperties": { | |
"^[a-zA-Z][a-zA-Z0-9_-]*$": { | |
"$ref": "#/definitions/server" | |
} | |
}, | |
"additionalProperties": false | |
} | |
}, | |
"definitions": { | |
"promptStringInput": { | |
"type": "object", | |
"description": "Configuration for string input prompts", | |
"required": ["type", "id", "password"], | |
"additionalProperties": true, | |
"properties": { | |
"type": { | |
"type": "string", | |
"const": "promptString" | |
}, | |
"id": { | |
"type": "string", | |
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$", | |
"description": "Unique identifier for the input" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"default": { | |
"type": "string" | |
}, | |
"password": { | |
"type": "boolean", | |
"description": "If true, the input should be masked", | |
"default": true | |
} | |
} | |
}, | |
"pickStringInput": { | |
"type": "object", | |
"description": "Configuration for selection from predefined options", | |
"required": ["type", "id", "options"], | |
"additionalProperties": true, | |
"properties": { | |
"type": { | |
"type": "string", | |
"const": "pickString" | |
}, | |
"id": { | |
"type": "string", | |
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$", | |
"description": "Unique identifier for the input" | |
}, | |
"description": { | |
"type": "string" | |
}, | |
"options": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"minItems": 1 | |
}, | |
"default": { | |
"type": "string" | |
} | |
} | |
}, | |
"commandInput": { | |
"type": "object", | |
"description": "Configuration for command execution input", | |
"required": ["type", "id", "command"], | |
"additionalProperties": true, | |
"properties": { | |
"type": { | |
"type": "string", | |
"const": "command" | |
}, | |
"id": { | |
"type": "string", | |
"pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$", | |
"description": "Unique identifier for the input" | |
}, | |
"command": { | |
"type": "string", | |
"description": "Command to execute" | |
}, | |
"args": { | |
"type": "array", | |
"description": "Command arguments", | |
"items": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"input": { | |
"oneOf": [ | |
{ "$ref": "#/definitions/promptStringInput" }, | |
{ "$ref": "#/definitions/pickStringInput" }, | |
{ "$ref": "#/definitions/commandInput" } | |
] | |
}, | |
"stdioServer": { | |
"type": "object", | |
"description": "Configuration for STDIO server", | |
"required": ["command"], | |
"additionalProperties": true, | |
"properties": { | |
"type": { | |
"type": "string", | |
"const": "stdio" | |
}, | |
"command": { | |
"type": "string", | |
"description": "Command to start the server" | |
}, | |
"args": { | |
"type": "array", | |
"description": "Command arguments", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"env": { | |
"type": "object", | |
"description": "Environment variables", | |
"additionalProperties": { | |
"type": "string" | |
} | |
}, | |
"envFile": { | |
"type": "string", | |
"description": "Path to environment variables file" | |
} | |
} | |
}, | |
"sseServer": { | |
"type": "object", | |
"description": "Configuration for Server-Sent Events (SSE) server", | |
"required": ["url"], | |
"additionalProperties": true, | |
"properties": { | |
"type": { | |
"type": "string", | |
"const": "sse" | |
}, | |
"url": { | |
"type": "string", | |
"format": "uri", | |
"description": "Server URL (must be absolute)" | |
}, | |
"headers": { | |
"type": "object", | |
"description": "HTTP headers to send with requests", | |
"additionalProperties": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"server": { | |
"oneOf": [ | |
{ | |
"$ref": "#/definitions/stdioServer" | |
}, | |
{ | |
"$ref": "#/definitions/sseServer" | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment