MCP 서버

diff-patch-tools

io.github.lazymac2x/diff-patch-tools
개발자 도구 공개 · 연결 가능 MCP 2026-07-28

이 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.
입력 스키마
{'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.
입력 스키마
{'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.
입력 스키마
{'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.
입력 스키마
{'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.
입력 스키마
{'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.
입력 스키마
{'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")'}}}
추가됨
patch_validate
2026년 9월 17일 12:43 PM
추가됨
diff_stats
2026년 9월 17일 12:43 PM
추가됨
three_way_merge
2026년 9월 17일 12:43 PM
추가됨
apply_patch
2026년 9월 17일 12:43 PM
추가됨
json_diff
2026년 9월 17일 12:43 PM
추가됨
text_diff
2026년 9월 17일 12:43 PM