lazymac2x avatar

Diff Patch Tools

lazymac2x/diff-patch-tools-api

A lightweight utility server hosted on Cloudflare Workers that gives Claude diff and patch capabilities over HTTP. It exposes tools for generating unified diffs between text versions and applying patches to content, which is handy when you need Claude to compare file versions, show precise changes, or apply specific modifications without rewriting entire documents. The streamable HTTP transport means you can point Claude at it without running anything locally. Reach for this when you're doing iterative editing work and want to see exact line-by-line changes, or when you need to apply patches programmatically during code reviews or documentation updates.

tools
6
transport
HTTP
last updated
May 16, 2026

Install

From registry metadata
$ npx add-mcp https://api.lazy-mac.com/diff-patch-tools/mcp --name diff-patch-tools

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http diff-patch-tools https://api.lazy-mac.com/diff-patch-tools/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 6 tools

Verified live against the running server on Nov 6, 2026.

text_diffGenerate a unified diff between two text strings. Ideal for comparing file versions before and after edits.5 params

Generate a unified diff between two text strings. Ideal for comparing file versions before and after edits.

Parameters* required
contextnumber
Context lines around each change (default 3)
modified*string
Modified text
modified_filestring
Label for the modified file (default "modified")
original*string
Original text
original_filestring
Label for the original file (default "original")
json_diffCompute a structural diff between two JSON values, showing added, removed, and replaced fields.2 params

Compute a structural diff between two JSON values, showing added, removed, and replaced fields.

Parameters* required
modified*value
Modified JSON value (object, array, or JSON string)
original*value
Original JSON value (object, array, or JSON string)
apply_patchApply a unified diff patch to an original text and return the patched result.2 params

Apply a unified diff patch to an original text and return the patched result.

Parameters* required
original*string
Original text to patch
patch*string
Unified diff patch string
three_way_mergePerform a three-way merge of base, ours, and theirs. Conflicts are marked with standard diff3 conflict markers.5 params

Perform a three-way merge of base, ours, and theirs. Conflicts are marked with standard diff3 conflict markers.

Parameters* required
base*string
Common ancestor text
ours*string
Our version of the text
ours_labelstring
Label for ours in conflict markers (default "ours")
theirs*string
Their version of the text
theirs_labelstring
Label for theirs in conflict markers (default "theirs")
diff_statsParse a unified diff string and return line-level statistics: additions, deletions, hunks, files changed.1 params

Parse a unified diff string and return line-level statistics: additions, deletions, hunks, files changed.

Parameters* required
diff*string
Unified diff string to analyse
patch_validateCheck whether a unified diff patch can be applied cleanly to an original text without actually applying it.2 params

Check whether a unified diff patch can be applied cleanly to an original text without actually applying it.

Parameters* required
original*string
Original text
patch*string
Unified diff patch string

Sponsors

Readme

diff-patch-tools-api

Cloudflare Workers MCP server: diff-patch-tools. REST + MCP (JSON-RPC 2.0). Live: api.lazy-mac.com/diff-patch-tools

Details

Repository
github.com/lazymac2x/diff-patch-tools-api
Category
Cloud & Infrastructure
Transport
HTTP
Registry
MCP registry, active
Tools verified
Nov 6, 2026

More from lazymac2x

Related Cloud & Infrastructure MCP servers

View all
1lazymac2x avatarDomain Intellazymac2x/domain-intel-apiCloudflare Workers MCP server: domain-intel0stars
2lazymac2x avatarEmail Validatorlazymac2x/email-validator-apiCloudflare Workers MCP server: email-validator0stars
3lazymac2x avatarEmbedding Searchlazymac2x/embedding-search-apiCloudflare Workers MCP server: embedding-search0stars
4lazymac2x avatarEnv Blueprint Validatorlazymac2x/env-blueprint-validator-apiCloudflare Workers MCP server: env-blueprint-validator0stars
5lazymac2x avatarFont Metadatalazymac2x/font-metadata-apiCloudflare Workers MCP server: font-metadata0stars
6lazymac2x avatarGovdata Korealazymac2x/govdata-korea-apiCloudflare Workers MCP server: govdata-korea0stars