mcpField
S
schema

schema

Local
github.com/rog0xDeveloper Tools0Updated 32w ago

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

  1. 01Generate schemas from sample JSON
  2. 02Generate TypeScript types and interfaces
  3. 03Validate data with detailed errors
  4. 04Create mock data from schemas
  5. 05Classify schema differences by compatibility

Use cases

  1. 01Derive a schema from example data
  2. 02Create TypeScript definitions for JSON
  3. 03Diagnose data that fails validation
  4. 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.

mcp.json · Universal config
{
"mcpServers": {
"rog0x-schema": {
"command": "npx",
"args": [
"-y",
"@rog0x/mcp-schema-tools"
]
}
}
}
Run commandnpx -y @rog0x/mcp-schema-tools

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@rog0x/mcp-schema-tools1.0.1

Tools

5

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
titlestringNoOptional title for the generated schema
samplesarrayYesArray of sample JSON values to infer the schema from. More samples produce a more accurate schema.
detect_enumsbooleanNoWhether to detect enum values from string fields across samples (default: true, requires >= 3 samples)

Details

From the project README

mcp-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

Markdown supported

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.