hop-mcp

hop-mcp

Manages parallel Git worktrees, enabling work on multiple branches simultaneously without stashing or context switching.

Category
Visit Server

README

hop-mcp

An MCP server for managing parallel Git worktrees. Work on multiple tickets simultaneously without stashing, switching branches, or losing context.

The Problem

You're deep in JIRA-456 when a critical bug comes in. Traditional workflow:

git stash
git checkout main
git checkout -b hotfix-789
# fix the bug
git checkout feature/JIRA-456
git stash pop   # hope nothing conflicts

With hop:

hop start HOTFIX-789
# fix the bug in isolated directory
hop to JIRA-456
# back to your original work, exactly as you left it

Each ticket gets its own directory. No stashing. No branch switching. No context loss.

Tools

Tool Description
hop_list List all worktrees with path, branch, commit, and dirty status
hop_start Create a new worktree for a ticket (supports dryRun to preview)
hop_to Switch to an existing worktree
hop_current Get current worktree context (branch, ticket, dirty status)
hop_open Open a worktree in Cursor IDE
hop_end Remove a worktree (checks for uncommitted changes, supports dryRun)
hop_clean Delete scratch files in a worktree

All tools also available as git_worktree_* aliases.

How It Works

Git worktrees create separate working directories that share the same .git object store:

my-project/                    # main worktree (your original clone)
my-project/.worktrees/
├── JIRA-123/                  # worktree for ticket JIRA-123
├── JIRA-456/                  # worktree for ticket JIRA-456
└── HOTFIX-789/                # worktree for hotfix

Benefits:

  • Low disk usage — only working files are duplicated, git objects are shared
  • Instant switching — just cd to another directory
  • Full isolation — each worktree has its own node_modules, build cache, etc.
  • No conflicts — uncommitted changes stay exactly where they are

Requirements

  • Git 2.5+ (for worktree support)
  • Node.js 20+

Install

npm install
npm run build

Setup

Claude Code

Add to ~/.claude.json under projects.<your-project>.mcpServers:

{
  "hop": {
    "type": "stdio",
    "command": "node",
    "args": ["/path/to/hop-mcp/dist/index.js"]
  }
}

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "hop": {
      "command": "node",
      "args": ["/path/to/hop-mcp/dist/index.js"]
    }
  }
}

Configuration

Config is merged from (highest precedence first):

  1. Per-repo: .hop-mcp.json at repository root
  2. Global: ~/.config/hop-mcp/config.json (macOS/Linux) or %APPDATA%\hop-mcp\config.json (Windows)
  3. Built-in defaults

Example .hop-mcp.json:

{
  "worktreesDir": ".worktrees",
  "defaultBaseBranch": "develop",
  "defaultBranchTemplate": "feature/<ticket>-<slug>",
  "defaultBranchTemplateNoSlug": "feature/<ticket>",
  "scratchGlobs": [".cursor/plans/**", "**/*.plan.md"]
}

Usage Examples

# See all active worktrees
hop list

# Start work on a new ticket
hop start JIRA-123

# Start with a descriptive slug
hop start JIRA-123 --slug fix-auth-timeout

# Preview what would be created (dry run)
hop start JIRA-123 --dry-run

# Switch to an existing ticket
hop to JIRA-123

# Check where you are
hop current

# Open ticket in Cursor
hop open JIRA-123

# Preview removal (shows dirty status)
hop end JIRA-123 --dry-run

# Remove when done (fails if uncommitted changes)
hop end JIRA-123

# Force remove with uncommitted changes
hop end JIRA-123 --force

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured