schema-tools
mcp-schema-tools
AIエージェント向けにスキーマ検証・生成ツールを提供するMCPサーバー。
ツール
generate_json_schema
サンプルJSONデータからJSON Schemaを生成します。型、必須フィールド、形式(email、date、URI、UUID)を推論し、複数の例からenumパターンを検出します。
generate_typescript
JSONデータまたはJSON SchemaからTypeScriptのインターフェースと型を生成します。ネストされたオブジェクト、配列、オプションフィールド、enum、ユニオン型を処理します。
validate_schema
JSON Schemaに対してデータを検証し、JSONパス、期待される型、実際の値、違反した制約キーワードを含む詳細なエラーメッセージを提供します。
mock_from_schema
JSON Schemaから現実的なモックデータを生成します。スマートなフィールド名検出により文脈に応じた値を生成します。emailフィールドには有効なメールアドレス、nameフィールドには現実的な名前、phoneフィールドには整形された番号などが生成されます。
diff_schemas
2つのJSON Schemaを比較して、追加・削除・変更されたフィールドを特定します。型の変更、制約の変更を識別し、後方互換性の分析のために各差分を破壊的変更か非破壊的変更かに分類します。
Related MCP server: apitype
セットアップ
npm install
npm run buildClaude Desktopでの使用方法
claude_desktop_config.json に追加します:
{
"mcpServers": {
"schema-tools": {
"command": "node",
"args": ["path/to/mcp-schema-tools/dist/index.js"]
}
}
}ライセンス
MIT
Available Tools
5 toolsdiff_schemasA
Compare two JSON Schemas and identify all differences: added/removed/changed fields, type changes, constraint changes (min/max, patterns, enums). Classifies each change as breaking or non-breaking for backwards compatibility analysis.
Inputs: new_schema (required), old_schema (required).
generate_json_schemaA
Generate a JSON Schema from one or more sample JSON values. Infers types, required fields, formats (email, date, URI, UUID), and detects enum patterns from multiple examples.
Inputs: samples (required), title, detect_enums.
generate_typescriptA
Generate TypeScript interfaces and types from JSON data or a JSON Schema. Handles nested objects, arrays, optional fields, enums, union types, and Record types.
Inputs: json, schema, root_name.
mock_from_schemaA
Generate realistic mock data from a JSON Schema. Uses smart field-name detection to produce contextual values: email fields get valid emails, name fields get realistic names, dates get ISO strings, etc. Supports all JSON Schema types and constraints.
Inputs: schema (required), seed, count.
validate_schemaA
Validate data against a JSON Schema. Returns detailed error messages with JSON path, expected type, actual value, and the violated keyword (type, required, format, pattern, minimum, etc.).
Inputs: data (required), schema (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: generation from data, generation from schema, validation, mocking, and diffing. No overlap or ambiguity between tool responsibilities, so an agent should reliably select the correct tool for a given task.
All tool names follow a consistent verb_noun pattern (generate_, validate_, mock_, diff_). The verbs are specific and descriptive, and the noun consistently refers to the primary artifact (schema or types). No mixed conventions or vague naming.
With exactly 5 tools covering the core schema lifecycle, the count is tight and focused. Each tool earns its place, and the number is within the ideal range for a utility server without being overly minimal or bloated.
The set covers the major schema operations: creating schemas from data, generating types for coding, validating data, generating mocks, and comparing schemas for evolution. Together they form a coherent, end-to-end toolkit with no obvious dead ends or missing critical operations.
Related MCP Connectors
Validate OpenAPI and JSON Schema, convert specs, curl to code, JSONPath, and free test data.
Convert, lint and generate LLM tool schemas for OpenAI, Anthropic, Gemini and MCP
Convert JSON samples into TypeScript interfaces and Zod schemas, with inference caveats.
Model, map and validate data schemas. Export JSON Schema, JSON-LD, LinkML, OWL, ShEx, SQL, Avro.
Related MCP Servers
- AlicenseAqualityDmaintenanceDetects schema mismatches between data producers and consumers through static analysis, supporting extraction, comparison, code generation, and automated validation with watch mode for MCP tools, APIs, and service contracts.1121 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to generate TypeScript types, Zod schemas, TypeBox, and JSON Schema from any API endpoint or JSON.2 npmMIT
- AlicenseAqualityCmaintenanceEnables schema conversion from SQL/Prisma/JSON to Zod, TypeScript, and Pydantic, and generates realistic synthetic mock data.3MIT
- AlicenseAqualityCmaintenanceEnables validating JSON/JSONC, getting/setting values with jq-like paths, pretty-printing or minifying, validating against Ajv JSON Schema, and diffing local files or inline strings without network calls.8MIT