patch-mcp
v1.0.1Create, 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.
| Parameter | Type | Description |
|---|---|---|
after * | string | Changed text |
before * | string | Original text |
context | integer | Context lines per hunk, default 3 |
newPath | string | Label for the new file, default b |
oldPath | string | Label 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.
| Parameter | Type | Description |
|---|---|---|
patch * | string | Unified diff |
text * | string | Text to patch |
reverse | boolean | Apply the patch in reverse, undoing it |
check_patch
Dry-run a unified diff against text and report whether it applies cleanly.
| Parameter | Type | Description |
|---|---|---|
patch * | string | Unified diff |
text * | string | Text to test against |