Description

jsondiffpatch is a JavaScript library that compares and patches JSON objects, providing a compact delta format that captures additions, modifications, deletions, and array moves. Created by Benjamin Eidelman, it features smart array diffing using LCS algorithm, multiple output formatters (HTML, console, JSON Patch RFC 6902), and text diffing for long strings. The library includes an MCP server implementation that enables AI assistants to compare text or structured data in various formats (JSON, YAML, TOML, XML) and get readable diffs. Ideal for version control systems, data synchronization, and change visualization in web applications.

Installation

npx -y diff-mcp
npm install diff-mcp
git clone https://github.com/benjamine/jsondiffpatch/tree/HEAD/packages/diff-mcp

Claude Desktop Configuration

Add this configuration to your Claude Desktop config file to enable this MCP server:

Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json

Config file location: %APPDATA%\Claude\claude_desktop_config.json

Config file location: ~/.config/Claude/claude_desktop_config.json

claude_desktop_config.json
{
  "mcpServers": {
    "jsondiffpatch": {
      "command": "npx",
      "args": [
        "-y",
        "diff-mcp"
      ]
    }
  }
}