Skip to main content
MCP server CX Codex

Mergetrain — Claude Code MCP server: what it does, how to install

A local integration queue for parallel agents in Git worktrees. It runs gate checks on combined branch updates before atomic pushes.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mergetrain -- uvx mergetrain
Open on GitHub

What Mergetrain does

Git worktrees allow multiple agents to modify a project simultaneously, yet coordinating their final landings remains difficult. Mergetrain organizes finished branches into a local queue, merges them inside an isolated integration tree, and executes verification gates against the combined output.

The runner defaults to batch execution. Healthy branch submissions land together while any failing branch returns to its author for corrections. Starting with version 3.6.0, an optional ordered setup processes submissions individually to preserve precise arrival order across retries.

All state and queue artifacts stay entirely on your local machine. Git references update strictly upon explicit operator approval, preventing unattended pushes to upstream remotes.

What it helps with

  • prevent race conditions during simultaneous Git pushes
  • validate combined branch changes in an isolated worktree
  • ship passing patches while isolating broken tasks for repairs
  • coordinate commits across multiple agent worktrees locally

Example prompts for the agent

  • Enqueue the current worktree branch into Mergetrain
  • Check the integration queue status across active branches
  • Run verification gates on the joined branch batch before pushing

How to install Mergetrain

Platform CLI

claude mcp add mergetrain -- uvx mergetrain

uvx runs the command named after the package; if the README names another one, use uvx --from mergetrain <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Mergetrain

How to install Mergetrain in Claude Code?

Run claude mcp add mergetrain -- uvx mergetrain in your terminal. You must have uv installed locally to execute the server package.

What does Mergetrain do?

It manages a local merge queue for concurrent coding agents. The server combines worktree branches, tests the integrated code locally, and pushes updates atomically once confirmed.

How does batch mode differ from ordered mode?

Batch mode aggregates available submissions together so passing tasks land while failed ones get fixed. Ordered mode inspects each change individually in strict arrival sequence, pausing later landings until prior issues resolve.

Similar MCP servers

All MCP servers for Git and GitHub →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor