Sign In

@gitwand/mcp

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gitwand/mcp

GitWand MCP server — smart Git conflict resolution for AI agents (Claude, Cursor, Windsurf, Claude Code)

Source
npmnpm
Version
1.10.0
Version published
Weekly downloads
953
47.52%
Maintainers
1
Weekly downloads
 
Created
Source

@gitwand/mcp

npm MCP Registry License

MCP server that lets AI agents resolve Git merge conflicts automatically.

GitWand exposes its conflict resolution engine as a Model Context Protocol server. Plug it into Claude Desktop, Claude Code, Cursor, Windsurf, or any MCP-compatible client and the agent can inspect, preview, and resolve conflicts in your repos without you opening a single conflict marker.

Install

No install step — run it via npx:

npx -y @gitwand/mcp --cwd /path/to/your/repo

Or add it to your MCP client config (examples below).

Configure

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "gitwand": {
      "command": "npx",
      "args": ["-y", "@gitwand/mcp"]
    }
  }
}

The server defaults to the current working directory. To pin it to a specific repo, add "--cwd", "/absolute/path/to/repo" to the args array.

Claude Code

claude mcp add gitwand -- npx -y @gitwand/mcp

Cursor / Windsurf

Same config shape as Claude Desktop — drop it into the mcpServers block of your client's config file.

What the agent can do

Five tools are exposed:

ToolWhat it does
gitwand_statusList conflicted files with counts and auto-resolvability score
gitwand_preview_mergeDry-run: return stats and a risk assessment without writing
gitwand_resolve_conflictsAuto-resolve trivial conflicts, return resolutions + pending hunks
gitwand_explain_hunkFull decision trace for one hunk (ours / theirs / base / reasoning)
gitwand_apply_resolutionApply an agent-provided resolution to a specific complex hunk

Plus three resources (gitwand://repo/conflicts, gitwand://repo/policy, gitwand://hunk/{file}/{line}) for ambient context.

How it works — the collaboration loop

GitWand handles the trivial conflicts (whitespace, same-change, non-overlapping inserts, value updates, generated files…). The agent handles the complex ones.

  • Agent calls gitwand_preview_merge → sees risk level + how many conflicts GitWand can handle alone.
  • Agent calls gitwand_resolve_conflicts → GitWand resolves the easy hunks and returns pendingHunks for the rest.
  • For each pending hunk, the agent reads ours/theirs/base from the response and decides.
  • Agent calls gitwand_apply_resolution with its chosen content — the file is written.

Resolution patterns

GitWand only auto-resolves when it's certain. The engine tags each hunk with a pattern and a composite confidence score (0–100):

  • same_change — identical edit on both sides (certain)
  • one_side_change — only one branch touched the block (certain)
  • non_overlapping — additions in different locations (high)
  • whitespace_only — same logic, different indentation (high)
  • reorder_only — pure permutation (high)
  • insertion_at_boundary — pure insertions, base intact (high)
  • value_only_change — scalar updated on one side (medium)
  • generated_file — path matches a known generated-file pattern (high)
  • complex — overlapping edits — never auto-resolved

Format-aware resolvers (JSON, Markdown, YAML, Vue SFC, lockfiles) kick in before pure text matching.

Configuration

Drop a .gitwandrc at the repo root to tune policies:

{
  "policy": "prefer-merge",
  "patternOverrides": {
    "*.lock": "prefer-theirs",
    "CHANGELOG.md": "prefer-ours"
  },
  "generatedFiles": ["src/generated/**", "**/*.pb.ts"]
}

Policies: prefer-ours, prefer-theirs, prefer-safety, prefer-merge, strict.

Also available

  • @gitwand/cli — same engine, command-line interface for terminals and CI pipelines.
  • GitWand desktop app — full Git client with built-in resolution, merge preview, and inline code review.

Keywords

mcp

FAQs

Package last updated on 24 Apr 2026

Related posts