# Worktree Compose MCP Server

> Run an isolated Compose stack for each Git worktree.

- **URL**: https://followmcp.com/en/servers/worktree-compose
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 53
- **FMRS Score**: 45/100 (Grade D)
- **Source**: https://github.com/mostafasudo/worktree-compose
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 20+, Docker
- **Auth**: No credential needed

## 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.

## 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
- 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.

## Client config (JSON)
```json
{"command":"npx","args":["-y","worktree-compose","mcp"]}
```
