Skip to main content
Glama
mattyatea

Git Conflict MCP

by mattyatea
README.md
# 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.

## Usage

### via npx

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

```bash
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:

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

Or manually edit `claude_desktop_config.json`:

```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:

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

### JSON Type (Generic)

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

## Development

To install dependencies:

```bash
npm install
```

To build (includes both Core and WebUI):

```bash
npm run build
```

To run locally:

```bash
npm start
```

To run WebUI in development mode:

```bash
npm run dev:webui
```

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

ActivityInactive
ResponsivenessNo issues