Servidor MCP

diff-patch-tools

io.github.lazymac2x/diff-patch-tools
Herramientas para desarrolladores Público y accesible MCP 2026-07-28

Qué hace este MCP

Generates, validates, analyzes, applies, and merges unified text and JSON diffs.

apply_patch
Apply a unified diff patch to an original text and return the patched result.
Esquema de entrada
{'type': 'object', 'required': ['original', 'patch'], 'properties': {'patch': {'type': 'string', 'description': 'Unified diff patch string'}, 'original': {'type': 'string', 'description': 'Original text to patch'}}}
diff_stats
Parse a unified diff string and return line-level statistics: additions, deletions, hunks, files changed.
Esquema de entrada
{'type': 'object', 'required': ['diff'], 'properties': {'diff': {'type': 'string', 'description': 'Unified diff string to analyse'}}}
json_diff
Compute a structural diff between two JSON values, showing added, removed, and replaced fields.
Esquema de entrada
{'type': 'object', 'required': ['original', 'modified'], 'properties': {'modified': {'description': 'Modified JSON value (object, array, or JSON string)'}, 'original': {'description': 'Original JSON value (object, array, or JSON string)'}}}
patch_validate
Check whether a unified diff patch can be applied cleanly to an original text without actually applying it.
Esquema de entrada
{'type': 'object', 'required': ['original', 'patch'], 'properties': {'patch': {'type': 'string', 'description': 'Unified diff patch string'}, 'original': {'type': 'string', 'description': 'Original text'}}}
text_diff
Generate a unified diff between two text strings. Ideal for comparing file versions before and after edits.
Esquema de entrada
{'type': 'object', 'required': ['original', 'modified'], 'properties': {'context': {'type': 'number', 'description': 'Context lines around each change (default 3)'}, 'modified': {'type': 'string', 'description': 'Modified text'}, 'original': {'type': 'string', 'description': 'Original text'}, 'modified_file': {'type': 'string', 'description': 'Label for the modified file (default "modified")'}, 'original_file': {'type': 'string', 'description': 'Label for the original file (default "original")'}}}
three_way_merge
Perform a three-way merge of base, ours, and theirs. Conflicts are marked with standard diff3 conflict markers.
Esquema de entrada
{'type': 'object', 'required': ['base', 'ours', 'theirs'], 'properties': {'base': {'type': 'string', 'description': 'Common ancestor text'}, 'ours': {'type': 'string', 'description': 'Our version of the text'}, 'theirs': {'type': 'string', 'description': 'Their version of the text'}, 'ours_label': {'type': 'string', 'description': 'Label for ours in conflict markers (default "ours")'}, 'theirs_label': {'type': 'string', 'description': 'Label for theirs in conflict markers (default "theirs")'}}}
Añadido
patch_validate
17 de September de 2026 a las 12:43
Añadido
diff_stats
17 de September de 2026 a las 12:43
Añadido
three_way_merge
17 de September de 2026 a las 12:43
Añadido
apply_patch
17 de September de 2026 a las 12:43
Añadido
json_diff
17 de September de 2026 a las 12:43
Añadido
text_diff
17 de September de 2026 a las 12:43