Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .changeset/remove-mcp-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
"@camoneart/maestro": major
---

Remove obsolete `mcp` command and add dedicated MCP server binary

BREAKING CHANGE: The `mcp` command has been removed. It became obsolete with the introduction of the modern `claude mcp add` command which automatically manages the MCP server lifecycle.

**Migration:**
- Users no longer need to manually start the MCP server with `mst mcp serve`
- Claude Code automatically manages the server lifecycle
- New dedicated `maestro-mcp-server` binary added for MCP integration

**Setup for different scopes:**
```bash
# Local scope (default - current project only)
claude mcp add maestro -- npx -y @camoneart/maestro maestro-mcp-server

# Project scope (saved in .mcp.json for team sharing)
claude mcp add maestro -s project -- npx -y @camoneart/maestro maestro-mcp-server

# User scope (all projects on machine)
claude mcp add maestro -s user -- npx -y @camoneart/maestro maestro-mcp-server

# For global installation
claude mcp add maestro -s user -- maestro-mcp-server
```

**Rationale:**
- Simplifies the CLI by removing unnecessary complexity
- Reduces confusion for users
- Reduces maintenance burden
- Aligns with modern MCP setup practices
- Provides dedicated binary for cleaner MCP integration

Fixes #207
27 changes: 17 additions & 10 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,18 +338,27 @@ mst config init # プロジェクト設定を

最新のコマンドを使用してClaude CodeにMaestroをMCPサーバーとして追加:

#### ローカルスコープ(デフォルト - 現在のプロジェクトでのみ、個人専用)
```bash
# ユーザースコープ(マシン上の全プロジェクトで利用可能)
claude mcp add maestro -s user -- npx -y @camoneart/maestro mcp serve
claude mcp add maestro -s local -- npx -y @camoneart/maestro maestro-mcp-server
# または -s フラグなし(localがデフォルト)
claude mcp add maestro -- npx -y @camoneart/maestro maestro-mcp-server
```

# プロジェクトスコープ(.mcp.jsonに保存、バージョン管理でチーム共有)
claude mcp add maestro -s project -- npx -y @camoneart/maestro mcp serve
#### プロジェクトスコープ(.mcp.jsonに保存、バージョン管理でチーム共有)
```bash
claude mcp add maestro -s project -- npx -y @camoneart/maestro maestro-mcp-server
```

# ローカルスコープ(デフォルト - 現在のプロジェクトでのみ、個人専用)
claude mcp add maestro -s local -- npx -y @camoneart/maestro mcp serve
#### ユーザースコープ(マシン上の全プロジェクトで利用可能)
```bash
claude mcp add maestro -s user -- npx -y @camoneart/maestro maestro-mcp-server
```

# グローバルインストールの場合(npxの代わりにmaestroを使用)
claude mcp add maestro -s user -- maestro mcp serve
#### グローバルインストールの場合
Maestroをグローバルインストールしている場合は以下を使用:
```bash
claude mcp add maestro -s user -- maestro-mcp-server
```

これによりClaude CodeがMaestroのMCPサーバーを選択したスコープレベルで使用できるよう自動設定されます。
Expand Down Expand Up @@ -398,15 +407,13 @@ mst completion fish > ~/.config/fish/completions/mst.fish
| **Git が古い**<br>`fatal: unknown option` | Git バージョン < 2.22 | `brew install git` |
| **fzf が見つからない** | fzf 未インストール | `brew install fzf` |
| **tmux が見つからない** | tmux 未インストール | `brew install tmux` |
| **Claude Code が起動しない** | MCP サーバー未起動 or ポート競合 | `mst mcp status` → `mst mcp stop` |
| **tmux ペインが多すぎる**<br>`画面サイズに対してペイン数(N個)が多すぎるため、セッションが作成できませんでした` | ターミナルウィンドウに対してペイン数が過多 | ウィンドウのリサイズまたはペイン数を削減(最大:水平10個、垂直15個) |
| **GitHub PR/Issue が見つからない**<br>`Error: PR/Issue #999 が見つかりません` | 存在しないIssue/PR番号を指定 | 正しい番号を確認するか、リポジトリを確認 |

### その他のエラーコード例

| エラーコード | 原因 | 解決策 |
| ------------ | ------------------------------ | ----------------------------------- |
| `EADDRINUSE` | MCP サーバーのポート競合 | `mst mcp stop` で既存プロセスを停止 |
| `ENOENT` | Git 実行ファイルが見つからない | Git の PATH を確認、再インストール |

### ⚠️ CLIオプション検証とエラーハンドリング
Expand Down
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,18 +339,27 @@ All available configuration options for `.maestro.json`:

Add Maestro as an MCP server to Claude Code using the modern command:

#### Local Scope (Default - only for current project, private to you)
```bash
# User scope (available across all projects on the machine)
claude mcp add maestro -s user -- npx -y @camoneart/maestro mcp serve
claude mcp add maestro -s local -- npx -y @camoneart/maestro maestro-mcp-server
# Or without -s flag (local is default)
claude mcp add maestro -- npx -y @camoneart/maestro maestro-mcp-server
```

# Project scope (saved in .mcp.json for team sharing via version control)
claude mcp add maestro -s project -- npx -y @camoneart/maestro mcp serve
#### Project Scope (saved in .mcp.json for team sharing via version control)
```bash
claude mcp add maestro -s project -- npx -y @camoneart/maestro maestro-mcp-server
```

# Local scope (default - only for current project, private to you)
claude mcp add maestro -s local -- npx -y @camoneart/maestro mcp serve
#### User Scope (available across all projects on the machine)
```bash
claude mcp add maestro -s user -- npx -y @camoneart/maestro maestro-mcp-server
```

# For global installation (use 'maestro' instead of 'npx')
claude mcp add maestro -s user -- maestro mcp serve
#### For global installation users
If you've installed Maestro globally, use:
```bash
claude mcp add maestro -s user -- maestro-mcp-server
```

This will automatically configure Claude Code to use Maestro's MCP server for orchestra management at the chosen scope level.
Expand Down Expand Up @@ -424,15 +433,13 @@ mst create feature/new-feature --tmux
| **Git is too old** <br>`fatal: unknown option` | Git < 2.22 | `brew install git` |
| **fzf not found** | fzf not installed | `brew install fzf` |
| **tmux not found** | tmux not installed | `brew install tmux` |
| **Claude Code won't start** | MCP server not running or port conflict | `mst mcp status` → `mst mcp stop` |
| **Too many tmux panes** <br>`Unable to create session with N panes due to terminal size` | Terminal window too small for requested panes | Resize window or reduce panes (max: 10 horizontal, 15 vertical) |
| **GitHub PR/Issue not found** <br>`Error: PR/Issue #999 が見つかりません` | Specified non-existent Issue/PR number | Check correct number or verify repository |

### Other error codes

| Code | Cause | Fix |
| ------------ | ---------------------- | --------------------------------------- |
| `EADDRINUSE` | MCP server port in use | `mst mcp stop` to kill previous process |
| `ENOENT` | Git binary not found | Check PATH or reinstall Git |

### ⚠️ CLI Option Validation and Error Handling
Expand Down
23 changes: 0 additions & 23 deletions docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Detailed usage of all maestro (mst) commands.
- [config](#-config) - Configuration management
- [where](#-where) - Check current location
- [exec](#-exec) - Execute commands in members
- [mcp](#-mcp) - MCP server management
- [attach](#-attach) - Attach to existing branch
- [graph](#-graph) - Display relationships
- [history](#-history) - Operation history
Expand Down Expand Up @@ -761,27 +760,6 @@ mst exec --fzf --tmux-v npm test
```


### 🔸 mcp

Manage MCP server.

```bash
mst mcp <command> [options]
```

| Subcommand | Description |
|------------|-------------|
| `serve` | Start MCP server for Claude Code/Cursor integration |

#### Examples
```bash
# Start MCP server
mst mcp serve

# Display usage information
mst mcp
```

### 🔸 attach

Attach to existing branch.
Expand Down Expand Up @@ -1149,7 +1127,6 @@ For detailed usage of each command, see the following documentation:
- [Config Management Details](./commands/config.md)
- [Where Command Details](./commands/where.md)
- [Exec Command Details](./commands/exec.md)
- [MCP Server Details](./commands/mcp.md)
- [Attach Command Details](./commands/attach.md)
- [Graph Display Details](./commands/graph.md)
- [History Management Details](./commands/history.md)
Expand Down
42 changes: 25 additions & 17 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,45 +408,53 @@ Cleanup before deletion:

Maestro includes a Model Context Protocol (MCP) server for AI assistant integration.

### Adding Maestro to Claude Code
### Setup Instructions

Use the modern `claude mcp add` command:

#### Local Scope (Default - only for current project, private to you)
```bash
# User scope (available across all projects on the machine)
claude mcp add maestro -s user -- npx -y @camoneart/maestro mcp serve
claude mcp add maestro -s local -- npx -y @camoneart/maestro maestro-mcp-server
# Or without -s flag (local is default)
claude mcp add maestro -- npx -y @camoneart/maestro maestro-mcp-server
```

# Project scope (saved in .mcp.json for team sharing via version control)
claude mcp add maestro -s project -- npx -y @camoneart/maestro mcp serve
#### Project Scope (saved in .mcp.json for team sharing via version control)
```bash
claude mcp add maestro -s project -- npx -y @camoneart/maestro maestro-mcp-server
```

# Local scope (default - only for current project, private to you)
claude mcp add maestro -s local -- npx -y @camoneart/maestro mcp serve
#### User Scope (available across all projects on the machine)
```bash
claude mcp add maestro -s user -- npx -y @camoneart/maestro maestro-mcp-server
```

# For global installation (use 'maestro' instead of 'npx')
claude mcp add maestro -s user -- maestro mcp serve
#### For global installation
If you've installed Maestro globally:
```bash
claude mcp add maestro -s user -- maestro-mcp-server
```

### JSON Configuration Alternative
### Alternative Setup

You can also use JSON configuration with the `claude mcp add-json` command:

```bash
# Using JSON format
claude mcp add-json maestro -s user '{"type":"stdio","command":"npx","args":["-y","@camoneart/maestro","mcp","serve"]}'
claude mcp add-json maestro -s user '{"type":"stdio","command":"npx","args":["-y","@camoneart/maestro","maestro-mcp-server"]}'

# For global installation
claude mcp add-json maestro -s user '{"type":"stdio","command":"maestro","args":["mcp","serve"]}'
claude mcp add-json maestro -s user '{"type":"stdio","command":"maestro-mcp-server","args":[]}'
```

**Note**: The traditional manual configuration in `.claude/mcp_settings.json` is no longer supported.

### Available MCP Tools

When integrated, AI assistants can:
- Create and manage worktrees
- Execute commands in specific worktrees
- List all orchestra members with status
- Delete worktrees safely
- `create_orchestra_member` - Create new worktrees with optional base branch
- `delete_orchestra_member` - Remove worktrees with force option
- `exec_in_orchestra_member` - Execute commands within specific worktrees
- `list_orchestra_members` - List all active worktrees with status

The MCP server respects all Maestro configuration settings including hooks, sync files, and Claude markdown modes.

Expand Down
2 changes: 1 addition & 1 deletion docs/commands/completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ All main commands and aliases are completed:
```bash
mst <TAB>
# Suggests: create, list, delete, shell, exec, attach, github,
# config, mcp, completion, tmux, where
# config, completion, tmux, where
# ls, rm, sh, e, a, gh, t, w (aliases)
```

Expand Down
Loading
Loading