list-worktreesLABSCO SUMMARY
It hands back the merge command instead of running it.
That one decision tells you how the whole thing is built: the destructive operations are either off by default — hooks and branch deletion both need an explicit opt-in in the config — or handed back as text for you to run. Creating and listing worktrees is safe and immediate, which is the part you actually want automated when an agent is juggling several branches at once.
What it is
A Rust server that drives wtp (Worktree Plus) so an assistant can create, list and remove Git worktrees. It works in any Git repository and shells out to the wtp binary rather than reimplementing worktree handling. Alongside the tools it publishes resources — raw and resolved worktree lists, a repo overview, worktrees grouped by branch prefix — that a client can read without a tool call.
What you get
list-worktreeslists every worktree in the repositoryadd-worktreecreates one for an existing or new branchremove-worktreeremoves a worktree, and optionally its branchmerge-worktreereturns the git merge command for a worktree's branch rather than running itget-worktree-pathresolves a worktree name to an absolute pathinit-configrunswtp initto generate.wtp.ymlshell-hookandshell-initreturn bash, zsh or fish scripts- Resources at
wtp://worktrees,wtp://overviewandwtp://worktrees/by-branch-prefix
Requirements
The wtp binary has to be installed and on PATH, or named with --wtp-path. Install the server with cargo install wtp-mcp-rs, Homebrew, or a prebuilt archive from Releases; register it as the wtp-mcp-rs command. Run your client from the repository root, or pin one with --repo-root. Hooks and branch deletion are refused unless you set allow_hooks and allow_branch_delete under [security] in the config file.
Setup effort
One command — cargo install wtp-mcp-rs
USE CASES
Spinning up an isolated worktree for a new branch
Create it and get the absolute path back to work in.
Keeping track of what is checked out where
List the worktrees, or read the overview resource grouped by branch prefix.
Finishing up a branch
Get the merge command to run yourself, then remove the worktree.
Setting up wtp in a repository for the first time
Generate the config file, then edit the base directory and hooks before using it.
8 tools
Listed in project docs. Your client may show a different list.
add-worktreeremove-worktreemerge-worktreeinit-configget-worktree-pathshell-hookshell-initBEFORE YOU INSTALL
What to know first
Tools you get
8 tools named in the project's documentation.
Requires
- wtp-mcp-rs on PATH
- wtp (Worktree Plus) on PATH, or named with --wtp-path
INSTALLATION
Connect your client
Server setup
cargo install wtp-mcp-rsMCP Clients
Claude Code
{
"mcpServers": {
"wtp": {
"command": "wtp-mcp-rs"
}
}
}Codex
codex mcp add wtp -- wtp-mcp-rsAmp
amp mcp add --workspace wtp -- wtp-mcp-rs