← Back to directory
W

Worktree Compose MCP Server

Community
Run an isolated Compose stack for each Git worktree.
Category
Dev Tools #549 of 751
Stars
★ 53 Popular
Transport
stdio (local process)
Runtime
Node.js 20+ · Docker
Credentials
No credential needed
License
MIT
Last commit
45FMRS · D

This is a stdio MCP server for managing isolated Compose stacks in local Git worktree development environments. The source describes its capabilities and client setup, but does not provide canonical MCP tool identifiers or per-tool permission declarations.

Strongest · Setup experience 13/20 Weakest · Security and permissions 4/20

Reliability
8/20
Security and permissions
4/20
Maintenance
9/20
Documentation
11/20
Setup experience
13/20
Why each score
Reliability 8/20
The README describes MCP use for starting stacks, checking status, running container commands, reading logs, and cleanup, and lists Node.js, Git, and Compose/Podman dependencies. It provides no MCP tool list, parameter or error behavior details, CI, or tests covering key server paths. A static review therefore cannot verify initialization or tool behavior.
Security and permissions 4/20
Red line triggered: the README says MCP can remove a worktree's stack, while `down` deletes its volumes and `clean` tears down every stack and deletes volumes. It mentions `clean --dry-run` for preview but does not describe confirmation for destructive actions or how their scope is constrained. With no tool-level permissions, data-flow, or confirmation evidence, the security score is limited to 0–4.
Maintenance 9/20
The repository is listed as unarchived with zero open issues, the license is MIT, and the manifest identifies version 2.0.1. The supplied material does not show commit cadence, release history, dependency updates, or a security response channel, so it does not support a high maintenance score.
Documentation 11/20
The README provides installation steps, common commands, a configuration example, engine requirements, and pointers to client setup, making the basic workflow understandable. It omits MCP tool parameters, permission boundaries, limitations, and cost information, so points are deducted.
Setup experience 13/20
The README gives an npm global install path, the `wtc mcp` launch command, and a Claude Code configuration example, with pointers for Codex and Cursor. It does not include their concrete configurations, and setup depends on Node.js, Git, and Compose/Podman. There is no execution evidence, so the score stays within the static-calibration cap.

Static review · not runReviewed 2026-12-03

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesRuns commands or codeUses the network

Best for

  • Developers and coding agents using Git worktrees who need parallel Docker Compose or Podman environments.
  • Local development teams that want ports, containers, networks, and volumes isolated across worktrees.

Not for

  • Users who do not use Git worktrees or Compose stacks.
  • Users who need a remotely hosted service or an MCP transport other than stdio.

Required permissions

  • Access to the current Git repository and its worktrees to identify and manage their stacks.
  • Access to Docker Compose or Podman to manage containers, networks, and volumes; commands run in the selected service container.
  • Potential access to local environment files and untracked files mounted by Compose so they can be synced and worktree environment files generated.

Risks and side effects

  • Removing a stack or cleaning up can delete its volumes and the data they contain.
  • Commands run inside the selected worktree's service container; review the command and target service.
  • Ports are allocated from a range and may move to a later available port when a port is already occupied.
  • Configured shared services use the main checkout's services and are not fully isolated per worktree.

Setup

Before you start

Runtime:Node.js 20+ · Docker

In the MCP client configuration, set the command to npx and the arguments to -y, worktree-compose, and mcp. Alternatively, install worktree-compose globally and run wtc mcp. Requirements include Node.js 20+, Git 2.17+, and Docker Compose v2 or Podman.

MCP config · JSON
{"command":"npx","args":["-y","worktree-compose","mcp"]}

Works in clients that read an "mcpServers" key. For clients such as VS Code that use a different key, the configurator below converts it.

.vscode/mcp.json
{
  "command": "npx",
  "args": [
    "-y",
    "worktree-compose",
    "mcp"
  ]
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
{
  "command": "npx",
  "args": [
    "-y",
    "worktree-compose",
    "mcp"
  ]
}

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Check that it works

Confirm the worktree-compose tools appear in your MCP client, then ask it to list all worktree stack statuses, URLs, and ports.

Troubleshooting

  1. Check that Node.js 20+, Git 2.17+, and Docker Compose v2 or Podman are installed and available.
  2. Run wtc doctor to check Git, the container engine, ports, and isolation.
  3. Use wtc list to inspect stack status, health, URLs, services, and ports; use wtc logs to inspect logs.
  4. Check Compose ports, environment files, mounted files, and any optional .wtcrc.json configuration.

Things to try

Once connected, you can ask your AI assistant things like:

  • Start the current worktree's Compose stack and wait until it is healthy.
  • List every worktree's stack status, URLs, and ports.
  • Run npm test in the current worktree's web container.
  • Show the logs for the current worktree's stack.

Use cases

Run separate local service stacks for coding agents working in different Git worktrees.
Execute commands in an isolated worktree container and inspect its logs.
Stop or remove a worktree's stack when its work is complete.

Overview

Worktree Compose MCP Server gives each Git worktree its own Compose project, ports, database, cache, and containers. The MCP server runs over stdio and can start stacks, run commands in containers, read logs, and remove stacks. The project says it supports Docker Compose v2 or Podman.

Similar servers

Source revision 7df238c0af50 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/worktree-compose.svg)](https://followmcp.com/en/servers/worktree-compose)