patch-mcp

v1.0.1
io.github.mrfentmen/patch-mcp Checked 1 day ago Published 1 month ago

Create, check and apply unified diffs offline, with no shell and no repository needed

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

make_patch

Produce a unified diff between two texts with configurable context lines.

ParameterTypeDescription
after *stringChanged text
before *stringOriginal text
contextintegerContext lines per hunk, default 3
newPathstringLabel for the new file, default b
oldPathstringLabel for the old file, default a

apply_patch

Apply a unified diff to text; fails with a precise message when a hunk does not match.

ParameterTypeDescription
patch *stringUnified diff
text *stringText to patch
reversebooleanApply the patch in reverse, undoing it

check_patch

Dry-run a unified diff against text and report whether it applies cleanly.

ParameterTypeDescription
patch *stringUnified diff
text *stringText to test against