Logo di Git Worktree Toolbox MCP Server

Git Worktree Toolbox MCP Server

Community
ben-rogerson

Easily manage git worktrees, launch tasks and work on multiple features in parallel.

Autoreben-rogerson
Repositorygit-worktree-toolbox
LinguaTypeScript
Fork
2
Stelle
19
Strumenti disponibili
9
Tipo di trasportostdio
Categorie
Link
  • Collega gli strumenti ai flussi di lavoro IA

    Git Worktree Toolbox MCP Server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 9 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    19 stelle e 2 fork nel repository collegato.

Git Worktree Toolbox

npm minzip package size

🌳 Git Worktree Toolbox is a MCP server and CLI for managing git worktrees.

Create isolated workspaces without the hassle of stashing changes and switching branches.

Ideal for AI-assisted development workflows requiring multiple features in parallel.

As a backup, use the gwtree command to run any of the mcp tools yourself.

Available MCP Tools (10)

  • list - List projects and their worktrees
  • new - Create a new worktree with a matching branch
  • archive - Archive worktrees and branches
  • go - Open worktree folder in your editor
  • changes - Review changes and optionally commit and push
  • grab - Pull in changes from a specific worktree
  • pr - Generate a link to create a pull/merge request
  • prompt - Resume AI agent sessions or setup AI agent auto-prompt (Claude/Cursor)
  • doctor - Fix worktree metadata issues
  • clean - Archive unused worktrees

Usage Examples

Once the MCP server is added, here's how you might phrase requests to activate each tool:

  • List worktrees: "List worktrees", "Show me all my projects and worktrees", "What worktrees do I have?"
  • Create new worktree: "New worktree for fixing the login bug", "Set up a new workspace for the user dashboard feature", "Make a worktree for the API refactor"
  • Archive worktree: "Archive this worktree", "Clean up the completed feature worktree", "Remove the old worktree and its branch"
  • Open worktree: "Open the login bug worktree in my editor", "Switch to the dashboard worktree", "Go to the API refactor workspace"
  • Review/Push changes: "Show changes from task-245", "What files have I modified?", "Push changes for task-245"
  • Grab changes: "Get login bug worktree changes", "Merge updates from the dashboard branch", "Pull in changes from the API worktree"
  • Create PR: "Generate a pull request link", "Create a merge request for task-245", "Make a PR for the current changes"
  • AI agent prompt: "Resume Claude session for task-245", "Setup Claude auto-prompt", "Setup Cursor Agent", "Continue conversation in this worktree"
  • Fix issues: "Fix my worktree metadata", "Repair worktree configuration", "Doctor the worktree setup"
  • Clean up: "Clean unused worktrees", "Archive old worktrees", "Remove completed worktrees"

Get Started

Add the MCP Server to Cursor / Claude Desktop:

json
{
  "mcpServers": {
    "git-worktree-toolbox": {
      "command": "npx",
      "args": ["-y", "git-worktree-toolbox@latest"]
    }
  }
}

The gwtree CLI is also available after a global installation:

bash
npm install -g git-worktree-toolbox

Run gwtree help to see the available tools and their flags.

bash
# List all projects with worktrees
gwtree list

# Create a new worktree with a matching branch
gwtree new "Fix login bug and flow"

# Archive current worktree (with branch removal)
gwtree archive -r

# Open current worktree and branch in editor
gwtree go

# Show the changes from all associated worktrees
gwtree changes

# Pull in changes from a specific worktree
gwtree grab fix-login-bug-1242

# Commit and push changes in a specific worktree
gwtree changes fix-login-bug-1242 -c

# Generate a link to create a pull/merge request
gwtree pr

# Fix worktree metadata issues
gwtree doctor

# Archive unused worktrees
gwtree clean

# Setup AI agent auto-prompt plugin (Claude by default)
gwtree prompt setup

# Setup with Cursor Agent instead
gwtree prompt setup --cursor

# Resume AI agent session for a worktree
gwtree prompt <worktree-id>

# Show help with advanced flag usage examples
gwtree help

AI Agent Prompt Plugin

When using the CLI, an interactive session with either Claude CLI or Cursor Agent can be automatically spawned in the new workspace, ready to use.

Quick Start

bash
# 1. Setup AI agent plugin (one-time)
gwtree prompt setup              # Claude (default)
gwtree prompt setup --cursor     # Cursor Agent

# 2. Create worktree - AI agent auto-launches
gwtree new "Add user authentication"
# → AI agent starts with task context
# → Session ID saved in worktree metadata

# 3. Resume AI agent session later
gwtree prompt user-authentication-123
# → Continue conversation with full history

Features

  • Auto-launch: AI agent starts automatically with task context
  • Session persistence: Each worktree gets a unique session
  • Resume capability: Continue conversations anytime with gwtree prompt
  • Customizable prompts: Edit ~/.gwtree/ai-agent.yaml to customize templates
  • Switchable providers: Switch between Claude CLI and Cursor Agent
  • Optional: Disable globally or per-worktree

See src/plugins/claude-prompt/README.md and src/plugins/cursor-agent/ for more information.

Configuration

Optionally, configure the worktrees folder and project directories using environment variables:

bash
# Storage directory for worktrees
# Default: ~/.gwtree/worktrees
export BASE_WORKTREES_PATH=~/my-custom-worktrees

# Custom project directories for discovery (colon-separated)
# Default: ~/Projects, ~/Code, ~/Developer
export PROJECT_DIRECTORIES="$HOME/custom-projects:$HOME/work"

Add these to your shell profile (~/.zshrc, ~/.bashrc, etc.) to persist across sessions.

Installazione

TypingMind
{
  "mcpServers": {
    "git-worktree-toolbox": {
      "command": "npx",
      "args": [
        "-y",
        "git-worktree-toolbox"
      ]
    }
  }
}

Strumenti disponibili

  • list

    Show git repositories with worktrees

  • go

    Open worktree in editor/terminal

  • create

    Create a new worktree with matching branch

  • changes

    Show all changes in a worktree or current repo. Optionally commit and push changes.

  • archive

    Archive a worktree and its matching branch

  • clean

    Archive all worktrees that don't have any changes compared to their base branch

  • doctor

    Check all worktrees and initialize missing metadata. Run this to ensure all worktrees have proper metadata.

  • mr

    Generate a merge request link for a worktree

  • grab

    Merge all changes from another worktree into the current worktree

Usa MCP Git Worktree Toolbox MCP Server con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso Git Worktree Toolbox MCP Server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi Git Worktree Toolbox MCP Server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di Git Worktree Toolbox MCP Server.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "git-worktree-toolbox": {
      "command": "npx",
      "args": [
        "-y",
        "git-worktree-toolbox"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di Git Worktree Toolbox MCP Server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di Git Worktree Toolbox MCP Server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare Git Worktree Toolbox MCP Server per aiutarmi con questa attività?
Git Worktree Toolbox MCP Server
Certo. Ho letto.
Ecco cosa ho trovato con Git Worktree Toolbox MCP Server.

Domande frequenti

A cosa serve il server MCP Git Worktree Toolbox MCP Server?

Git Worktree Toolbox MCP Server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare Git Worktree Toolbox MCP Server MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare Git Worktree Toolbox MCP Server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP Git Worktree Toolbox MCP Server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando Git Worktree Toolbox MCP Server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego Git Worktree Toolbox MCP Server MCP a TypingMind?

Git Worktree Toolbox MCP Server funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre Git Worktree Toolbox MCP Server MCP in TypingMind?

Git Worktree Toolbox MCP Server mette a disposizione 9 strumenti MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare Git Worktree Toolbox MCP Server MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se Git Worktree Toolbox MCP Server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇