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.

VerifiedSTDIODesktop onlyDeveloper ToolsData & Analytics

Overview

AI-generated 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.
Before you install
Read-only analysis: it does not fetch remote $ref targets, touch local files, or send telemetry. Draft-04 and draft-06 schemas are rejected, so update or remove $schema. Pin the package version so an update cannot silently change what runs in your editor.

Installation

In SourceWeft

  1. Open JSON Schema Tools in the dashboard and add it to a workspace.
  2. 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

ToolInputWhat it returns
validate_jsonschema, 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_schemasamples (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_schemasbefore, afterEvery 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:

bash
claude mcp add json-schema-tools -- npx -y @basitalisandhu/[email protected]

Add -s user to make it available in every project. Any client that reads .mcp.json (Claude Code, Claude Desktop, Cursor):

json
{  "mcpServers": {    "json-schema-tools": {      "command": "npx",      "args": ["-y", "@basitalisandhu/[email protected]"]    }  }}

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 $ref targets are not fetched.
  • Local files: None.
  • Telemetry: none.

Notes

  • Ajv runs with strict: false so real-world schemas with unknown keywords still validate.
  • Draft-04 and draft-06 schemas are rejected; update $schema or remove it.
  • Schemas and documents can be passed as JSON values or as JSON strings; both are capped at 2 MB.

Build and test

bash
npm install        # at the repository rootnpm run build -w @basitalisandhu/mcp-json-schema-toolsnpm 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.

Source: packages/json-schema-tools/README.md at commit 58c8c95

Tools

0
Tool metadata has not been indexed yet.

Version history

1
  1. v0.1.1LatestOct 5, 2026