Home / MCP / JSON Schema MCP Server
Provides a server to store JSON schemas, create new schemas, and generate instances from them.
Configuration
View docs{
"mcpServers": {
"json_schema": {
"command": "python",
"args": [
"server.py"
]
}
}
}You can use this MCP server to store JSON schemas, create new schemas, and generate concrete instances from those schemas. It streamlines designing data contracts and producing valid data that conforms to them, which is useful for validating inputs, generating mock data, and powering robust APIs.
You interact with the MCP server through a client that speaks the MCP protocol. Start by creating a schema for your data, then generate instances from that schema by providing value mappings. Store and retrieve schemas as your data models evolve, and use generated instances to test validation and downstream processing.
Prerequisites: Python is installed on your system.
pip install mcp[cli]Run the server directly with Python.
python server.pyAlternatively, install the MCP server via the command line tool.
mcp install server.pyYou can use the provided tools to manage schemas and instances. Persisted schemas can be retrieved by their IDs, and a list of all available schemas is also available for discovery.
Example workflow includes creating a Person schema and then creating a Person instance from that schema.
Create a Person schema with required fields and then instantiate it with concrete values.
Create a new JSON schema by specifying a title, properties with types, and required fields.
Create a concrete JSON instance from an existing schema by providing the schema_id and the values to populate.