
JSON Schema Tools
io.github.basitalisandhuv0.1.1Updated Oct 5, 2026
Validate JSON against a schema with Ajv, infer a schema from samples and diff two schemas.
Overview
Lets an assistant validate JSON against a JSON Schema, infer a schema from sample documents, and diff two schemas.
- What it does
- Exposes three tools. validate_json checks a document against a schema in drafts 07, 2019-09 or 2020-12 using Ajv, returning validity, the draft used, an error count and up to 200 errors with JSON Pointer paths, schema paths, keywords and messages, including format checks such as email, uri, date-time and uuid. infer_schema builds a draft 2020-12 schema from sample documents, unioning types, marking required keys, and handling nested objects, array items, string formats and optional enums. diff_schemas compares two schemas and reports each change with a breaking, compatible or review impact from the point of view of documents valid under the earlier schema.
- When to use it
- Useful when working with JSON Schema definitions or JSON payloads: checking that data matches a contract, generating a starting schema from real samples, or reviewing whether a schema change would break existing documents. It fits editor-side work on API contracts, config files and test fixtures.
- Requirements
- Runs locally over stdio as an npm package (npx) or a Docker image; no account, API key or environment variable is declared. Node.js is needed for the npm route. Schemas and documents are passed as JSON values or strings, capped at 2 MB.
Installation
In SourceWeft
- Open JSON Schema Tools in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
json-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
Install
Claude Code:
Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):
Pin the version as shown so that an update to the package cannot change what runs in your editor without you noticing. 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
Tests use node:test and the SDK's in-memory transport; they do not reach the network.
Licence
MIT. See LICENSE.
Source: packages/json-schema-tools/README.md at commit 58c8c95
Tools
0Version history
1- v0.1.1LatestOct 5, 2026


