Merge conflict parser MCP tool. Reads files with git conflict markers (<<<<<<< / ======= / >>>>>>>) and outputs structured JSON with each conflict's ours/theirs content, line numbers, branch refs, and surrounding context.
Supports standard and diff3 (|||||||) conflict styles.
go build -o conflicts
codesign -s - conflicts
sudo cp conflicts /usr/local/bin/Or with just:
just installconflicts --cli --file path/to/conflicted.txt
conflicts --cli --file file1.go,file2.go --context 3Add to your Claude config:
{
"mcpServers": {
"conflicts": {
"command": "conflicts"
}
}
}{
"files": [
{
"file": "path/to/file.go",
"conflicts": [
{
"file": "path/to/file.go",
"line": 10,
"end_line": 16,
"ours_ref": "HEAD",
"theirs_ref": "feature-branch",
"ours": "our version of the code",
"theirs": "their version of the code",
"context_above": "line before conflict",
"context_below": "line after conflict"
}
],
"count": 1
}
],
"total": 1,
"has_diff3": false,
"summary": "Found 1 conflict in 1 file"
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file |
string/array | yes | - | File path(s) to parse |
context_lines |
int | no | 1 | Context lines above/below each conflict |
MIT