Compare JSON
@unitstack
About Compare JSON
A lightweight, dependency-free MCP for deep comparison of JSON values. Detects additions, deletions, type changes, and value changes between two JSON structures with fine-grained control over comparison behavior.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"compare-json": {
"command": "npx",
"args": [
"@compare-json/cli@latest",
"--mcp"
]
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is Compare JSON?
Compare JSON is an MCP server that exposes a JSON comparison engine as a tool for AI assistants, enabling them to compare two JSON values and retrieve detailed, structured differences.
How to use Compare JSON?
Start the server by running compare-json --mcp from a global install or npx @compare-json/cli --mcp. It communicates over stdio. Add the provided configuration to your MCP client (e.g., mcp.json) to register the compare-json server.
Key features of Compare JSON
compare_jsontool with multiple input options (raw, string, file path).- Configurable array comparison:
byIndex,lcs, orunordered. - Case‑insensitive key and value comparison toggles.
- Numeric‑string equals number comparison option.
- Returns an array of
JSONValueDifferenceobjects with path and diff type.
Use cases of Compare JSON
- AI assistants comparing two JSON configurations or API payloads.
- Detecting differences between expected and actual JSON responses.
- Validating JSON data changes across versions or environments.
FAQ from Compare JSON
What output does the compare_json tool return?
It returns an array of JSONValueDifference objects, each containing pathSegments, pathString, pathBelongsTo, and diffType. The same data is also echoed as JSON text in content[0].text.
How can I provide the JSON values to compare?
For each side (base and contrast) you can provide the JSON as an already‑parsed value (baseJSON, contrastJSON), as a stringified value (baseJSONString, contrastJSONString), or as a file path (baseJSONFilePath, contrastJSONFilePath). At least one method per side is required; if multiple are given, file path takes precedence, then string, then raw value.
What array comparison strategies are available?
Three strategies: byIndex (default), lcs (longest common subsequence), and unordered. They are set via the arrayCompareMethod option.
Does Compare JSON support case‑insensitive comparison?
Yes. The keyCaseInsensitive and valueCaseInsensitive options (both default false) make key and value comparisons case‑insensitive.
How do I start and configure the MCP server?
Run compare-json --mcp or npx @compare-json/cli --mcp. In your MCP client config, add a server entry with command npx and args ["@compare-json/cli@latest", "--mcp"]. The server communicates over stdio with no additional transport or auth setup required.
Frequently asked questions
What output does the `compare_json` tool return?
It returns an array of `JSONValueDifference` objects, each containing `pathSegments`, `pathString`, `pathBelongsTo`, and `diffType`. The same data is also echoed as JSON text in `content[0].text`.
How can I provide the JSON values to compare?
For each side (base and contrast) you can provide the JSON as an already‑parsed value (`baseJSON`, `contrastJSON`), as a stringified value (`baseJSONString`, `contrastJSONString`), or as a file path (`baseJSONFilePath`, `contrastJSONFilePath`). At least one method per side is required; if multiple are given, file path takes precedence, then string, then raw value.
What array comparison strategies are available?
Three strategies: `byIndex` (default), `lcs` (longest common subsequence), and `unordered`. They are set via the `arrayCompareMethod` option.
Does Compare JSON support case‑insensitive comparison?
Yes. The `keyCaseInsensitive` and `valueCaseInsensitive` options (both default `false`) make key and value comparisons case‑insensitive.
How do I start and configure the MCP server?
Run `compare-json --mcp` or `npx @compare-json/cli --mcp`. In your MCP client config, add a server entry with command `npx` and args `["@compare-json/cli@latest", "--mcp"]`. The server communicates over stdio with no additional transport or auth setup required.
Basic information
More Developer Tools MCP servers
Vibgrate MCP
VibgrateQuery your team's drift, vulnerability, and migration data from any AI assistant. Vibgrate MCP connects Cursor, Claude, ChatGPT, Windsurf, or VS Code to Vibgrate Cloud: 51 tools for DriftScores, CVEs and EOL runtimes, up
TalkToFigma
sonnylazuardiTalkToFigma: MCP integration between AI Agent (Cursor, Claude Code, Codex) and Figma, allowing Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
MCP Unity Editor (Game Engine)
CoderGamesterModel Context Protocol (MCP) plugin to connect with Unity Editor — designed for Cursor, Claude Code, Codex, Windsurf and other IDEs

BetterBugs
BetterBugsThe BetterBugs MCP (Model Context Protocol) enables you to load BetterBugs bug reports (via report links) directly to your preferred AI Agents and developer environments with MCP Client capabilities (such as Cursor, VS C

Reelier
Maxime HouleAgents make claims. Reelier writes receipts — record an agent's tool-call workflow once, replay it deterministically at 0 tokens, and diff runs to catch drift.
Comments