Mergetrain
Queue parallel-agent Git worktree branches, test them together and push once
Mergetrain is an MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Platforms
- CLI
- Runs
- Locally
- Version
- 3.7.1
- Listing updated
Similar MCP servers
Install
Run in a terminal
claude mcp add mergetrain -- uvx mergetrainAdd to claude_desktop_config.json
{
"mcpServers": {
"mergetrain": {
"command": "uvx",
"args": [
"mergetrain"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mergetrain": {
"command": "uvx",
"args": [
"mergetrain"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mergetrain": {
"type": "stdio",
"command": "uvx",
"args": [
"mergetrain"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mergetrain": {
"command": "uvx",
"args": [
"mergetrain"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mergetrain": {
"command": "uvx",
"args": [
"mergetrain"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
About Mergetrain
Mergetrain is a local merge queue for several coding agents working in Git worktrees on one repository. Each agent commits and enqueues its branch, and a single runner merges branches in order, runs your configured gates on the combined result, and updates refs atomically only after explicit approval. Everything stays on your machine, with no account, hosted control plane or telemetry.
Two modes exist. Batch, the default, lands whatever is queued together, so passing work can land while a failed branch is repaired. Ordered, available from 3.6.0, lands one submission at a time and keeps original order across a retry. Lease tokens fence stale runners, and the README is candid that they cannot stop an agent with push credentials from bypassing the queue; it recommends separate deploy credentials and a protected branch.
Run uvx mergetrain demo for a throwaway repository walkthrough. It works with Codex, Claude Code and scripts through the same CLI and JSON contract. For PR-first teams, the README points to GitHub Merge Queue or GitLab Merge Trains.
What it does
- Durable local queue
- Branches wait in a queue that survives restarts.
- Combined gates
- Tests run on the merged result, not each branch.
- Batch or ordered
- Pick landing behaviour per workflow.
- Atomic push
- Refs update once after explicit approval.
- Push recovery
- Recovers when a push is interrupted.
- Demo command
- uvx mergetrain demo runs a disposable repo.
Good for
- Land branches from several Claude Code sessions safely
- Catch failures that only appear when branches combine
- Stop push races between agents
- Recover from a laptop dying mid-push
Pricing
Pricing unknown
Licence not published
Mergetrain FAQ
Does Mergetrain need an account?
No account, hosted service, OAuth app or telemetry.
Does Mergetrain block a direct git push?
Not by itself; use separate credentials and a protected branch.
Batch or ordered?
Start with batch; use ordered when original submission order must survive a failure.
When is Mergetrain unnecessary?
When one agent lands one branch at a time or a forge merge queue already covers it.
How do I add Mergetrain to Claude Code?
Run this command in your terminal: claude mcp add mergetrain -- uvx mergetrain
What are the best alternatives to Mergetrain?
The closest alternatives to Mergetrain are Git Tools, Cork, Standup Mr, Quorus and Gitwand.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.