@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.
- package/README.md +168 -286
- package/dist/bin/cli.d.ts +2 -2
- package/dist/bin/cli.js +37 -14
- package/dist/bin/cli.js.map +1 -1
- package/dist/bridge/http-server.d.ts.map +1 -1
- package/dist/bridge/http-server.js +11 -5
- package/dist/bridge/http-server.js.map +1 -1
- package/dist/cache/disk.d.ts.map +1 -1
- package/dist/cache/disk.js +36 -3
- package/dist/cache/disk.js.map +1 -1
- package/dist/cli/clients/adapter.d.ts +103 -0
- package/dist/cli/clients/adapter.d.ts.map +1 -0
- package/dist/cli/clients/adapter.js +24 -0
- package/dist/cli/clients/adapter.js.map +1 -0
- package/dist/cli/clients/claude-code.d.ts +15 -0
- package/dist/cli/clients/claude-code.d.ts.map +1 -0
- package/dist/cli/clients/claude-code.js +110 -0
- package/dist/cli/clients/claude-code.js.map +1 -0
- package/dist/cli/clients/claude-desktop.d.ts +26 -0
- package/dist/cli/clients/claude-desktop.d.ts.map +1 -0
- package/dist/cli/clients/claude-desktop.js +118 -0
- package/dist/cli/clients/claude-desktop.js.map +1 -0
- package/dist/cli/clients/cline.d.ts +40 -0
- package/dist/cli/clients/cline.d.ts.map +1 -0
- package/dist/cli/clients/cline.js +134 -0
- package/dist/cli/clients/cline.js.map +1 -0
- package/dist/cli/clients/codex.d.ts +30 -0
- package/dist/cli/clients/codex.d.ts.map +1 -0
- package/dist/cli/clients/codex.js +176 -0
- package/dist/cli/clients/codex.js.map +1 -0
- package/dist/cli/clients/continue.d.ts +41 -0
- package/dist/cli/clients/continue.d.ts.map +1 -0
- package/dist/cli/clients/continue.js +150 -0
- package/dist/cli/clients/continue.js.map +1 -0
- package/dist/cli/clients/cursor.d.ts +20 -0
- package/dist/cli/clients/cursor.d.ts.map +1 -0
- package/dist/cli/clients/cursor.js +110 -0
- package/dist/cli/clients/cursor.js.map +1 -0
- package/dist/cli/clients/gemini-cli.d.ts +42 -0
- package/dist/cli/clients/gemini-cli.d.ts.map +1 -0
- package/dist/cli/clients/gemini-cli.js +169 -0
- package/dist/cli/clients/gemini-cli.js.map +1 -0
- package/dist/cli/clients/index.d.ts +28 -0
- package/dist/cli/clients/index.d.ts.map +1 -0
- package/dist/cli/clients/index.js +44 -0
- package/dist/cli/clients/index.js.map +1 -0
- package/dist/cli/clients/kimi-code.d.ts +33 -0
- package/dist/cli/clients/kimi-code.d.ts.map +1 -0
- package/dist/cli/clients/kimi-code.js +177 -0
- package/dist/cli/clients/kimi-code.js.map +1 -0
- package/dist/cli/clients/opencode.d.ts +21 -0
- package/dist/cli/clients/opencode.d.ts.map +1 -0
- package/dist/cli/clients/opencode.js +150 -0
- package/dist/cli/clients/opencode.js.map +1 -0
- package/dist/cli/clients/registry.d.ts +51 -0
- package/dist/cli/clients/registry.d.ts.map +1 -0
- package/dist/cli/clients/registry.js +169 -0
- package/dist/cli/clients/registry.js.map +1 -0
- package/dist/cli/clients/zed.d.ts +41 -0
- package/dist/cli/clients/zed.d.ts.map +1 -0
- package/dist/cli/clients/zed.js +171 -0
- package/dist/cli/clients/zed.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +27 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +71 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/export-servers.d.ts +60 -0
- package/dist/cli/commands/export-servers.d.ts.map +1 -1
- package/dist/cli/commands/export-servers.js +85 -1
- package/dist/cli/commands/export-servers.js.map +1 -1
- package/dist/cli/commands/import-servers.d.ts +13 -2
- package/dist/cli/commands/import-servers.d.ts.map +1 -1
- package/dist/cli/commands/import-servers.js +42 -5
- package/dist/cli/commands/import-servers.js.map +1 -1
- package/dist/cli/wizard/setup.d.ts +29 -3
- package/dist/cli/wizard/setup.d.ts.map +1 -1
- package/dist/cli/wizard/setup.js +204 -7
- package/dist/cli/wizard/setup.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +1 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/loader.d.ts +10 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +14 -24
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +7 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/daemon/client.d.ts.map +1 -1
- package/dist/daemon/client.js +14 -6
- package/dist/daemon/client.js.map +1 -1
- package/dist/daemon/server.d.ts +9 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +80 -9
- package/dist/daemon/server.js.map +1 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/metrics/index.d.ts.map +1 -1
- package/dist/metrics/index.js +1 -1
- package/dist/metrics/index.js.map +1 -1
- package/dist/metrics/metrics-collector.d.ts +120 -0
- package/dist/metrics/metrics-collector.d.ts.map +1 -1
- package/dist/metrics/metrics-collector.js +136 -0
- package/dist/metrics/metrics-collector.js.map +1 -1
- package/dist/runtime/pool/recycle.d.ts +8 -2
- package/dist/runtime/pool/recycle.d.ts.map +1 -1
- package/dist/runtime/pool/recycle.js.map +1 -1
- package/dist/runtime/pool/worker-pool.d.ts.map +1 -1
- package/dist/runtime/pool/worker-pool.js +17 -10
- package/dist/runtime/pool/worker-pool.js.map +1 -1
- package/dist/runtime/pool/worker.d.ts +7 -1
- package/dist/runtime/pool/worker.d.ts.map +1 -1
- package/dist/runtime/pool/worker.js +9 -1
- package/dist/runtime/pool/worker.js.map +1 -1
- package/dist/server/mcp-server.d.ts +15 -3
- package/dist/server/mcp-server.d.ts.map +1 -1
- package/dist/server/mcp-server.js +81 -7
- package/dist/server/mcp-server.js.map +1 -1
- package/dist/utils/backup.d.ts +24 -0
- package/dist/utils/backup.d.ts.map +1 -0
- package/dist/utils/backup.js +40 -0
- package/dist/utils/backup.js.map +1 -0
- package/dist/utils/tokenize.d.ts +8 -0
- package/dist/utils/tokenize.d.ts.map +1 -1
- package/dist/utils/tokenize.js +8 -0
- package/dist/utils/tokenize.js.map +1 -1
- package/dist/version.d.ts +3 -3
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +3 -3
- package/dist/version.js.map +1 -1
- package/package.json +23 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MCP Conductor
|
|
2
2
|
|
|
3
|
-
**99.7% fewer tokens.
|
|
3
|
+
**The canonical MCP hub for any agent platform. 99.7% fewer tokens. One `npx` command.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@darkiceinteractive/mcp-conductor)
|
|
6
6
|
[](https://www.npmjs.com/package/@darkiceinteractive/mcp-conductor)
|
|
@@ -8,56 +8,49 @@
|
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
[](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
|
|
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 →
|
|
15
|
-
After: 153,900 tokens → Deno sandbox → 435 tokens →
|
|
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
|
-
##
|
|
22
|
+
## Quick Install
|
|
23
23
|
|
|
24
|
-
v3
|
|
24
|
+
### v3.1.1 — Supported Clients
|
|
25
25
|
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
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
|
-
|
|
39
|
+
### Guided Setup (recommended)
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
The setup wizard auto-detects every supported client on your machine and offers per-client consolidation:
|
|
46
42
|
|
|
47
43
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
npx -y @darkiceinteractive/mcp-conductor-cli@next setup
|
|
45
|
+
```
|
|
50
46
|
|
|
51
|
-
#
|
|
52
|
-
curl -fsSL https://deno.land/install.sh | sh
|
|
47
|
+
See [What the wizard does](#what-the-wizard-does) below.
|
|
53
48
|
|
|
54
|
-
|
|
55
|
-
winget install DenoLand.Deno
|
|
56
|
-
```
|
|
49
|
+
### Manual Config Snippets
|
|
57
50
|
|
|
58
|
-
|
|
51
|
+
Paste the appropriate block into your client's config file. The wizard does this automatically.
|
|
59
52
|
|
|
60
|
-
**Claude Code** (`~/.claude/settings.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
|
-
**
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
|
-
|
|
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
|
-
"
|
|
140
|
-
|
|
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", "@
|
|
165
|
-
"env": {}
|
|
86
|
+
"args": ["-y", "@darkiceinteractive/mcp-conductor"]
|
|
166
87
|
}
|
|
167
88
|
}
|
|
168
89
|
}
|
|
169
90
|
```
|
|
170
91
|
|
|
171
|
-
|
|
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
|
-
|
|
94
|
+
Restart your AI tool after editing the config. That's it.
|
|
174
95
|
|
|
175
96
|
---
|
|
176
97
|
|
|
177
|
-
##
|
|
98
|
+
## What the Wizard Does
|
|
178
99
|
|
|
179
|
-
|
|
100
|
+
Running `npx -y @darkiceinteractive/mcp-conductor-cli@next setup` steps through the following for each detected client:
|
|
180
101
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
|
|
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
|
-
|
|
202
|
-
const results = await mcp.batchSearch(['query 1', 'query 2', 'query 3'], { topN: 3 });
|
|
110
|
+
---
|
|
203
111
|
|
|
204
|
-
|
|
205
|
-
mcp.progress('Processing 500 files...');
|
|
112
|
+
## Verifying Setup
|
|
206
113
|
|
|
207
|
-
|
|
208
|
-
|
|
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
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
134
|
+
Generate a ready-to-paste config snippet for any supported client:
|
|
255
135
|
|
|
256
136
|
```bash
|
|
257
|
-
#
|
|
258
|
-
mcp-conductor-cli
|
|
137
|
+
# Codex CLI — writes TOML
|
|
138
|
+
mcp-conductor-cli export --client codex
|
|
259
139
|
|
|
260
|
-
#
|
|
261
|
-
mcp-conductor-cli
|
|
140
|
+
# Continue.dev — writes YAML
|
|
141
|
+
mcp-conductor-cli export --client continue
|
|
262
142
|
|
|
263
|
-
#
|
|
264
|
-
mcp-conductor-cli
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
285
|
-
|
|
286
|
-
### Parallel GitHub + Filesystem analysis
|
|
153
|
+
## 30-Second Example
|
|
287
154
|
|
|
288
155
|
```typescript
|
|
289
|
-
|
|
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'
|
|
292
|
-
() => mcp.server('filesystem').call('
|
|
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
|
-
|
|
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
|
-
|
|
169
|
+
---
|
|
301
170
|
|
|
302
|
-
|
|
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
|
-
|
|
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
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
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
|
-
##
|
|
185
|
+
## v3 Highlights
|
|
326
186
|
|
|
327
|
-
|
|
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
|
-
|
|
211
|
+
---
|
|
330
212
|
|
|
331
|
-
|
|
213
|
+
## Token-Savings Reporter
|
|
332
214
|
|
|
333
|
-
|
|
215
|
+
Pass `show_token_savings: true` on any `execute_code` call to see a breakdown:
|
|
334
216
|
|
|
335
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
243
|
+
## Docs
|
|
342
244
|
|
|
343
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
258
|
+
## CLI Quick-Start
|
|
358
259
|
|
|
359
|
-
|
|
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
|
-
|
|
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
|
-
|
|
270
|
+
# Check system requirements (Node, Deno, conductor config)
|
|
271
|
+
mcp-conductor-cli check
|
|
386
272
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
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
|
|
14
|
-
* export — generate mcpServers JSON for
|
|
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
|