Implements a voting pattern for parallel development using git worktrees, allowing users to create multiple implementations of the same task across different branches, evaluate them, and select the best one for merging
MCP Git Worktree Workflows
An MCP (Model Context Protocol) server that implements automated parallel development using git worktrees.
🚀 Key Features
Voting Workflow: Intelligently ranks and selects the highest-quality implementation
Ad Hoc Workflow: Quick single-worktree creation for simple tasks
Orchestration Workflow: Break complex tasks into subtasks with coordinated execution
Clean Workflow: Automatic cleanup of unsuccessful variants
Installation
Install dependencies:
Add the server to Claude Code:
Option A: Using Claude Code CLI (Recommended)
Option B: Manual Configuration
Add to your MCP configuration file:
Restart Claude Code or use
/mcp
command to reconnect
🔄 Workflow Options
1. Voting Pattern (Multiple Implementations)
2. Ad Hoc Single Worktree
3. Orchestrated Subtasks
📊 Evaluation Metrics
The system automatically evaluates implementations using:
Code Changes (30 points): Has meaningful modifications
Test Success (50 points): Tests pass successfully
File Impact (up to 20 points): Number of files modified
Quality Heuristics: Additional scoring based on implementation patterns
🛠️ Available Tools
Core Voting Workflow
create_voting_worktrees
: Creates worktrees and starts automated executionlist_sessions
: Monitor all active sessions and their progressevaluate_implementations
: Get detailed ranking and evaluation of all variantsauto_select_best
: Automatically choose and finalize the best implementationfinalize_best
: Manually select a specific implementationcleanup_session
: Force cleanup of sessions
Additional Workflows
create_adhoc_worktree
: Single worktree for quick taskscreate_orchestrated_worktrees
: Multiple worktrees for coordinated subtasks
Utility Functions
get_worktree_info
: Inspect specific worktree detailsmark_implementation_complete
: Manually mark implementations as done
💡 Example Use Cases
Voting Pattern
Perfect for:
Architecture Exploration: Try different design patterns simultaneously
Library Comparison: Implement with various frameworks/libraries
Algorithm Optimization: Test multiple approaches to performance problems
UI/UX Variants: Create different interface implementations
Ad Hoc Tasks
Great for:
Bug Fixes: Quick isolation and resolution
Small Features: Rapid implementation without overhead
Experiments: Try ideas without affecting main branch
Orchestrated Development
Ideal for:
Large Features: Break down and parallelize development
System Refactoring: Coordinate multiple related changes
API Development: Build endpoints, models, and tests in parallel
🎯 Quick Start Examples
Example 1: Voting Pattern
Example 2: Quick Fix
Example 3: Feature Development
⚡ Performance Notes
Concurrent Execution: All Claude instances run in parallel
Automatic Cleanup: Failed/low-quality implementations are removed
Resource Efficient: Only keeps the winning implementation
Fast Evaluation: Uses git diff stats and automated test detection
Smart Naming: Worktrees include task description for easy identification
🔧 Advanced Features
Worktree Naming
Branches and directories now include task descriptions
Format:
{session-id}-{task-slug}-{variant}
Example:
abc123-fix-login-bug-var1
Origin/Main Support
Ad hoc worktrees always branch from
origin/main
Ensures clean starting point for isolated tasks
Automatically fetches latest changes
Terminal Integration
Automatically spawns Terminal windows (macOS)
Each worktree gets its own Claude session
No manual terminal management required
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
Enables parallel implementation of tasks using git worktrees, allowing you to create multiple variants of a solution, evaluate them side-by-side, and select the best one.
Related MCP Servers
- AsecurityAlicenseAqualityProvides comprehensive tools for managing GitHub projects, milestones, tasks, and sprints. This server integrates deeply with GitHub Projects V2, offering features like automated kanban workflows, sprint planning, and custom field management.Last updated -461568MIT License
- -securityFlicense-qualityEnables interaction with GitHub through the GitHub API, supporting file operations, repository management, advanced search, and issue tracking with comprehensive error handling and automatic branch creation.Last updated -1,4001
- AsecurityFlicenseAqualityEnables comprehensive GitHub operations through natural language including file management, repository administration, issue tracking, and advanced code searching.Last updated -4701
- AsecurityAlicenseAqualityProvides comprehensive Git operations as tools for AI assistants and applications. This server enables AI systems to interact with Git repositories, allowing to initialize, fetch, commit, log, status, etc..Last updated -1001MIT License