Treehouse Worktree

MCP server enabling AI tools to manage git worktrees with locking, setup, and conflict resolution.
  • typescript

2

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mark-hingston-treehouse-worktree": {
      "command": "treehouse-mcp",
      "args": []
    }
  }
}

You can run and orchestrate Treehouse Worktree through an MCP server, enabling AI tools to start, list, complete, and manage git worktrees with locking, automatic setup, and conflict handling. This MCP interface makes it straightforward to coordinate multiple agents and automate common worktree workflows across environments.

How to use

Use an MCP client to connect to the Treehouse Worktree MCP server and perform common worktree operations. You can create worktrees for agents, lock them for specific agents, complete work with optional merges, and prune or clean up stale entries. The MCP setup exposes a set of tools you can invoke from your AI workflows to manage the end-to-end life cycle of a worktree.

How to install

Prerequisites: install Node.js 18 or newer and ensure npm is available in your environment.

Install the Treehouse Worktree MCP server tooling and prerequisites.

Option 1: Use the local MCP server binary if you have it available as a package.

Option 2: Use NPX to run the MCP server directly without a global install.

Configuration and usage details

Configure the MCP server to expose commands your agents can call. The MCP configuration can point to a local stdio server that runs the Treehouse Worktree CLI, or use NPX to invoke the MCP entry point. Below are two explicit MCP configurations you can apply in your project’s MCP config file.

{
  "mcpServers": {
    "treehouse": {
      "command": "treehouse-mcp",
      "args": []
    }
  }
}

Additional configuration notes

If you prefer to invoke via NPX, you can configure the same MCP to run with NPX and pass the entry point as arguments.

{
  "mcpServers": {
    "treehouse_np": {
      "command": "npx",
      "args": ["treehouse-worktree", "mcp"]
    }
  }
}

Available tools

treehouse_init

Initialize the MCP integration and prepare configuration for worktree management.

treehouse_list

List all current worktrees and their status.

treehouse_create

Create a new worktree for a specified agent and optional branch.

treehouse_status

Get the status of worktrees or a specific worktree.

treehouse_complete

Mark a worktree as complete and optionally merge or delete the branch.

treehouse_remove

Remove a worktree, with options to force removal.

treehouse_lock

Lock a worktree to prevent concurrent usage by another agent.

treehouse_unlock

Unlock a previously locked worktree.

treehouse_conflicts

Check for merge conflicts in worktrees.

treehouse_resolve

Resolve merge conflicts using ours or theirs strategies.

treehouse_abort

Abort an in-progress merge for a worktree.

treehouse_prune

Prune orphaned worktree entries from metadata.

treehouse_clean

Clean old worktrees based on retention policies.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational