mcpField
D
Diff

Diff

Local
github.com/benjamineVersion Control5.4kUpdated 24w ago

About Diff

Diff is an MCP server for comparing text and structured data, aimed at clients that need readable change reports. It accepts several data formats and can return diffs as text, JSON, or JSON Patch.

Key features

  1. 01Compare text with text diff
  2. 02Compare JSON, JSON5, YAML, TOML, XML, and HTML
  3. 03Choose input formats independently
  4. 04Output text, JSON, or JSON Patch

Use cases

  1. 01Reviewing changes between text versions
  2. 02Comparing structured data files
  3. 03Generating a JSON Patch from two inputs

MCP support

The MCP server exposes a `diff` tool that accepts left and right text or data, with optional input and output formats. MCP clients can request readable differences in text, JSON, or JSON Patch.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"diff": {
"command": "npx",
"args": [
"-y",
"diff-mcp"
]
}
}
}
Run commandnpx -y diff-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmdiff-mcp

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
leftanyYesThe left side of the diff.
leftFormatenumNoformat of left side of the difftext | json | json5 | yaml | toml | xml | html
rightanyYesThe right side of the diff (to compare with the left side).
rightFormatenumNoformat of right side of the difftext | json | json5 | yaml | toml | xml | html
outputFormatenumNoThe output format. text: (default) human readable text diff, json: a compact json diff (jsondiffpatch delta format), jsonpatch: json patch diff (RFC 6902)text | json | jsonpatch

Details

From the project README

jsondiffpatch logo

diff-mcp

jsondiffpatch.com
MCP Server to compare text or data and get a diff

JsonDiffPatch CI status Created by Benjamin Eidelman License npm stars


powered by jsondiffpatch

Features

  • compare text (using text diff powered by google-diff-match-patch )
  • compare data (json, json5, yaml, toml, xml, html) and get a readable diff in multiple output formats (text, json, jsonpatch)

Tool

diff

compare text or data and get a readable diff.

Inputs:

  • left (string | unknown[] | Record<string, unknown>): left text or data
  • leftFormat (string, optional): text, json, json5 (default), yaml, toml, xml, html
  • right (string | unknown[] | Record<string, unknown>): right text or data (to compare with left)
  • rightFormat (string, optional): text, json, json5 (default), yaml, toml, xml, html
  • outputFormat (string, optional): text (default), json, jsonpatch

Setup

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "diff": {
      "command": "npx",
      "args": [
        "-y",
        "diff-mcp"
      ]
    }
  }
}

All contributors ✨

A table of avatars from the project's contributors

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.