mcpField
D
diff-mcp

diff-mcp

Local
github.com/MukundaKattaDeveloper Tools0Updated 20w ago

About diff-mcp

diff-mcp is an MCP server for code-review and code-edit agents that creates unified diffs, applies patches, and parses patch files. It reports change counts and whether patch application succeeds.

Key features

  1. 01Generate unified diffs
  2. 02Apply patches and report failures
  3. 03Parse file and hunk details
  4. 04Count additions and deletions

Use cases

  1. 01Create patches for code edits
  2. 02Check whether a patch applies
  3. 03Summarize changes in patch files

MCP support

Exposes diff generation, patch application, and patch parsing tools to MCP clients.

Configuration

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

mcp.json · Universal config
{
"mcpServers": {
"mukundakatta-diff": {
"command": "npx",
"args": [
"-y",
"@mukundakatta/diff-mcp"
]
}
}
}
Run commandnpx -y @mukundakatta/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
npm@mukundakatta/diff-mcp0.1.0

Tools

3

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
contextintegerNoLines of context per hunk.
new_textstringYes
old_textstringYes
new_filenamestringNo
old_filenamestringNo

Details

From the project README

@mukundakatta/diff-mcp

MCP server for character-precise unified diffs + patch application + patch parsing. For code-review and code-edit agents.

Why this exists

LLMs hand-roll diffs that look right but won't apply: off-by-one line numbers, missing context lines, wrong hunk headers. Routing through this server produces patches that the standard patch utility (and git apply) accept on the first try.

Tools

ToolReturns
unified_diff(old_text, new_text, ...)Patch text plus addition / deletion / unchanged line counts
apply_patch(original_text, patch){success, result, reason?} — success:false means context drift
parse_patch(patch)File list with per-file hunk count + addition / deletion totals

Install — Claude Desktop

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

Same shape for Cursor / Cline / Windsurf / Zed.

License

MIT OR Apache-2.0.

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.