RealJSON
Try now

RealJSON MCP Server

A local Model Context Protocol server that gives AI agents 19 JSON tools. It runs on your machine over stdio — no uploads, no API keys.

Install in one line

You need Node.js 20 or newer. The server is started on demand by your MCP client.

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "realjson": {
      "command": "npx",
      "args": ["-y", "@realjson/mcp-server"]
    }
  }
}

Claude Code:

claude mcp add realjson -- npx -y @realjson/mcp-server

Cursor — add the same block to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):

{
  "mcpServers": {
    "realjson": {
      "command": "npx",
      "args": ["-y", "@realjson/mcp-server"]
    }
  }
}

Pro license — add an env block to the server entry:

{
  "mcpServers": {
    "realjson": {
      "command": "npx",
      "args": ["-y", "@realjson/mcp-server"],
      "env": { "REALJSON_LICENSE": "rj1.…" }
    }
  }
}

Available tools

Every tool is a pure function that works on text you pass in. Nothing touches the network or your files.

  • json_format Pretty-print JSON with a chosen indent (optionally sorting keys).
  • json_minify Strip all whitespace from JSON.
  • json_validate Check whether text is valid JSON. Returns {valid, error?, type?}.
  • json_sort_keys Sort object keys alphabetically (natural order), recursively by default.
  • jsonpath_query Query JSON with a JSONPath expression ($.a.b[*], filters [?(@.x>1)], recursive descent ..). Returns matched values with their paths.
  • json_to_schema Infer a JSON Schema from sample JSON (an array is treated as multiple samples). Set structured_output to get a schema accepted by LLM structured outputs / function calling (OpenAI strict mode, Anthropic, Gemini): object root, additionalProperties false, every property required (missing ones become nullable).
  • json_schema_validate Validate JSON against a JSON Schema; returns every error with its JSON pointer path.
  • json_to_csv Convert a JSON array (or object) to CSV, flattening nested objects to dot.path columns.
  • json_to_xml Convert JSON to well-formed XML (keys starting with @ become attributes).
  • jsonl_convert Convert between a JSON array and JSON Lines (NDJSON). direction "to_jsonl" takes JSON, "to_json" takes JSONL text.
  • json_diff Compare two JSON documents and return RFC 6902-style add/remove/replace operations turning `a` into `b`.
  • json_to_code Generate typed code from JSON: Go structs, Python dataclasses/Pydantic, Java records, Rust serde structs or Zod schemas.
  • json_repair Fix almost-JSON and LLM output: extracts JSON from chat text and ```json fences, closes truncated output, escapes stray quotes and raw newlines, fixes comments, single/curly quotes, unquoted keys, missing/trailing commas, Python True/False/None and NaN/undefined. Returns the repaired JSON and the fixes applied.
  • finetune_validate Validate a fine-tuning dataset (JSON Lines) before uploading it: OpenAI chat (SFT), OpenAI preference (DPO), Anthropic Claude (Amazon Bedrock) or prompt/completion. Returns the detected format, per-line errors and warnings (roles, missing assistant turns, weights, DPO pairs, duplicates, minimum example count) and stats including an approximate token count.
  • json_chaos Inject edge cases (nulls, type swaps, huge strings, unicode, deep nesting) into JSON to test consumers. Pass a seed for reproducible output.
  • jwt_decode Decode a JWT (header, payload, exp/nbf status). Optionally verify an HS256/HS384/HS512 signature with a secret — verification happens locally.
  • json_to_yaml Convert JSON to YAML.
  • xml_to_json Convert XML to JSON (attributes become @name keys, text next to children becomes #text, repeated siblings become arrays).
  • csv_to_json Convert CSV text to a JSON array of objects (or arrays without a header row), with optional type inference.

Free and Pro limits

Free: 256 KB per call and 300 calls per day (reset at local midnight). Pro: 10 MB per call, unlimited calls and the batch tool. Over-limit calls return a normal result that explains the limit, when it resets and how to upgrade; json_validate and json_repair on small inputs always work.

See pricing

Private by design

The server has no network code. Usage is counted in a small file on your disk, and Pro licenses are verified offline with a public key — there is no account, no telemetry and no license server.

WebMCP on realjson.com

In browsers that support WebMCP (navigator.modelContext), realjson.com registers its main tools so an in-browser agent can call them directly. Everything still runs in the page.

Frequently asked questions

What is the RealJSON MCP server?

An open Model Context Protocol server that exposes RealJSON’s formatter, validator, repair, JSONPath, schema, diff and converter functions as tools an AI agent can call.

Is my JSON uploaded anywhere?

No. The server runs locally over stdio and contains no network code, so your data never leaves your machine.

Which clients does it work with?

Any MCP client that can launch a stdio server, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and Zed.

What are the usage limits?

Free allows 256 KB per call and 300 calls per day. Pro allows 10 MB per call with unlimited calls. Small validate and repair calls are never blocked.

What is WebMCP?

WebMCP is a browser API that lets a web page offer tools to in-browser AI agents. RealJSON registers its main tools when the API is available and does nothing otherwise.