@darkiceinteractive/mcp-conductor 3.0.0-beta.2 → 3.1.1

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.
Files changed (129) hide show
  1. package/README.md +168 -286
  2. package/dist/bin/cli.d.ts +2 -2
  3. package/dist/bin/cli.js +37 -14
  4. package/dist/bin/cli.js.map +1 -1
  5. package/dist/bridge/http-server.d.ts.map +1 -1
  6. package/dist/bridge/http-server.js +11 -5
  7. package/dist/bridge/http-server.js.map +1 -1
  8. package/dist/cache/disk.d.ts.map +1 -1
  9. package/dist/cache/disk.js +36 -3
  10. package/dist/cache/disk.js.map +1 -1
  11. package/dist/cli/clients/adapter.d.ts +103 -0
  12. package/dist/cli/clients/adapter.d.ts.map +1 -0
  13. package/dist/cli/clients/adapter.js +24 -0
  14. package/dist/cli/clients/adapter.js.map +1 -0
  15. package/dist/cli/clients/claude-code.d.ts +15 -0
  16. package/dist/cli/clients/claude-code.d.ts.map +1 -0
  17. package/dist/cli/clients/claude-code.js +110 -0
  18. package/dist/cli/clients/claude-code.js.map +1 -0
  19. package/dist/cli/clients/claude-desktop.d.ts +26 -0
  20. package/dist/cli/clients/claude-desktop.d.ts.map +1 -0
  21. package/dist/cli/clients/claude-desktop.js +118 -0
  22. package/dist/cli/clients/claude-desktop.js.map +1 -0
  23. package/dist/cli/clients/cline.d.ts +40 -0
  24. package/dist/cli/clients/cline.d.ts.map +1 -0
  25. package/dist/cli/clients/cline.js +134 -0
  26. package/dist/cli/clients/cline.js.map +1 -0
  27. package/dist/cli/clients/codex.d.ts +30 -0
  28. package/dist/cli/clients/codex.d.ts.map +1 -0
  29. package/dist/cli/clients/codex.js +176 -0
  30. package/dist/cli/clients/codex.js.map +1 -0
  31. package/dist/cli/clients/continue.d.ts +41 -0
  32. package/dist/cli/clients/continue.d.ts.map +1 -0
  33. package/dist/cli/clients/continue.js +150 -0
  34. package/dist/cli/clients/continue.js.map +1 -0
  35. package/dist/cli/clients/cursor.d.ts +20 -0
  36. package/dist/cli/clients/cursor.d.ts.map +1 -0
  37. package/dist/cli/clients/cursor.js +110 -0
  38. package/dist/cli/clients/cursor.js.map +1 -0
  39. package/dist/cli/clients/gemini-cli.d.ts +42 -0
  40. package/dist/cli/clients/gemini-cli.d.ts.map +1 -0
  41. package/dist/cli/clients/gemini-cli.js +169 -0
  42. package/dist/cli/clients/gemini-cli.js.map +1 -0
  43. package/dist/cli/clients/index.d.ts +28 -0
  44. package/dist/cli/clients/index.d.ts.map +1 -0
  45. package/dist/cli/clients/index.js +44 -0
  46. package/dist/cli/clients/index.js.map +1 -0
  47. package/dist/cli/clients/kimi-code.d.ts +33 -0
  48. package/dist/cli/clients/kimi-code.d.ts.map +1 -0
  49. package/dist/cli/clients/kimi-code.js +177 -0
  50. package/dist/cli/clients/kimi-code.js.map +1 -0
  51. package/dist/cli/clients/opencode.d.ts +21 -0
  52. package/dist/cli/clients/opencode.d.ts.map +1 -0
  53. package/dist/cli/clients/opencode.js +150 -0
  54. package/dist/cli/clients/opencode.js.map +1 -0
  55. package/dist/cli/clients/registry.d.ts +51 -0
  56. package/dist/cli/clients/registry.d.ts.map +1 -0
  57. package/dist/cli/clients/registry.js +169 -0
  58. package/dist/cli/clients/registry.js.map +1 -0
  59. package/dist/cli/clients/zed.d.ts +41 -0
  60. package/dist/cli/clients/zed.d.ts.map +1 -0
  61. package/dist/cli/clients/zed.js +171 -0
  62. package/dist/cli/clients/zed.js.map +1 -0
  63. package/dist/cli/commands/doctor.d.ts +27 -0
  64. package/dist/cli/commands/doctor.d.ts.map +1 -1
  65. package/dist/cli/commands/doctor.js +71 -0
  66. package/dist/cli/commands/doctor.js.map +1 -1
  67. package/dist/cli/commands/export-servers.d.ts +60 -0
  68. package/dist/cli/commands/export-servers.d.ts.map +1 -1
  69. package/dist/cli/commands/export-servers.js +85 -1
  70. package/dist/cli/commands/export-servers.js.map +1 -1
  71. package/dist/cli/commands/import-servers.d.ts +13 -2
  72. package/dist/cli/commands/import-servers.d.ts.map +1 -1
  73. package/dist/cli/commands/import-servers.js +42 -5
  74. package/dist/cli/commands/import-servers.js.map +1 -1
  75. package/dist/cli/wizard/setup.d.ts +29 -3
  76. package/dist/cli/wizard/setup.d.ts.map +1 -1
  77. package/dist/cli/wizard/setup.js +204 -7
  78. package/dist/cli/wizard/setup.js.map +1 -1
  79. package/dist/config/defaults.d.ts.map +1 -1
  80. package/dist/config/defaults.js +1 -0
  81. package/dist/config/defaults.js.map +1 -1
  82. package/dist/config/loader.d.ts +10 -1
  83. package/dist/config/loader.d.ts.map +1 -1
  84. package/dist/config/loader.js +14 -24
  85. package/dist/config/loader.js.map +1 -1
  86. package/dist/config/schema.d.ts +7 -0
  87. package/dist/config/schema.d.ts.map +1 -1
  88. package/dist/daemon/client.d.ts.map +1 -1
  89. package/dist/daemon/client.js +14 -6
  90. package/dist/daemon/client.js.map +1 -1
  91. package/dist/daemon/server.d.ts +9 -0
  92. package/dist/daemon/server.d.ts.map +1 -1
  93. package/dist/daemon/server.js +80 -9
  94. package/dist/daemon/server.js.map +1 -1
  95. package/dist/metrics/index.d.ts +1 -1
  96. package/dist/metrics/index.d.ts.map +1 -1
  97. package/dist/metrics/index.js +1 -1
  98. package/dist/metrics/index.js.map +1 -1
  99. package/dist/metrics/metrics-collector.d.ts +120 -0
  100. package/dist/metrics/metrics-collector.d.ts.map +1 -1
  101. package/dist/metrics/metrics-collector.js +136 -0
  102. package/dist/metrics/metrics-collector.js.map +1 -1
  103. package/dist/runtime/pool/recycle.d.ts +8 -2
  104. package/dist/runtime/pool/recycle.d.ts.map +1 -1
  105. package/dist/runtime/pool/recycle.js.map +1 -1
  106. package/dist/runtime/pool/worker-pool.d.ts.map +1 -1
  107. package/dist/runtime/pool/worker-pool.js +17 -10
  108. package/dist/runtime/pool/worker-pool.js.map +1 -1
  109. package/dist/runtime/pool/worker.d.ts +7 -1
  110. package/dist/runtime/pool/worker.d.ts.map +1 -1
  111. package/dist/runtime/pool/worker.js +9 -1
  112. package/dist/runtime/pool/worker.js.map +1 -1
  113. package/dist/server/mcp-server.d.ts +15 -3
  114. package/dist/server/mcp-server.d.ts.map +1 -1
  115. package/dist/server/mcp-server.js +81 -7
  116. package/dist/server/mcp-server.js.map +1 -1
  117. package/dist/utils/backup.d.ts +24 -0
  118. package/dist/utils/backup.d.ts.map +1 -0
  119. package/dist/utils/backup.js +40 -0
  120. package/dist/utils/backup.js.map +1 -0
  121. package/dist/utils/tokenize.d.ts +8 -0
  122. package/dist/utils/tokenize.d.ts.map +1 -1
  123. package/dist/utils/tokenize.js +8 -0
  124. package/dist/utils/tokenize.js.map +1 -1
  125. package/dist/version.d.ts +3 -3
  126. package/dist/version.d.ts.map +1 -1
  127. package/dist/version.js +3 -3
  128. package/dist/version.js.map +1 -1
  129. package/package.json +23 -2
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MCP Conductor
2
2
 
3
- **99.7% fewer tokens. Parallel execution. One `npx` command.**
3
+ **The canonical MCP hub for any agent platform. 99.7% fewer tokens. One `npx` command.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@darkiceinteractive/mcp-conductor.svg?style=flat)](https://www.npmjs.com/package/@darkiceinteractive/mcp-conductor)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@darkiceinteractive/mcp-conductor.svg?style=flat)](https://www.npmjs.com/package/@darkiceinteractive/mcp-conductor)
@@ -8,56 +8,49 @@
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
9
  [![Deno](https://img.shields.io/badge/runtime-Deno%202.x-black?logo=deno)](https://deno.land)
10
10
 
11
- MCP Conductor is a single MCP server that orchestrates all your other MCP servers through a sandboxed Deno runtime. Instead of Claude making direct tool calls (and dumping every intermediate result into your context window), Claude writes TypeScript code that runs in an isolated sandbox. Only the final result comes back.
11
+ MCP Conductor is a single MCP server that orchestrates all your other MCP servers through a sandboxed Deno runtime. Works with Claude Code, Claude Desktop, Cursor, Gemini CLI, Codex CLI, Cline, Zed, Continue.dev, OpenCode, and Kimi Code. Instead of your AI client making direct tool calls (and dumping every intermediate result into your context window), it writes TypeScript code that runs in an isolated sandbox. Only the final result comes back.
12
12
 
13
13
  ```
14
- Before: 153,900 tokens → Claude context window → 153,900 tokens billed
15
- After: 153,900 tokens → Deno sandbox → 435 tokens → Claude context window
14
+ Before: 153,900 tokens → AI client context window → 153,900 tokens billed
15
+ After: 153,900 tokens → Deno sandbox → 435 tokens → AI client context window
16
16
  ```
17
17
 
18
18
  **Average measured reduction: 99.7%. Verified against Anthropic's published benchmarks.**
19
19
 
20
20
  ---
21
21
 
22
- ## What's New in v3 (beta)
22
+ ## Quick Install
23
23
 
24
- v3 is a ground-up registry-driven architecture. Every backend tool is described, validated, and type-generated at startup. New workstreams add production-grade reliability, caching, observability, and multi-agent coordination.
24
+ ### v3.1.1 Supported Clients
25
25
 
26
- | Workstream | Feature | Docs |
27
- |---|---|---|
28
- | Phase 1 | Tool Registry schema validation, hot-reload, type generation | [architecture](./docs/v3/architecture.md) |
29
- | Phase 2 | Response cache — LRU + CBOR serialisation, TTL per tool | [configuration](./docs/v3/configuration.md) |
30
- | Phase 3 | Reliability gateway timeout, retry, circuit breaker | [architecture](./docs/v3/architecture.md) |
31
- | Phase 4 | Connection pool + warm sandbox pool | [configuration](./docs/v3/configuration.md) |
32
- | Phase 5 | Sandbox API — `compact`, `summarize`, `findTool`, `budget` | [sandbox-api](./docs/v3/sandbox-api.md) |
33
- | Phase 6 | Daemon mode, shared KV store, distributed lock | [configuration](./docs/v3/configuration.md) |
34
- | Phase 7 | Structured observability, session replay | [architecture](./docs/v3/architecture.md) |
35
- | X1 | Passthrough adapter expose backend tools directly | [recipes](./docs/v3/recipes.md) |
36
- | X2 | Lifecycle tools, CLI wizard | [sandbox-api](./docs/v3/sandbox-api.md) |
37
- | X4 | PII tokenisation, response redaction | [configuration](./docs/v3/configuration.md) |
38
-
39
- Migrating from v2? See the [migration guide](./docs/v3/migration.md).
40
-
41
- ---
26
+ | Client | Config path (macOS) | Config path (Linux) | Config path (Windows) |
27
+ |---|---|---|---|
28
+ | Claude Code | `~/.claude/settings.json` | `~/.claude/settings.json` | `%APPDATA%\Claude Code\claude_code_config.json` |
29
+ | Claude Desktop | `~/Library/Application Support/Claude/claude_desktop_config.json` | `~/.config/claude/claude_desktop_config.json` | `%APPDATA%\Claude\claude_desktop_config.json` |
30
+ | Cursor | `~/.cursor/mcp.json` | `~/.cursor/mcp.json` | `~/.cursor/mcp.json` |
31
+ | Gemini CLI | `~/.gemini/settings.json` | `~/.gemini/settings.json` | `~/.gemini/settings.json` |
32
+ | Codex CLI | `~/.codex/config.toml` | `~/.codex/config.toml` | `~/.codex/config.toml` |
33
+ | Cline | `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` | `~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json` | `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json` |
34
+ | Zed | `~/Library/Application Support/Zed/settings.json` | `~/.config/zed/settings.json` | `%LOCALAPPDATA%\Zed\settings.json` |
35
+ | Continue.dev | `~/.continue/config.yaml` | `~/.continue/config.yaml` | `~/.continue/config.yaml` |
36
+ | OpenCode | `~/.config/opencode/opencode.json` | `~/.config/opencode/opencode.json` | `%APPDATA%\opencode\opencode.json` |
37
+ | Kimi Code | `~/Library/Application Support/Kimi Code/mcp_settings.json` | `~/.config/kimi-code/mcp_settings.json` | `%APPDATA%\Kimi Code\mcp_settings.json` |
42
38
 
43
- ## Quick Start
39
+ ### Guided Setup (recommended)
44
40
 
45
- ### 1. Install Deno
41
+ The setup wizard auto-detects every supported client on your machine and offers per-client consolidation:
46
42
 
47
43
  ```bash
48
- # macOS
49
- brew install deno
44
+ npx -y @darkiceinteractive/mcp-conductor-cli@next setup
45
+ ```
50
46
 
51
- # Linux
52
- curl -fsSL https://deno.land/install.sh | sh
47
+ See [What the wizard does](#what-the-wizard-does) below.
53
48
 
54
- # Windows
55
- winget install DenoLand.Deno
56
- ```
49
+ ### Manual Config Snippets
57
50
 
58
- ### 2. Add to Your AI Tool
51
+ Paste the appropriate block into your client's config file. The wizard does this automatically.
59
52
 
60
- **Claude Code** (`~/.claude/settings.json`), **Claude Desktop**, **Gemini CLI** (`~/.gemini/settings.json`), **Kimi CLI** (`~/.kimi/mcp.json`), **Cursor** (`.cursor/mcp.json`), **Windsurf** (`~/.codeium/windsurf/mcp_config.json`), **Cline**, or **VS Code** (`.vscode/mcp.json`):
53
+ **Claude Code** (`~/.claude/settings.json`):
61
54
 
62
55
  ```json
63
56
  {
@@ -70,333 +63,222 @@ winget install DenoLand.Deno
70
63
  }
71
64
  ```
72
65
 
73
- **OpenAI Codex** (`~/.codex/config.toml`):
74
-
75
- ```toml
76
- [mcp_servers.mcp-conductor]
77
- command = "npx"
78
- args = ["-y", "@darkiceinteractive/mcp-conductor"]
79
- ```
80
-
81
- > **Note:** VS Code uses `"servers"` instead of `"mcpServers"` and requires `"type": "stdio"`. See the [full multi-platform guide](./docs/guide/mcp-clients.md) for exact config per platform.
82
-
83
- ### 3. Restart Your AI Tool
84
-
85
- That's it. Ask your AI to list MCP servers — you should see `mcp-conductor` with its tools.
86
-
87
- ---
88
-
89
- ## What This Solves
90
-
91
- When Claude calls MCP tools directly, every response lands in the context window — raw JSON, file metadata, pagination objects, fields you never asked for. A single GitHub `list_issues` call can return 40,000+ tokens. If you're making 10 calls per task, that's 400,000 tokens before Claude has written a single line of code.
92
-
93
- MCP Conductor flips the model: Claude writes TypeScript code that *processes* the tool responses inside a Deno sandbox. The sandbox can call any connected MCP server, filter and aggregate the results, and return only the compact summary. Your context window stays small. Your costs stay low.
94
-
95
- ```typescript
96
- // This runs inside the Deno sandbox — not in Claude's context window
97
- const [issues, files] = await mcp.batch([
98
- () => mcp.server('github').call('list_issues', { owner: 'myorg', repo: 'myrepo', state: 'open' }),
99
- () => mcp.server('filesystem').call('list_directory', { path: '/src' })
100
- ]);
101
-
102
- return {
103
- openBugs: issues.filter(i => i.labels.some(l => l.name === 'bug')).length,
104
- tsFiles: files.filter(f => f.name.endsWith('.ts')).length
105
- };
106
- // Returns: {"openBugs": 12, "tsFiles": 47} ← under 100 tokens
107
- ```
108
-
109
- ---
66
+ **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
110
67
 
111
- ## How It Works
112
-
113
- ```
114
- Claude
115
- └── execute_code (writes TypeScript)
116
- └── Deno Sandbox (50ms startup, <50MB RAM)
117
- ├── mcp.server('github').call(...) ← your MCP servers
118
- ├── mcp.server('filesystem').call(...) ← hidden from Claude
119
- └── mcp.server('brave-search').call(...)
120
- └── return { compact: "summary" } → back to Claude
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "mcp-conductor": {
72
+ "command": "npx",
73
+ "args": ["-y", "@darkiceinteractive/mcp-conductor"]
74
+ }
75
+ }
76
+ }
121
77
  ```
122
78
 
123
- The Deno sandbox runs with minimal permissions:
124
- - Network: localhost bridge only
125
- - No filesystem access (MCP handles that)
126
- - No environment variable access
127
- - No subprocess spawning
128
-
129
- **Why Deno?** 50ms cold start vs 500ms–2s for Docker, under 50MB vs 200MB+ memory overhead, TypeScript natively, granular permission model.
130
-
131
- ---
132
-
133
- ## Adding Your Servers
134
-
135
- Create `~/.mcp-conductor.json` to register backend servers:
79
+ **Cursor** (`~/.cursor/mcp.json`):
136
80
 
137
81
  ```json
138
82
  {
139
- "exclusive": true,
140
- "servers": {
141
- "filesystem": {
142
- "command": "npx",
143
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/yourname"],
144
- "env": {}
145
- },
146
- "github": {
147
- "command": "npx",
148
- "args": ["-y", "@modelcontextprotocol/server-github"],
149
- "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "your-token" }
150
- },
151
- "brave-search": {
152
- "command": "npx",
153
- "args": ["-y", "@brave/brave-search-mcp-server", "--transport", "stdio"],
154
- "env": { "BRAVE_API_KEY": "your-key" },
155
- "rateLimit": {
156
- "requestsPerSecond": 20,
157
- "burstSize": 20,
158
- "onLimitExceeded": "queue",
159
- "maxQueueTimeMs": 30000
160
- }
161
- },
162
- "memory": {
83
+ "mcpServers": {
84
+ "mcp-conductor": {
163
85
  "command": "npx",
164
- "args": ["-y", "@modelcontextprotocol/server-memory"],
165
- "env": {}
86
+ "args": ["-y", "@darkiceinteractive/mcp-conductor"]
166
87
  }
167
88
  }
168
89
  }
169
90
  ```
170
91
 
171
- Set `"exclusive": true` to route *all* MCP calls through the sandbox. This is the recommended setting for maximum token savingsClaude cannot bypass the conductor.
92
+ For Codex CLI (TOML), Continue.dev (YAML), and other formats, use `mcp-conductor-cli export --client <id>`see [Multi-client export](#multi-client-export).
172
93
 
173
- **Hot reload:** Edit the file and save. Changes apply in ~500ms, no restart needed.
94
+ Restart your AI tool after editing the config. That's it.
174
95
 
175
96
  ---
176
97
 
177
- ## The `mcp` API
98
+ ## What the Wizard Does
178
99
 
179
- Inside `execute_code`, you have access to the `mcp` object:
100
+ Running `npx -y @darkiceinteractive/mcp-conductor-cli@next setup` steps through the following for each detected client:
180
101
 
181
- ```typescript
182
- // Call a server tool
183
- const result = await mcp.server('github').call('list_issues', { owner: 'org', repo: 'repo' });
184
-
185
- // Parallel executionexecutes all calls simultaneously.
186
- // Two call shapes are supported:
187
- //
188
- // 1. Callback form (composable, no rate-limit detection):
189
- const [issues, files, searches] = await mcp.batch([
190
- () => mcp.server('github').call('list_issues', { owner: 'org', repo: 'repo' }),
191
- () => mcp.server('filesystem').call('list_directory', { path: '/src' }),
192
- () => mcp.server('brave-search').call('search', { q: 'topic', count: 5 })
193
- ]);
102
+ 1. **Scan** — discovers all 10 client config locations on your machine (global and project-local).
103
+ 2. **Diff** for each existing config, parses the current server list and shows what will move.
104
+ 3. **Confirm per-client** prompts once per client; you can skip any client individually.
105
+ 4. **Write conductor config** — merges your existing servers into `~/.mcp-conductor.json` and installs the conductor entry back into the client config.
106
+ 5. **Backup originals**creates a timestamped `.bak.YYYYMMDDHHMMSS` copy of every config file before modifying it.
194
107
 
195
- // 2. Descriptor form (rate-limit aware, retries on 429s):
196
- const [a, b] = await mcp.batch([
197
- { server: 'github', tool: 'list_issues', params: { owner: 'org', repo: 'repo' } },
198
- { server: 'filesystem', tool: 'list_directory', params: { path: '/src' } },
199
- ]);
108
+ In non-interactive environments (CI, piped stdin) the wizard proceeds automatically with safe defaults.
200
109
 
201
- // Batch web searches (handles rate limits automatically)
202
- const results = await mcp.batchSearch(['query 1', 'query 2', 'query 3'], { topN: 3 });
110
+ ---
203
111
 
204
- // Progress updates (visible in Claude)
205
- mcp.progress('Processing 500 files...');
112
+ ## Verifying Setup
206
113
 
207
- // Debug logging
208
- console.log('issue count:', issues.length);
114
+ ```bash
115
+ mcp-conductor-cli doctor
209
116
  ```
210
117
 
211
- ---
212
-
213
- ## Measuring Your Savings
118
+ The `doctor` command runs a health check across all configured servers and prints an **MCP CLIENT COVERAGE** section showing every detected client config with an `[OK]` or `[MISSING]` status for the conductor entry.
214
119
 
215
- After any workflow, ask Claude to call `get_metrics`:
216
-
217
- ```json
218
- {
219
- "totalExecutions": 47,
220
- "averageCompressionRatio": 0.943,
221
- "totalTokensSaved": 1847230,
222
- "averageExecutionMs": 73,
223
- "lastExecution": {
224
- "compressionRatio": 0.978,
225
- "tokensSaved": 44200,
226
- "inputTokens": 45000,
227
- "outputTokens": 800
228
- }
229
- }
120
+ ```
121
+ MCP CLIENT COVERAGE
122
+ [OK] Claude Code ~/.claude/settings.json
123
+ [OK] Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json
124
+ [OK] Cursor ~/.cursor/mcp.json
125
+ [MISSING] Zed ~/Library/Application Support/Zed/settings.json
230
126
  ```
231
127
 
232
- `compressionRatio: 0.978` means 97.8% of tokens were processed inside the sandbox rather than billed to your context window. `totalTokensSaved: 1,847,230` is the cumulative count across all 47 executions.
128
+ Run `npx -y @darkiceinteractive/mcp-conductor-cli@next setup` to install the conductor entry in any `[MISSING]` client.
233
129
 
234
130
  ---
235
131
 
236
- ## MCP Tools Available to Claude
237
-
238
- | Tool | Description |
239
- |------|-------------|
240
- | `execute_code` | Run TypeScript in the Deno sandbox with MCP server access |
241
- | `list_servers` | List all connected backend servers |
242
- | `discover_tools` | Search for tools across all servers |
243
- | `get_metrics` | Session statistics and compression ratios |
244
- | `set_mode` | Switch between `execution`, `passthrough`, or `hybrid` mode |
245
- | `compare_modes` | Compare how a task runs in each mode |
246
- | `add_server` | Add a server to the conductor config at runtime |
247
- | `remove_server` | Remove a server at runtime |
248
- | `update_server` | Update a server's config (e.g. rotate an API key) without restart |
249
- | `reload_servers` | Reload config after manual edits |
250
- | `passthrough_call` | Make a direct tool call (high token cost — debug only) |
251
-
252
- ---
132
+ ## Multi-client Export
253
133
 
254
- ## CLI Reference
134
+ Generate a ready-to-paste config snippet for any supported client:
255
135
 
256
136
  ```bash
257
- # Check system requirements (Node, Deno, Claude config)
258
- mcp-conductor-cli check
137
+ # Codex CLI writes TOML
138
+ mcp-conductor-cli export --client codex
259
139
 
260
- # Show current configuration status
261
- mcp-conductor-cli status
140
+ # Continue.dev writes YAML
141
+ mcp-conductor-cli export --client continue
262
142
 
263
- # Enable exclusive mode (migrates servers to ~/.mcp-conductor.json)
264
- mcp-conductor-cli enable-exclusive [--dry-run]
265
-
266
- # Disable exclusive mode (restores servers to Claude config)
267
- mcp-conductor-cli disable-exclusive [--dry-run]
268
-
269
- # Add/remove/list servers in conductor config
270
- mcp-conductor-cli config add <name> <command> [args...]
271
- mcp-conductor-cli config remove <name>
272
- mcp-conductor-cli config servers
143
+ # Claude Desktop writes JSON (default)
144
+ mcp-conductor-cli export --client claude-desktop
145
+ ```
273
146
 
274
- # Manage Claude Code permissions (auto-allow all MCP tools)
275
- mcp-conductor-cli permissions discover --new-only
276
- mcp-conductor-cli permissions add [--scope project]
147
+ The exported file is written to the current directory as `<client>-config.<ext>`. Pass `--output <path>` to override.
277
148
 
278
- # Install CLAUDE.md to teach Claude to use execute_code
279
- mcp-conductor-cli install-instructions --dir /path/to/project
280
- ```
149
+ Full client setup documentation is at **[docs.darkice.co/setup/clients](https://docs.darkice.co/setup/clients)**.
281
150
 
282
151
  ---
283
152
 
284
- ## Recipes
285
-
286
- ### Parallel GitHub + Filesystem analysis
153
+ ## 30-Second Example
287
154
 
288
155
  ```typescript
289
- mcp.progress('Fetching issues and scanning codebase...');
156
+ // Your AI client writes this code, which runs inside the Deno sandbox
290
157
  const [issues, files] = await mcp.batch([
291
- () => mcp.server('github').call('list_issues', { owner: 'myorg', repo: 'myrepo', state: 'open', per_page: 100 }),
292
- () => mcp.server('filesystem').call('search_files', { path: '/src', pattern: '*.ts' })
158
+ () => mcp.server('github').call('list_issues', { owner: 'myorg', repo: 'myrepo', state: 'open' }),
159
+ () => mcp.server('filesystem').call('list_directory', { path: '/src' })
293
160
  ]);
161
+
294
162
  return {
295
163
  openBugs: issues.filter(i => i.labels.some(l => l.name === 'bug')).length,
296
- tsFileCount: files.length
164
+ tsFiles: files.filter(f => f.name.endsWith('.ts')).length
297
165
  };
166
+ // Returns: {"openBugs": 12, "tsFiles": 47} ← under 100 tokens
298
167
  ```
299
168
 
300
- ### Parallel web research
169
+ ---
301
170
 
302
- ```typescript
303
- const topics = ['MCP protocol 2026', 'Deno performance benchmarks', 'token optimization AI'];
304
- const results = await mcp.batch(
305
- topics.map(q => () => mcp.server('brave-search').call('search', { q, count: 5 }))
306
- );
307
- return results.map((r, i) => ({ topic: topics[i], topResult: r[0]?.title, url: r[0]?.url }));
308
- ```
171
+ ## Why It Matters
309
172
 
310
- ### Cross-session memory persistence
173
+ When an AI client calls MCP tools directly, every response lands in the context window — raw JSON, file metadata, pagination objects, fields you never asked for. A single GitHub `list_issues` call can return 40,000+ tokens. If you're making 10 calls per task, that's 400,000 tokens before the model has written a single line of code.
311
174
 
312
- ```typescript
313
- // Session 1: store results
314
- const analysis = { /* ... your analysis ... */ };
315
- await mcp.server('memory').call('store', { key: 'weekly-audit', value: analysis });
316
- return analysis;
317
-
318
- // Session 2: retrieve and compare
319
- const previous = await mcp.server('memory').call('retrieve', { key: 'weekly-audit' });
320
- // diff previous vs current...
321
- ```
175
+ MCP Conductor flips the model: the client writes TypeScript code that *processes* the tool responses inside a Deno sandbox. The sandbox can call any connected MCP server, filter and aggregate the results, and return only the compact summary. Your context window stays small. Your costs stay low.
176
+
177
+ | Scenario | Without Conductor | With Conductor | Reduction |
178
+ |---|---|---|---|
179
+ | 300-document Drive pipeline | 153,900 tokens | 435 tokens | **99.72%** |
180
+ | GitHub issues triage (10 repos) | ~400,000 tokens | ~2,000 tokens | **99.5%** |
181
+ | Web research (5 searches) | ~50,000 tokens | ~800 tokens | **98.4%** |
322
182
 
323
183
  ---
324
184
 
325
- ## Troubleshooting
185
+ ## v3 Highlights
326
186
 
327
- **"Deno not found"** Install Deno, then `source ~/.zshrc` (or open a new terminal). Verify with `deno --version`.
187
+ | Feature | What it does | Docs |
188
+ |---|---|---|
189
+ | Tool Registry | Schema validation, hot-reload, type generation | [Architecture](https://docs.darkice.co/docs/v3/architecture) |
190
+ | Response Cache | LRU + CBOR serialisation, TTL per tool | [Configuration](https://docs.darkice.co/docs/v3/configuration) |
191
+ | Reliability Gateway | Timeout, retry, circuit breaker | [Architecture](https://docs.darkice.co/docs/v3/architecture) |
192
+ | Connection Pool | Warm sandbox pool, persistent server connections | [Configuration](https://docs.darkice.co/docs/v3/configuration) |
193
+ | Sandbox API | `compact`, `summarize`, `findTool`, `budget` | [Sandbox API](https://docs.darkice.co/docs/v3/sandbox-api) |
194
+ | Daemon Mode | Shared KV store, distributed lock | [Configuration](https://docs.darkice.co/docs/v3/configuration) |
195
+ | Observability | Cost predictor, hot-path profiler, session replay | [Architecture](https://docs.darkice.co/docs/v3/architecture) |
196
+ | Passthrough Adapter | Expose backend tools directly (X1) | [Recipes](https://docs.darkice.co/docs/v3/recipes) |
197
+ | Lifecycle Tools + CLI | `import_servers_from_claude`, setup wizard (X2) | [Sandbox API](https://docs.darkice.co/docs/v3/sandbox-api) |
198
+ | PII Tokenisation | Built-in redaction matchers (X4) | [Configuration](https://docs.darkice.co/docs/v3/configuration) |
199
+
200
+ ## v3.1.1 Additions
201
+
202
+ | Feature | What it does |
203
+ |---|---|
204
+ | Multi-client adapters | Read and write configs for all 10 supported clients |
205
+ | Setup wizard (MC3) | Interactive per-client consolidation with backups |
206
+ | Per-client export (MC4) | `export --client <id>` writes the correct format (JSON / TOML / YAML) |
207
+ | Doctor client coverage (MC5) | `doctor` reports `[OK]` / `[MISSING]` per detected client config |
208
+
209
+ Migrating from v2? See the [migration guide](https://docs.darkice.co/docs/v3/migration).
328
210
 
329
- **"Server not connecting"** — Validate your JSON: `cat ~/.mcp-conductor.json | python3 -m json.tool`. Check that env vars are set (not still saying `"your-token"`).
211
+ ---
330
212
 
331
- **"`exclusive` mode not working"** — `"exclusive": true` must be at the root level, not inside `"servers"`.
213
+ ## Token-Savings Reporter
332
214
 
333
- **"Rate limit errors from brave-search"** — Add a `rateLimit` block to the server config (see example above). Set `onLimitExceeded: "queue"` to buffer requests.
215
+ Pass `show_token_savings: true` on any `execute_code` call to see a breakdown:
334
216
 
335
- **"Config changes not applying"** — The file watcher requires valid JSON. If you saved a file with a syntax error, fix it and save again.
217
+ ```json
218
+ {
219
+ "result": { "processed": 300, "with_dates": 287 },
220
+ "tokenSavings": {
221
+ "estimatedPassthroughTokens": 153900,
222
+ "actualExecutionTokens": 435,
223
+ "tokensSaved": 153465,
224
+ "savingsPercent": 99.72
225
+ }
226
+ }
227
+ ```
336
228
 
337
- Full troubleshooting guide: [docs/troubleshooting.md](./docs/troubleshooting.md)
229
+ Or enable it globally in `~/.mcp-conductor.json`:
230
+
231
+ ```json
232
+ {
233
+ "metrics": {
234
+ "alwaysShowTokenSavings": true
235
+ }
236
+ }
237
+ ```
238
+
239
+ Session totals are always available via `get_metrics`.
338
240
 
339
241
  ---
340
242
 
341
- ## Development
243
+ ## Docs
342
244
 
343
- ```bash
344
- git clone https://github.com/darkiceinteractive/mcp-conductor.git
345
- cd mcp-conductor
346
- npm install
347
- npm run build
348
- npm run test:run # 673 tests, 82% coverage
349
- npm run test:coverage # with coverage report
350
- npm run dev # watch mode
351
- ```
245
+ Full documentation at **https://docs.darkice.co** — deploys at D4. In the meantime, all reference material is in [`docs/v3/`](./docs/v3/).
352
246
 
353
- **Requirements:** Node.js 18+, Deno 2.x
247
+ | Guide | Description |
248
+ |-------|-------------|
249
+ | [Architecture](./docs/v3/architecture.md) | System design and data flow |
250
+ | [Configuration](./docs/v3/configuration.md) | All config options |
251
+ | [Sandbox API](./docs/v3/sandbox-api.md) | The `mcp` object inside `execute_code` |
252
+ | [Recipes](./docs/v3/recipes.md) | Practical patterns and examples |
253
+ | [Migration (v2 → v3)](./docs/v3/migration.md) | Breaking changes and migration steps |
254
+ | [Client Setup](https://docs.darkice.co/setup/clients) | Per-client config reference for all 10 supported clients |
354
255
 
355
256
  ---
356
257
 
357
- ## Architecture
258
+ ## CLI Quick-Start
358
259
 
359
- Full architecture documentation: [docs/guide/](./docs/guide/)
260
+ ```bash
261
+ # Guided multi-client setup — detects all supported client configs automatically
262
+ npx -y @darkiceinteractive/mcp-conductor-cli@next setup
360
263
 
361
- ```
362
- Claude Code / Claude Desktop
363
-
364
- └── MCP Protocol
365
-
366
- ┌───────▼──────────────┐
367
- │ MCP Conductor │
368
- │ (Node.js MCP server) │
369
- │ │
370
- │ execute_code ──────► Deno Subprocess (50ms, <50MB)
371
- │ list_servers │ TypeScript code runs here
372
- │ get_metrics │ MCP calls via HTTP bridge
373
- │ add_server │ Only result exits sandbox
374
- └───────────────────────┘
375
-
376
- ┌─────────▼──────────────────────────────┐
377
- │ HTTP Bridge (localhost) │
378
- └──┬──────────┬──────────┬───────────────┘
379
- │ │ │
380
- github filesystem brave-search ... (any MCP server)
381
- ```
264
+ # Health check with client coverage report
265
+ mcp-conductor-cli doctor
382
266
 
383
- ---
267
+ # Export config for a specific client (TOML for Codex, YAML for Continue, etc.)
268
+ mcp-conductor-cli export --client <client-id>
384
269
 
385
- ## Documentation
270
+ # Check system requirements (Node, Deno, conductor config)
271
+ mcp-conductor-cli check
386
272
 
387
- | Guide | Description |
388
- |-------|-------------|
389
- | [Getting Started](./docs/guide/getting-started.md) | First-time setup walkthrough |
390
- | [MCP Clients](./docs/guide/mcp-clients.md) | Setup for Claude, Codex, Gemini, Kimi, VS Code, Cursor, Windsurf, Cline |
391
- | [Configuration](./docs/configuration.md) | All config options and environment variables |
392
- | [Architecture](./docs/architecture.md) | System design and data flow |
393
- | [MCP Tools Reference](./docs/api/tools.md) | All tools available to Claude |
394
- | [Sandbox API](./docs/api/sandbox-api.md) | The `mcp` object inside execute_code |
395
- | [CLI Reference](./docs/cli-reference.md) | Command-line tool usage |
396
- | [Examples](./docs/examples/) | Recipes and patterns |
397
- | [Benchmarks](./docs/benchmarks/methodology.md) | Token savings methodology and results |
398
- | [Security](./docs/permissions.md) | Deno sandbox permission model |
399
- | [Troubleshooting](./docs/troubleshooting.md) | Common issues and fixes |
273
+ # Show current configuration status
274
+ mcp-conductor-cli status
275
+
276
+ # Enable exclusive mode (routes all MCP calls through the sandbox)
277
+ mcp-conductor-cli enable-exclusive [--dry-run]
278
+
279
+ # Add a backend server
280
+ mcp-conductor-cli config add github npx -- -y @modelcontextprotocol/server-github
281
+ ```
400
282
 
401
283
  ---
402
284
 
package/dist/bin/cli.d.ts CHANGED
@@ -10,8 +10,8 @@
10
10
  * test — transient connect + list tools
11
11
  * routing — show/apply routing recommendations
12
12
  * doctor — health check all servers
13
- * import — non-interactive import from Claude configs
14
- * export — generate mcpServers JSON for Claude rollback
13
+ * import — non-interactive import from MCP client configs
14
+ * export — generate mcpServers JSON for client rollback
15
15
  * daemon — start|stop|status|logs (wired to Phase 6 module)
16
16
  *
17
17
  * @module bin/cli