Skip to main content
Glama
Git Conflict MCP

Git Conflict MCP

by mattyatea

git-conflict-mcp

A powerful Model Context Protocol (MCP) server designed to help AI agents and developers resolve Git merge conflicts efficiently. It includes a built-in visual WebUI for interactive conflict resolution.

Features

  • MCP Tools: Full suite of tools for agents to detect, read, and resolve git conflicts.

  • Visual WebUI: A dedicated web interface (default: http://localhost:3456) for human-in-the-loop resolution.

    • Syntax Highlighting: Read code clearly with automatic language detection.

    • Diff View: See changes clearly with intelligent diff display.

    • Editable Interface: Directly edit conflicting files in the browser.

    • IDE Integration: One-click opening of files in your preferred editor (VSCode, WebStorm, Cursor, etc.).

  • Smart Port Management: Automatically detects if the WebUI is already running and reuses the instance to avoid conflicts.

  • Conflict Tracking: Keeps track of resolution status and rejection reasons.

Related MCP server: @rethunk/mcp-multi-root-git

Usage

via npx

You can run the server directly using npx. This requires no manual installation if you have Node.js installed.

npx -y git-conflict-mcp

The WebUI will start automatically. You can access it at: http://localhost:3456

MCP Configuration

Claude Desktop

You can add the server using the claude CLI:

claude mcp add git-conflict-mcp -- npx -y git-conflict-mcp

Or manually edit claude_desktop_config.json:

{
  "mcpServers": {
    "git-conflict-mcp": {
      "command": "npx",
      "args": ["-y", "git-conflict-mcp"],
      "env": {
        "WEBUI_PORT": "3456"
      }
    }
  }
}

Codex

You can add the server using the codex CLI:

codex mcp add git-conflict-mcp -- npx -y git-conflict-mcp

JSON Type (Generic)

{
  "mcpServers": {
    "git-conflict-mcp": {
      "command": "npx",
      "args": ["-y", "git-conflict-mcp"]
    }
  }
}

Development

To install dependencies:

npm install

To build (includes both Core and WebUI):

npm run build

To run locally:

npm start

To run WebUI in development mode:

npm run dev:webui

Available Tools

5 tools
init_projectA

Initialize the project by setting the root directory path. This must be the first tool called to set up the environment.

Inputs: path (required).

list_conflictsA

List files with git conflicts including conflict types. Returns a map of ID to file info with conflict type and suggested resolution. (Rate limit: 2 calls per minute). IMPORTANT: You must run init_project before using this tool.

Inputs: page, extension, path, showTypes.

post_resolveA

Execute this tool BEFORE running resolve_conflict to confirm the resolution process. This acts as a safety confirmation step.

Inputs: no named parameters.

read_conflictA

Read the content of a conflicted file by its ID. (Rate limit: 5 calls per minute). You must use list_conflicts to get the ID first.

Inputs: id (required).

resolve_conflictA

Request conflict resolution by its ID or file path. The actual resolution will be performed by a human through the WebUI. Supports different resolution types for various conflict scenarios (content conflicts, delete/modify conflicts, etc.). You must run post_resolve before running this tool.

Inputs: id, path, type, reason, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: init_project sets up the environment, list_conflicts enumerates conflicts, read_conflict reads file content, post_resolve confirms resolution, and resolve_conflict requests resolution. The descriptions clearly differentiate their roles, eliminating any ambiguity.

    Naming Consistency4/5

    The tools follow a consistent verb_noun pattern (e.g., init_project, list_conflicts, read_conflict, resolve_conflict), which is predictable and readable. The minor deviation is post_resolve, which uses 'post' as a prefix instead of a verb, but it still fits the overall naming style without causing confusion.

    Tool Count5/5

    With 5 tools, the count is well-scoped for a Git conflict resolution server. Each tool earns its place by covering essential steps: initialization, listing, reading, confirming, and resolving conflicts, without being overly sparse or bloated.

    Completeness4/5

    The tool set provides complete coverage for the core Git conflict resolution workflow, including setup, inspection, and resolution steps. A minor gap is the lack of a tool to directly modify or apply resolutions programmatically, as resolve_conflict relies on human intervention via WebUI, but agents can still navigate the process effectively.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      MCP server that detects semantic (non-textual) merge conflicts between Git branches using AST-level analysis. Catches incompatible changes that Git merges cleanly — signature changes, removed exports, parameter changes, interface breaks, and cross-file dependency conflicts.
      4
      45 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      an MCP server that auto-resolves Git merge conflicts so agents only touch the complex hunks — deterministic pattern engine with confidence scores and a full decision trace, plus merge/rebase preview and hunk-level resolution tools
      199
      MIT