JSON Schema Tools
LocalAbout JSON Schema Tools
JSON Schema Tools is an MCP server for developers validating JSON and working with schemas. It supports several schema drafts, sample-based schema inference and change-by-change compatibility assessments.
Key features
- 01Validate JSON with Ajv
- 02Support drafts 07, 2019-09 and 2020-12
- 03Infer schemas from sample documents
- 04Diff schemas with compatibility impact
Use cases
- 01Check JSON documents against schemas
- 02Generate an initial schema from examples
- 03Review schema changes for compatibility
MCP support
Exposes `validate_json`, `infer_schema` and `diff_schemas` tools to MCP clients over stdio.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
docker run -i --rm ghcr.io/basitalisandhu/mcp-json-schema-tools:0.3.0Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
ghcr.io/basitalisandhu/mcp-json-schema-tools:0.3.0stdioTools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEjson-schema-tools MCP server
Validates JSON against JSON Schema drafts 07, 2019-09 and 2020-12 with Ajv, infers a schema from sample documents, and diffs two schemas with a compatibility verdict per change.
Part of dev-mcp-servers. Stdio transport only; the server never opens a port.
Tools
| Tool | Input | What it returns |
|---|---|---|
validate_json | schema, data, draft? | valid, draft used, error count and up to 200 errors with JSON Pointer path, schema path, keyword, message and params. Formats (email, uri, date-time, uuid and more) are checked. |
infer_schema | samples (array of documents or a JSON string), enum_threshold?, detect_formats?, title? | A draft 2020-12 schema: types unioned across samples, required for keys present in every sample, nested objects, array items, string formats, optional enums. |
diff_schemas | before, after | Every change with path, before and after values and an impact: breaking, compatible or review, from the point of view of documents valid under before. |
Install
Claude Code:
claude mcp add json-schema-tools -- docker run --rm -i ghcr.io/basitalisandhu/mcp-json-schema-tools:0.2.2
Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):
{
"mcpServers": {
"json-schema-tools": {
"command": "docker",
"args": ["run", "--rm", "-i", "ghcr.io/basitalisandhu/mcp-json-schema-tools:0.2.2"]
}
}
}
Pin the version as shown so that an update cannot change what runs in your editor without you noticing. The package is not on npmjs.com yet, so npx does not work; see the repository README for GitHub Packages npm. From a checkout, use "command": "node", "args": ["<path>/packages/json-schema-tools/dist/index.js"] after npm install && npm run build at the repository root.
What it touches
- Network: None. Remote
$reftargets are not fetched. - Local files: None.
- Telemetry: none.
Notes
- Ajv runs with
strict: falseso real-world schemas with unknown keywords still validate. - Draft-04 and draft-06 schemas are rejected; update
$schemaor remove it. - Schemas and documents can be passed as JSON values or as JSON strings; both are capped at 2 MB.
Build and test
npm install # at the repository root
npm run build -w @basitalisandhu/mcp-json-schema-tools
npm test -w @basitalisandhu/mcp-json-schema-tools
Tests use node:test and the SDK's in-memory transport; they do not reach the network.
Licence
MIT. See LICENSE.
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.