ai-cli-mcp 2.3.3 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "acm-dev": {
4
+ "command": "npm",
5
+ "args": [
6
+ "run",
7
+ "dev"
8
+ ]
9
+ }
10
+ }
11
+ }
package/.mcp.json CHANGED
@@ -3,7 +3,8 @@
3
3
  "acm-dev": {
4
4
  "command": "npm",
5
5
  "args": [
6
- "start"
6
+ "run",
7
+ "dev"
7
8
  ]
8
9
  }
9
10
  }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # [2.5.0](https://github.com/mkXultra/claude-code-mcp/compare/v2.4.0...v2.5.0) (2026-01-24)
2
+
3
+
4
+ ### Features
5
+
6
+ * enhance output parsers for Codex and Claude with tool usage extraction ([b6410a1](https://github.com/mkXultra/claude-code-mcp/commit/b6410a104666eca592735acea093b877c0f03f64))
7
+ * track command execution in Codex output and include .gemini config ([91f7f06](https://github.com/mkXultra/claude-code-mcp/commit/91f7f067a1d453fd8e3a5a95bb90f21b7df0af8a))
8
+ * update Claude CLI args to stream-json and add verbose option to get_result ([b7f9abc](https://github.com/mkXultra/claude-code-mcp/commit/b7f9abc11c56ad0c8c95e90a614d1d869d8a3bfa))
9
+
10
+ # [2.4.0](https://github.com/mkXultra/claude-code-mcp/compare/v2.3.3...v2.4.0) (2026-01-24)
11
+
12
+
13
+ ### Features
14
+
15
+ * add model aliases and auto-reasoning for Codex ([16bbd7c](https://github.com/mkXultra/claude-code-mcp/commit/16bbd7cef934cbe2c652e7e48c8dd289f1a64eda))
16
+ * add support for gemini-3-flash-preview ([b51a2d1](https://github.com/mkXultra/claude-code-mcp/commit/b51a2d1789455f3366dfc8f6397cf7ffc39f930d))
17
+
1
18
  ## [2.3.3](https://github.com/mkXultra/claude-code-mcp/compare/v2.3.2...v2.3.3) (2026-01-20)
2
19
 
3
20
 
@@ -0,0 +1,71 @@
1
+ # Contributing
2
+
3
+ ## Development Setup
4
+
5
+ ```bash
6
+ git clone https://github.com/mkXultra/claude-code-mcp.git
7
+ cd claude-code-mcp
8
+ npm install
9
+ npm run build
10
+ ```
11
+
12
+ ## Testing
13
+
14
+ ```bash
15
+ # Run all tests
16
+ npm test
17
+
18
+ # Unit tests only
19
+ npm run test:unit
20
+
21
+ # E2E tests (with mocks)
22
+ npm run test:e2e
23
+
24
+ # E2E tests locally (requires Claude CLI)
25
+ npm run test:e2e:local
26
+
27
+ # Watch mode
28
+ npm run test:watch
29
+
30
+ # Coverage
31
+ npm run test:coverage
32
+ ```
33
+
34
+ ## Manual Testing with MCP Inspector
35
+
36
+ ```bash
37
+ npm run build
38
+ npx @modelcontextprotocol/inspector node dist/server.js
39
+ ```
40
+
41
+ ## Local Development with npm link
42
+
43
+ ```bash
44
+ npm install
45
+ npm run build
46
+ npm link
47
+ ```
48
+
49
+ Then use `ai-cli-mcp` command globally.
50
+
51
+ ## Environment Variables
52
+
53
+ | Variable | Description |
54
+ |----------|-------------|
55
+ | `CLAUDE_CLI_NAME` | Claude CLI binary name or absolute path |
56
+ | `CODEX_CLI_NAME` | Codex CLI binary name or absolute path |
57
+ | `GEMINI_CLI_NAME` | Gemini CLI binary name or absolute path |
58
+ | `MCP_CLAUDE_DEBUG` | Enable debug logging (`true`/`false`) |
59
+
60
+ ## Release Process
61
+
62
+ See [docs/RELEASE_CHECKLIST.md](docs/RELEASE_CHECKLIST.md) for release instructions.
63
+
64
+ Uses semantic-release with Conventional Commits:
65
+ - `fix:` → patch release
66
+ - `feat:` → minor release
67
+ - `feat!:` or `BREAKING CHANGE:` → major release
68
+
69
+ ## License
70
+
71
+ MIT
package/README.ja.md ADDED
@@ -0,0 +1,227 @@
1
+ # AI CLI MCP Server
2
+
3
+ [![npm package](https://img.shields.io/npm/v/ai-cli-mcp)](https://www.npmjs.com/package/ai-cli-mcp)
4
+ [![View changelog](https://img.shields.io/badge/Explore%20Changelog-brightgreen)](/CHANGELOG.md)
5
+
6
+ > **📦 パッケージ移行のお知らせ**: 本パッケージは旧名 `@mkxultra/claude-code-mcp` から `ai-cli-mcp` に名称変更されました。これは、複数のAI CLIツールのサポート拡大を反映したものです。
7
+
8
+ AI CLIツール(Claude, Codex, Gemini)をバックグラウンドプロセスとして実行し、権限処理を自動化するMCP(Model Context Protocol)サーバーです。
9
+
10
+ Cursorなどのエディタが、複雑な手順を伴う編集や操作に苦戦していることに気づいたことはありませんか?このサーバーは、強力な統合 `run` ツールを提供し、複数のAIエージェントを活用してコーディングタスクをより効果的に処理できるようにします。
11
+
12
+ <img src="assets/screenshot.png" width="300" alt="Screenshot">
13
+
14
+ ## 概要
15
+
16
+ このMCPサーバーは、LLMがAI CLIツールと対話するためのツールを提供します。MCPクライアントと統合することで、LLMは以下のことが可能になります:
17
+
18
+ - すべての権限確認をスキップしてClaude CLIを実行(`--dangerously-skip-permissions` を使用)
19
+ - 自動承認モードでCodex CLIを実行(`--full-auto` を使用)
20
+ - 自動承認モードでGemini CLIを実行(`-y` を使用)
21
+ - 複数のAIモデルのサポート:
22
+ - Claude (sonnet, opus, haiku)
23
+ - Codex (gpt-5.2-codex, gpt-5.1-codex-mini, gpt-5.1-codex-max, など)
24
+ - Gemini (gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview, gemini-3-flash-preview)
25
+ - PID追跡によるバックグラウンドプロセスの管理
26
+ - ツールからの構造化された出力の解析と返却
27
+
28
+ ### 使用例(高度な並行処理)
29
+
30
+ メインのエージェントに以下のように指示することで、複数のタスクを並行して実行させることができます。
31
+
32
+ > 以下の3つのタスクをacm mcp runでエージェントを起動して:
33
+ > 1. `sonnet` で `src/backend` のコードをリファクタリング
34
+ > 2. `gpt-5.2-codex` で `src/frontend` のユニットテストを作成
35
+ > 3. `gemini-2.5-pro` で `docs/` のドキュメントを更新
36
+ >
37
+ > 実行中はあなたはTODOリストを更新する作業を行ってください。それが終わったら `wait` ツールを使ってすべての完了を待機し、結果をまとめて報告してください。
38
+
39
+ ### 使用例(コンテキストキャッシュの共有)
40
+
41
+ 一度読み込んだ重いコンテキスト(大規模なコードベースやドキュメント)をセッションIDを使って再利用することで、コストを抑えながら複数のタスクを実行できます。
42
+
43
+ > 1. まず `acm mcp run` を使い、`opus` で `src/` 以下の全ファイルを読み込み、プロジェクトの構造を理解させてください。
44
+ > 2. `wait` ツールでこの処理の完了を待ち、結果から `session_id` を取得してください。
45
+ > 3. その `session_id` を使い、以下の2つのタスクを `acm mcp run` で並行して実行してください:
46
+ > - `sonnet` で `src/utils` のリファクタリング案を作成
47
+ > - `gpt-5.2-codex` で `README.md` にアーキテクチャの解説を追記
48
+ > 4. 最後に再び `wait` して、両方の結果をまとめてください。
49
+
50
+ ## メリット
51
+
52
+ - **真の非同期マルチタスク**: エージェントの実行はバックグラウンドで行われ、即座に制御が戻ります。呼び出し元のAIは実行完了を待つことなく、並行して次のタスクの実行や別のエージェントの呼び出しを行うことができます。
53
+ - **CLI in CLI (Agent in Agent) の実現**: MCPをサポートするあらゆるIDEやCLIから、Claude CodeやCodexといった強力なCLIツールを直接呼び出せます。ホスト環境の制限を超えた、より広範で複雑なシステム操作や自動化が可能になります。
54
+ - **モデル・プロバイダの制約からの解放**: 特定のエコシステムに縛られることなく、Claude、Codex (GPT)、Geminiの中から、タスクに最適な「最強のモデル」や「コスト効率の良いモデル」を自由に選択・組み合わせて利用できます。
55
+
56
+ ## 前提条件
57
+
58
+ 利用したいAI CLIツールがローカル環境にインストールされ、正しく設定されていることが唯一の前提条件です。
59
+
60
+ - **Claude Code**: `claude doctor` が通り、`--dangerously-skip-permissions` での実行が承認済み(一度手動で実行してログイン・承認済み)であること。
61
+ - **Codex CLI**(オプション): インストール済みで、ログインなどの初期設定が完了していること。
62
+ - **Gemini CLI**(オプション): インストール済みで、ログインなどの初期設定が完了していること。
63
+
64
+ ## インストールと使い方
65
+
66
+ 推奨される使用方法は、`npx` を使用してインストールすることです。
67
+
68
+ ### MCP設定ファイルでnpxを使用する場合:
69
+
70
+ ```json
71
+ "ai-cli-mcp": {
72
+ "command": "npx",
73
+ "args": [
74
+ "-y",
75
+ "ai-cli-mcp@latest"
76
+ ]
77
+ },
78
+ ```
79
+
80
+ ### Claude CLI mcp add コマンドを使用する場合:
81
+
82
+ ```bash
83
+ claude mcp add ai-cli '{"name":"ai-cli","command":"npx","args":["-y","ai-cli-mcp@latest"]}'
84
+ ```
85
+
86
+ ## 重要な初回セットアップ
87
+
88
+ ### Claude CLIの場合:
89
+
90
+ **MCPサーバーがClaudeを使用する前に、一度手動で `--dangerously-skip-permissions` フラグを付けてClaude CLIを実行し、ログインして利用規約に同意する必要があります。**
91
+
92
+ ```bash
93
+ npm install -g @anthropic-ai/claude-code
94
+ claude --dangerously-skip-permissions
95
+ ```
96
+
97
+ プロンプトに従って同意してください。これが完了すると、MCPサーバーはこのフラグを使って非対話的に実行できるようになります。
98
+
99
+ ### Codex CLIの場合:
100
+
101
+ **Codexの場合、ログインして必要な規約に同意していることを確認してください:**
102
+
103
+ ```bash
104
+ codex login
105
+ ```
106
+
107
+ ### Gemini CLIの場合:
108
+
109
+ **Geminiの場合、ログインして認証情報を設定していることを確認してください:**
110
+
111
+ ```bash
112
+ gemini auth login
113
+ ```
114
+
115
+ macOSでは、これらのツールを初めて実行する際にフォルダへのアクセス許可を求められる場合があります。最初の実行が失敗しても、2回目以降は動作するはずです。
116
+
117
+ ## MCPクライアントへの接続
118
+
119
+ サーバーのセットアップ後、MCPクライアント(CursorやWindsurfなど)の設定ファイル(`mcp.json` や `mcp_config.json`)に設定を追加してください。
120
+
121
+ ファイルが存在しない場合は作成し、`ai-cli-mcp` の設定を追加してください。
122
+
123
+ ## 提供されるツール
124
+
125
+ このサーバーは以下のツールを公開しています:
126
+
127
+ ### `run`
128
+
129
+ Claude CLI、Codex CLI、またはGemini CLIを使用してプロンプトを実行します。モデル名に基づいて適切なCLIが自動的に選択されます。
130
+
131
+ **引数:**
132
+ - `prompt` (string, 任意): AIエージェントに送信するプロンプト。`prompt` または `prompt_file` のいずれかが必須です。
133
+ - `prompt_file` (string, 任意): プロンプトを含むファイルへのパス。`prompt` または `prompt_file` のいずれかが必須です。絶対パス、または `workFolder` からの相対パスが指定可能です。
134
+ - `workFolder` (string, 必須): CLIを実行する作業ディレクトリ。絶対パスである必要があります。
135
+ - **モデル (Models):**
136
+ - **Ultra エイリアス:** `claude-ultra`, `codex-ultra` (自動的に high-reasoning に設定), `gemini-ultra`
137
+ - Claude: `sonnet`, `opus`, `haiku`
138
+ - Codex: `gpt-5.2-codex`, `gpt-5.1-codex-mini`, `gpt-5.1-codex-max`, `gpt-5.2`, `gpt-5.1`, `gpt-5`
139
+ - Gemini: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`
140
+ - `reasoning_effort` (string, 任意): Codex専用。`model_reasoning_effort` を設定します(許容値: "low", "medium", "high")。
141
+ - `session_id` (string, 任意): 以前のセッションを再開するためのセッションID。対応モデル: haiku, sonnet, opus, gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview, gemini-3-flash-preview。
142
+
143
+ ### `wait`
144
+
145
+ 複数のAIエージェントプロセスの完了を待機し、結果をまとめて返します。指定されたすべてのPIDが終了するか、タイムアウトになるまでブロックします。
146
+
147
+ **引数:**
148
+ - `pids` (array of numbers, 必須): 待機するプロセスIDのリスト(`run` ツールから返されたもの)。
149
+ - `timeout` (number, 任意): 最大待機時間(秒)。デフォルトは180秒(3分)です。
150
+
151
+ ### `list_processes`
152
+
153
+ 実行中および完了したすべてのAIエージェントプロセスを、ステータス、PID、基本情報とともにリストアップします。
154
+
155
+ ### `get_result`
156
+
157
+ PIDを指定して、AIエージェントプロセスの現在の出力とステータスを取得します。
158
+
159
+ **引数:**
160
+ - `pid` (number, 必須): `run` ツールによって返されたプロセスID。
161
+
162
+ ### `kill_process`
163
+
164
+ PIDを指定して、実行中のAIエージェントプロセスを終了します。
165
+
166
+ **引数:**
167
+ - `pid` (number, 必須): 終了させるプロセスID。
168
+
169
+ ## トラブルシューティング
170
+
171
+ - **"Command not found" (claude-code-mcp):** グローバルにインストールした場合、npmのグローバルbinディレクトリがシステムのPATHに含まれているか確認してください。`npx` を使用している場合、`npx` 自体が機能しているか確認してください。
172
+ - **"Command not found" (claude または ~/.claude/local/claude):** Claude CLIが正しくインストールされていることを確認してください。`claude/doctor` を実行するか、公式ドキュメントを確認してください。
173
+ - **権限の問題:** 「重要な初回セットアップ」の手順を実行したか確認してください。
174
+ - **サーバーからのJSONエラー:** `MCP_CLAUDE_DEBUG` が `true` の場合、エラーメッセージやログがMCPのJSON解析を妨げる可能性があります。通常動作時は `false` に設定してください。
175
+
176
+ ## 開発者向け: ローカルセットアップと貢献
177
+
178
+ このサーバーを開発・貢献したい場合、またはクローンしたリポジトリから実行してテストしたい場合は、[Local Installation & Development Setup Guide](./docs/local_install.md) を参照してください。
179
+
180
+ ## テスト
181
+
182
+ プロジェクトには包括的なテストスイートが含まれています:
183
+
184
+ ```bash
185
+ # 全テストの実行
186
+ npm test
187
+
188
+ # ユニットテストのみ実行
189
+ npm run test:unit
190
+
191
+ # E2Eテストの実行(モック使用)
192
+ npm run test:e2e
193
+ ```
194
+
195
+ ## 高度な設定(オプション)
196
+
197
+ 通常の利用では設定不要ですが、CLIツールのパスをカスタマイズしたい場合やデバッグが必要な場合に使用できる環境変数です。
198
+
199
+ - `CLAUDE_CLI_NAME`: Claude CLIのバイナリ名または絶対パスを上書き(デフォルト: `claude`)
200
+ - `CODEX_CLI_NAME`: Codex CLIのバイナリ名または絶対パスを上書き(デフォルト: `codex`)
201
+ - `GEMINI_CLI_NAME`: Gemini CLIのバイナリ名または絶対パスを上書き(デフォルト: `gemini`)
202
+ - `MCP_CLAUDE_DEBUG`: デバッグログを有効化(`true` に設定すると詳細な出力が表示されます)
203
+
204
+ **CLI名の指定方法:**
205
+ - コマンド名のみ: `CLAUDE_CLI_NAME=claude-custom`
206
+ - 絶対パス: `CLAUDE_CLI_NAME=/path/to/custom/claude`
207
+ ※ 相対パスは使用できません。
208
+
209
+ ### カスタムCLIバイナリを使用する場合の設定例:
210
+
211
+ ```json
212
+ "ai-cli-mcp": {
213
+ "command": "npx",
214
+ "args": [
215
+ "-y",
216
+ "ai-cli-mcp@latest"
217
+ ],
218
+ "env": {
219
+ "CLAUDE_CLI_NAME": "claude-custom",
220
+ "CODEX_CLI_NAME": "codex-custom"
221
+ }
222
+ },
223
+ ```
224
+
225
+ ## ライセンス
226
+
227
+ MIT
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  [![npm package](https://img.shields.io/npm/v/ai-cli-mcp)](https://www.npmjs.com/package/ai-cli-mcp)
4
4
  [![View changelog](https://img.shields.io/badge/Explore%20Changelog-brightgreen)](/CHANGELOG.md)
5
5
 
6
+ [🇯🇵 日本語のREADMEはこちら](./README.ja.md)
7
+
6
8
  > **📦 Package Migration Notice**: This package was formerly `@mkxultra/claude-code-mcp` and has been renamed to `ai-cli-mcp` to reflect its expanded support for multiple AI CLI tools.
7
9
 
8
10
  An MCP (Model Context Protocol) server that allows running AI CLI tools (Claude, Codex, and Gemini) in background processes with automatic permission handling.
@@ -18,39 +20,45 @@ This MCP server provides tools that can be used by LLMs to interact with AI CLI
18
20
  - Run Claude CLI with all permissions bypassed (using `--dangerously-skip-permissions`)
19
21
  - Execute Codex CLI with automatic approval mode (using `--full-auto`)
20
22
  - Execute Gemini CLI with automatic approval mode (using `-y`)
21
- - Support multiple AI models: Claude (sonnet, opus, haiku), Codex (gpt-5.2-codex, gpt-5.1-codex-mini, gpt-5.1-codex-max, gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5-codex, gpt-5-codex-mini, gpt-5), and Gemini (gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview)
23
+ - Support multiple AI models: Claude (sonnet, opus, haiku), Codex (gpt-5.2-codex, gpt-5.1-codex-mini, gpt-5.1-codex-max, gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5-codex, gpt-5-codex-mini, gpt-5), and Gemini (gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview, gemini-3-flash-preview)
22
24
  - Manage background processes with PID tracking
23
25
  - Parse and return structured outputs from both tools
24
26
 
25
- ## Benefits
27
+ ### Usage Example (Advanced Parallel Processing)
26
28
 
27
- - Claude/Windsurf often have trouble editing files. Claude Code is better and faster at it.
28
- - Multiple commands can be queued instead of direct execution. This saves context space so more important stuff is retained longer, fewer compacts happen.
29
- - File ops, git, or other operations don't need costy models. Claude Code is pretty cost effective if you sign up for Antropic Max. You can use Gemini or o3 in Max mode and save costs with offloading tasks to cheaper models.
30
- - Claude has wider system access and can do things that Cursor/Windsurf can't do (or believe they can't), so whenever they are stuck just ask them "use claude code" and it will usually un-stuck them.
31
- - Agents in Agents rules.
29
+ You can instruct your main agent to run multiple tasks in parallel like this:
32
30
 
33
- ## Prerequisites
31
+ > Launch agents for the following 3 tasks using acm mcp run:
32
+ > 1. Refactor `src/backend` code using `sonnet`
33
+ > 2. Create unit tests for `src/frontend` using `gpt-5.2-codex`
34
+ > 3. Update docs in `docs/` using `gemini-2.5-pro`
35
+ >
36
+ > While they run, please update the TODO list. Once done, use the `wait` tool to wait for all completions and report the results together.
34
37
 
35
- - Node.js v20 or later (Use fnm or nvm to install)
36
- - Claude CLI installed locally (run it and call /doctor) and `--dangerously-skip-permissions` accepted
37
- - Codex CLI installed (optional, for Codex support)
38
- - Gemini CLI installed (optional, for Gemini support)
38
+ ### Usage Example (Context Caching & Sharing)
39
39
 
40
- ## Configuration
40
+ You can reuse heavy context (like large codebases) using session IDs to save costs while running multiple tasks.
41
41
 
42
- ### Environment Variables
42
+ > 1. First, use `acm mcp run` with `opus` to read all files in `src/` and understand the project structure.
43
+ > 2. Use the `wait` tool to wait for completion and retrieve the `session_id` from the result.
44
+ > 3. Using that `session_id`, run the following two tasks in parallel with `acm mcp run`:
45
+ > - Create refactoring proposals for `src/utils` using `sonnet`
46
+ > - Add architecture documentation to `README.md` using `gpt-5.2-codex`
47
+ > 4. Finally, `wait` again to combine both results.
43
48
 
44
- - `CLAUDE_CLI_NAME`: Override the Claude CLI binary name or provide an absolute path (default: `claude`)
45
- - `CODEX_CLI_NAME`: Override the Codex CLI binary name or provide an absolute path (default: `codex`)
46
- - `GEMINI_CLI_NAME`: Override the Gemini CLI binary name or provide an absolute path (default: `gemini`)
47
- - `MCP_CLAUDE_DEBUG`: Enable debug logging (set to `true` for verbose output)
49
+ ## Benefits
48
50
 
49
- All CLI name variables support:
50
- - Simple name: `CLAUDE_CLI_NAME=claude-custom` or `CODEX_CLI_NAME=codex-v2`
51
- - Absolute path: `CLAUDE_CLI_NAME=/path/to/custom/claude`
51
+ - **True Async Multitasking**: Agent execution happens in the background, returning control immediately. The calling AI can proceed with the next task or invoke another agent without waiting for completion.
52
+ - **CLI in CLI (Agent in Agent)**: Directly invoke powerful CLI tools like Claude Code or Codex from any MCP-supported IDE or CLI. This enables broader, more complex system operations and automation beyond host environment limitations.
53
+ - **Freedom from Model/Provider Constraints**: Freely select and combine the "strongest" or "most cost-effective" models from Claude, Codex (GPT), and Gemini without being tied to a specific ecosystem.
52
54
 
53
- Note: Relative paths are not allowed and will throw an error.
55
+ ## Prerequisites
56
+
57
+ The only prerequisite is that the AI CLI tools you want to use are locally installed and correctly configured.
58
+
59
+ - **Claude Code**: `claude doctor` passes, and execution with `--dangerously-skip-permissions` is approved (you must run it manually once to login and accept terms).
60
+ - **Codex CLI** (Optional): Installed and initial setup (login etc.) completed.
61
+ - **Gemini CLI** (Optional): Installed and initial setup (login etc.) completed.
54
62
 
55
63
  ## Installation & Usage
56
64
 
@@ -74,22 +82,6 @@ The recommended way to use this server is by installing it by using `npx`.
74
82
  claude mcp add ai-cli '{"name":"ai-cli","command":"npx","args":["-y","ai-cli-mcp@latest"]}'
75
83
  ```
76
84
 
77
- ### With custom CLI binaries:
78
-
79
- ```json
80
- "ai-cli-mcp": {
81
- "command": "npx",
82
- "args": [
83
- "-y",
84
- "ai-cli-mcp@latest"
85
- ],
86
- "env": {
87
- "CLAUDE_CLI_NAME": "claude-custom",
88
- "CODEX_CLI_NAME": "codex-custom"
89
- }
90
- },
91
- ```
92
-
93
85
  ## Important First-Time Setup
94
86
 
95
87
  ### For Claude CLI:
@@ -123,29 +115,9 @@ macOS might ask for folder permissions the first time any of these tools run. If
123
115
 
124
116
  ## Connecting to Your MCP Client
125
117
 
126
- After setting up the server, you need to configure your MCP client (like Cursor or others that use `mcp.json` or `mcp_config.json`).
118
+ After setting up the server, add the configuration to your MCP client's settings file (e.g., `mcp.json` for Cursor, `mcp_config.json` for Windsurf).
127
119
 
128
- ### MCP Configuration File
129
-
130
- The configuration is typically done in a JSON file. The name and location can vary depending on your client.
131
-
132
- #### Cursor
133
-
134
- Cursor uses `mcp.json`.
135
- - **macOS:** `~/.cursor/mcp.json`
136
- - **Windows:** `%APPDATA%\\Cursor\\mcp.json`
137
- - **Linux:** `~/.config/cursor/mcp.json`
138
-
139
- #### Windsurf
140
-
141
- Windsurf users use `mcp_config.json`
142
- - **macOS:** `~/.codeium/windsurf/mcp_config.json`
143
- - **Windows:** `%APPDATA%\\Codeium\\windsurf\\mcp_config.json`
144
- - **Linux:** `~/.config/.codeium/windsurf/mcp_config.json`
145
-
146
- (Note: In some mixed setups, if Cursor is also installed, these clients might fall back to using Cursor's `~/.cursor/mcp.json` path. Prioritize the Codeium-specific paths if using the Codeium extension.)
147
-
148
- Create this file if it doesn't exist. Add or update the configuration for `ai-cli-mcp`:
120
+ If the file doesn't exist, create it and add the `ai-cli-mcp` configuration.
149
121
 
150
122
  ## Tools Provided
151
123
 
@@ -159,12 +131,21 @@ Executes a prompt using Claude CLI, Codex CLI, or Gemini CLI. The appropriate CL
159
131
  - `prompt` (string, optional): The prompt to send to the AI agent. Either `prompt` or `prompt_file` is required.
160
132
  - `prompt_file` (string, optional): Path to a file containing the prompt. Either `prompt` or `prompt_file` is required. Can be absolute path or relative to `workFolder`.
161
133
  - `workFolder` (string, required): The working directory for the CLI execution. Must be an absolute path.
162
- - `model` (string, optional): The model to use:
163
- - Claude models: "sonnet", "opus", "haiku"
164
- - Codex models: "gpt-5.2-codex", "gpt-5.1-codex-mini", "gpt-5.1-codex-max", "gpt-5.2", "gpt-5.1", "gpt-5.1-codex", "gpt-5-codex", "gpt-5-codex-mini", "gpt-5"
165
- - Gemini models: "gemini-2.5-pro", "gemini-2.5-flash", "gemini-3-pro-preview"
134
+ **Models:**
135
+ - **Ultra Aliases:** `claude-ultra`, `codex-ultra` (defaults to high-reasoning), `gemini-ultra`
136
+ - Claude: `sonnet`, `opus`, `haiku`
137
+ - Codex: `gpt-5.2-codex`, `gpt-5.1-codex-mini`, `gpt-5.1-codex-max`, `gpt-5.2`, `gpt-5.1`, `gpt-5`
138
+ - Gemini: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`
166
139
  - `reasoning_effort` (string, optional): Codex only. Sets `model_reasoning_effort` (allowed: "low", "medium", "high").
167
- - `session_id` (string, optional): Optional session ID to resume a previous session. Supported for: haiku, sonnet, opus, gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview.
140
+ - `session_id` (string, optional): Optional session ID to resume a previous session. Supported for: haiku, sonnet, opus, gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview, gemini-3-flash-preview.
141
+
142
+ ### `wait`
143
+
144
+ Waits for multiple AI agent processes to complete and returns their combined results. Blocks until all specified PIDs finish or a timeout occurs.
145
+
146
+ **Arguments:**
147
+ - `pids` (array of numbers, required): List of process IDs to wait for (returned by the `run` tool).
148
+ - `timeout` (number, optional): Maximum wait time in seconds. Defaults to 180 (3 minutes).
168
149
 
169
150
  ### `list_processes`
170
151
 
@@ -184,43 +165,6 @@ Terminates a running AI agent process by PID.
184
165
  **Arguments:**
185
166
  - `pid` (number, required): The process ID to terminate.
186
167
 
187
- **Example with Claude:**
188
- ```json
189
- {
190
- "toolName": "run",
191
- "arguments": {
192
- "prompt": "Refactor the function foo in main.py to be async.",
193
- "workFolder": "/Users/username/my_project",
194
- "model": "sonnet"
195
- }
196
- }
197
- ```
198
-
199
- **Example with Codex:**
200
- ```json
201
- {
202
- "toolName": "run",
203
- "arguments": {
204
- "prompt": "Create a REST API with Express.js",
205
- "workFolder": "/Users/username/my_project",
206
- "model": "gpt-5.2-codex",
207
- "reasoning_effort": "high"
208
- }
209
- }
210
- ```
211
-
212
- **Example with Gemini:**
213
- ```json
214
- {
215
- "toolName": "run",
216
- "arguments": {
217
- "prompt": "Generate unit tests for the Calculator class",
218
- "workFolder": "/Users/username/my_project",
219
- "model": "gemini-2.5-pro"
220
- }
221
- }
222
- ```
223
-
224
168
  ### Examples
225
169
 
226
170
  Here are some visual examples of the server in action:
@@ -348,7 +292,7 @@ This will open a web interface where you can:
348
292
  3. Test different AI models including:
349
293
  - Claude models: `sonnet`, `opus`, `haiku`
350
294
  - Codex models: `gpt-5.2-codex`, `gpt-5.1-codex-mini`, `gpt-5.1-codex-max`, `gpt-5.2`, `gpt-5.1`, `gpt-5.1-codex`, `gpt-5-codex`, `gpt-5-codex-mini`, `gpt-5`
351
- - Gemini models: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-3-pro-preview`
295
+ - Gemini models: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-3-pro-preview`, `gemini-3-flash-preview`
352
296
 
353
297
  Example test: Select the `run` tool and provide:
354
298
  - `prompt`: "What is 2+2?"
@@ -371,6 +315,36 @@ Contributions are welcome! Please refer to the [Local Installation & Development
371
315
 
372
316
  Submit issues and pull requests to the [GitHub repository](https://github.com/mkXultra/claude-code-mcp).
373
317
 
318
+ ## Advanced Configuration (Optional)
319
+
320
+ Normally not required, but useful for customizing CLI paths or debugging.
321
+
322
+ - `CLAUDE_CLI_NAME`: Override the Claude CLI binary name or provide an absolute path (default: `claude`)
323
+ - `CODEX_CLI_NAME`: Override the Codex CLI binary name or provide an absolute path (default: `codex`)
324
+ - `GEMINI_CLI_NAME`: Override the Gemini CLI binary name or provide an absolute path (default: `gemini`)
325
+ - `MCP_CLAUDE_DEBUG`: Enable debug logging (set to `true` for verbose output)
326
+
327
+ **CLI Name Specification:**
328
+ - Command name only: `CLAUDE_CLI_NAME=claude-custom`
329
+ - Absolute path: `CLAUDE_CLI_NAME=/path/to/custom/claude`
330
+ *Relative paths are not supported.*
331
+
332
+ ### Example with custom CLI binaries:
333
+
334
+ ```json
335
+ "ai-cli-mcp": {
336
+ "command": "npx",
337
+ "args": [
338
+ "-y",
339
+ "ai-cli-mcp@latest"
340
+ ],
341
+ "env": {
342
+ "CLAUDE_CLI_NAME": "claude-custom",
343
+ "CODEX_CLI_NAME": "codex-custom"
344
+ }
345
+ },
346
+ ```
347
+
374
348
  ## License
375
349
 
376
350
  MIT