# JSON Schema Toolkit

> JSON Schema Toolkit is an open-source MCP server for developer tools. Command-line JSON Schema validation, lint, diff, bundling and codegen, also as MCP server. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows
- **Repository:** https://github.com/samdidos/vscode-json-schema-preview/tree/HEAD/cli
- **MCP Registry name:** io.github.samdidos/json-schema-toolkit
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Runs the validation and schema engine behind a popular VS Code JSON Schema extension from a terminal, so the same checks can run in CI pipelines, pre-commit hooks or scripts. Commands cover validating JSON, JSONC, JSONL, YAML and TOML data against a schema, linting schema quality, and comparing two schema versions with a compatibility verdict that can fail a build.

Beyond checks, it bundles multi-file schemas into a single document, migrates schemas between drafts such as draft-07 and 2020-12, infers a schema from sample data, generates sample instances, and produces typed source code for several languages. Output can be switched to JSON for machine parsing, and exit codes are stable for scripting.

The package can also run as a Model Context Protocol server over stdio, letting AI assistants call the same schema tools. It suits backend and API teams that maintain schemas and want them checked automatically rather than by hand.

## Features

- **Schema validation for many formats:** Checks JSON, JSONC, JSONL, YAML and TOML files against a draft-aware schema.
- **Compatibility-gated schema diff:** Classifies changes between two schema versions and can fail a build on breaking changes.
- **Schema linting:** Flags missing descriptions, unknown keywords and duplicate enum values.
- **Bundling and draft migration:** Merges external references into one schema and converts between JSON Schema drafts.
- **Type and sample generation:** Emits typed source in ten languages and creates valid sample instances from a schema.
- **Stdio MCP server mode:** Exposes the same schema tools to MCP-compatible AI clients over stdio.

## Good for

- Failing a CI build when an API schema change breaks backward compatibility
- Validating a directory of configuration files against their inline schema bindings
- Generating TypeScript, Go or other typed models from a JSON Schema
- Bundling a multi-file schema into one document before publishing
- Giving an AI assistant access to schema validation and diff tools

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add json-schema-toolkit -- npx -y json-schema-toolkit
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add json-schema-toolkit -- npx -y json-schema-toolkit
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.json-schema-toolkit]
command = "npx"
args = ["-y", "json-schema-toolkit"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user json-schema-toolkit npx -- -y json-schema-toolkit

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "json-schema-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "json-schema-toolkit"
      ]
    }
  }
}
```

## FAQ

### How do I install JSON Schema Toolkit?

Install globally with npm install -g json-schema-toolkit, then run jstk --help, or run it without installing via npx json-schema-toolkit --help.

### Does JSON Schema Toolkit work with YAML and TOML?

Yes, the validate command accepts JSON, JSONC, JSONL, YAML and TOML data files.

### What do the diff exit codes mean?

Exit code 1 signals a failed compatibility check, and 2 means compatibility is unknown when run with --check --strict.

### How do I use JSON Schema Toolkit as an MCP server?

Add a server entry with command npx and arguments -y json-schema-toolkit mcp to your MCP client configuration.

### Is JSON Schema Toolkit free?

Yes. JSON Schema Toolkit is open source, so you can use and self-host it for free.

### How do I add JSON Schema Toolkit to Claude Code?

Run this command in your terminal: claude mcp add json-schema-toolkit -- npx -y json-schema-toolkit

### What are the best alternatives to JSON Schema Toolkit?

The closest alternatives to JSON Schema Toolkit are Schema, schema-mcp, Json, JSON Schema Tools and Schema Validate.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Schema](https://ai-powered.com/mcp/schema-2): Schema is an open-source MCP server for developer tools.
- [schema-mcp](https://ai-powered.com/mcp/schema-mcp): schema-mcp is an open-source MCP server for developer tools.
- [Json](https://ai-powered.com/mcp/json-2): Json is an open-source MCP server for developer tools.
- [JSON Schema Tools](https://ai-powered.com/mcp/json-schema-tools): JSON Schema Tools is an open-source MCP server for developer tools.
- [Schema Validate](https://ai-powered.com/mcp/schema-validate): Schema Validate is an MCP server for developer tools.
- [mcp-lint](https://ai-powered.com/mcp/mcp-lint): mcp-lint is an open-source MCP server for developer tools.
- [Jig](https://ai-powered.com/mcp/jig): Jig is a free MCP server for developer tools.
- [Structured Data Validator](https://ai-powered.com/mcp/structured-data-validator): Structured Data Validator is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/json-schema-toolkit
