About schema
An MCP server for AI agents that generates and validates JSON Schemas, produces TypeScript types and mock data, and compares schema versions. Its validation results include detailed paths, values, and constraint information.
Key features
- 01Generate schemas from sample JSON
- 02Generate TypeScript types and interfaces
- 03Validate data with detailed errors
- 04Create mock data from schemas
- 05Classify schema differences by compatibility
Use cases
- 01Derive a schema from example data
- 02Create TypeScript definitions for JSON
- 03Diagnose data that fails validation
- 04Review schema changes for compatibility
MCP support
Exposes schema generation, validation, TypeScript generation, mock data generation, and schema comparison tools to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
5Saved tool list · updated 3w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | No | Optional title for the generated schema |
| samples | array | Yes | Array of sample JSON values to infer the schema from. More samples produce a more accurate schema. |
| detect_enums | boolean | No | Whether to detect enum values from string fields across samples (default: true, requires >= 3 samples) |
Details
From the project READMEmcp-schema-tools
MCP server providing schema validation and generation tools for AI agents.
Tools
generate_json_schema
Generate a JSON Schema from sample JSON data. Infers types, required fields, formats (email, date, URI, UUID), and detects enum patterns from multiple examples.
generate_typescript
Generate TypeScript interfaces and types from JSON data or a JSON Schema. Handles nested objects, arrays, optional fields, enums, and union types.
validate_schema
Validate data against a JSON Schema with detailed error messages including JSON path, expected type, actual value, and the violated constraint keyword.
mock_from_schema
Generate realistic mock data from a JSON Schema. Smart field-name detection produces contextual values: email fields get valid emails, name fields get realistic names, phone fields get formatted numbers, etc.
diff_schemas
Compare two JSON Schemas to find added, removed, and changed fields. Identifies type changes, constraint changes, and classifies each difference as breaking or non-breaking for backwards compatibility analysis.
Setup
npm install
npm run build
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"schema-tools": {
"command": "node",
"args": ["path/to/mcp-schema-tools/dist/index.js"]
}
}
}
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.