cursor-delegate-mcp 2.2.0 → 2.2.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/CHANGELOG.md +7 -0
- package/README.md +5 -64
- package/package.json +1 -1
- package/src/acp-client.js +3 -7
- package/src/doctor.js +0 -1
- package/src/server.js +10 -26
- package/src/turn-state.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,13 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [2.2.1] - 2026-09-04
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- README client snippets that shared a config shape now point at one example.
|
|
14
|
+
- Skill defaults table dropped duplicated field notes; security wording tightened.
|
|
15
|
+
|
|
9
16
|
## [2.2.0] - 2026-09-03
|
|
10
17
|
|
|
11
18
|
### Added
|
package/README.md
CHANGED
|
@@ -129,37 +129,14 @@ Under **Settings → Tools → AI Assistant → Model Context Protocol (MCP)**,
|
|
|
129
129
|
<details>
|
|
130
130
|
<summary><strong>Windsurf</strong> — <code>~/.codeium/windsurf/mcp_config.json</code></summary>
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
{
|
|
134
|
-
"mcpServers": {
|
|
135
|
-
"cursor-delegate": {
|
|
136
|
-
"command": "npx",
|
|
137
|
-
"args": ["-y", "cursor-delegate-mcp"]
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Heads-up: Cascade caps you at 100 tools across all servers.
|
|
132
|
+
Same `mcpServers` block as the generic snippet above. Cascade caps you at 100 tools across all servers.
|
|
144
133
|
|
|
145
134
|
</details>
|
|
146
135
|
|
|
147
136
|
<details>
|
|
148
137
|
<summary><strong>Visual Studio 2022 / 2026</strong> — <code>%USERPROFILE%\.mcp.json</code></summary>
|
|
149
138
|
|
|
150
|
-
|
|
151
|
-
{
|
|
152
|
-
"servers": {
|
|
153
|
-
"cursor-delegate": {
|
|
154
|
-
"type": "stdio",
|
|
155
|
-
"command": "npx",
|
|
156
|
-
"args": ["-y", "cursor-delegate-mcp"]
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Requires Visual Studio 2026, or 2022 17.14+. Note the top-level key is `servers`, not `mcpServers`. Visual Studio also discovers `.mcp.json` next to the solution, plus `.vscode/mcp.json`.
|
|
139
|
+
Same `servers` + `type: "stdio"` shape as VS Code. Requires Visual Studio 2026, or 2022 17.14+. Note the top-level key is `servers`, not `mcpServers`. Visual Studio also discovers `.mcp.json` next to the solution, plus `.vscode/mcp.json`.
|
|
163
140
|
|
|
164
141
|
</details>
|
|
165
142
|
|
|
@@ -186,57 +163,21 @@ OpenCode does **not** use `mcpServers`. Local servers go under `mcp`, with `type
|
|
|
186
163
|
<details>
|
|
187
164
|
<summary><strong>Google Antigravity</strong> — <code>~/.gemini/config/mcp_config.json</code> or workspace <code>.agents/mcp_config.json</code></summary>
|
|
188
165
|
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
"mcpServers": {
|
|
192
|
-
"cursor-delegate": {
|
|
193
|
-
"command": "npx",
|
|
194
|
-
"args": ["-y", "cursor-delegate-mcp"]
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
In the IDE: **…** on the agent panel → **MCP Servers** → **Manage MCP Servers** → **View raw config**. Antigravity 2.0, IDE, and CLI share the Gemini config file. You may need to approve the server's tools on first run.
|
|
166
|
+
Same `mcpServers` block as the generic snippet above. In the IDE: **…** on the agent panel → **MCP Servers** → **Manage MCP Servers** → **View raw config**. Antigravity 2.0, IDE, and CLI share the Gemini config file. You may need to approve the server's tools on first run.
|
|
201
167
|
|
|
202
168
|
</details>
|
|
203
169
|
|
|
204
170
|
<details>
|
|
205
171
|
<summary><strong>Kiro</strong> — <code>.kiro/settings/mcp.json</code> or <code>~/.kiro/settings/mcp.json</code></summary>
|
|
206
172
|
|
|
207
|
-
|
|
208
|
-
{
|
|
209
|
-
"mcpServers": {
|
|
210
|
-
"cursor-delegate": {
|
|
211
|
-
"command": "npx",
|
|
212
|
-
"args": ["-y", "cursor-delegate-mcp"]
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
Workspace file wins when both exist.
|
|
173
|
+
Same `mcpServers` block as the generic snippet above. Workspace file wins when both exist.
|
|
219
174
|
|
|
220
175
|
</details>
|
|
221
176
|
|
|
222
177
|
<details>
|
|
223
178
|
<summary><strong>Kilo Code</strong> — <code>kilo.jsonc</code> (<code>mcp</code> key, not <code>mcpServers</code>)</summary>
|
|
224
179
|
|
|
225
|
-
Same shape as OpenCode: `type: "local"` and `command` as one array.
|
|
226
|
-
|
|
227
|
-
```json
|
|
228
|
-
{
|
|
229
|
-
"mcp": {
|
|
230
|
-
"cursor-delegate": {
|
|
231
|
-
"type": "local",
|
|
232
|
-
"command": ["npx", "-y", "cursor-delegate-mcp"],
|
|
233
|
-
"enabled": true
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
In the VS Code extension: **Settings → MCP → Add Server → Local (stdio)**. On Windows, if `npx` is not found, use command `cmd` with arguments `/c`, `npx`, `-y`, `cursor-delegate-mcp`.
|
|
180
|
+
Same shape as OpenCode: `type: "local"` and `command` as one array. In the VS Code extension: **Settings → MCP → Add Server → Local (stdio)**. On Windows, if `npx` is not found, use command `cmd` with arguments `/c`, `npx`, `-y`, `cursor-delegate-mcp`.
|
|
240
181
|
|
|
241
182
|
</details>
|
|
242
183
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursor-delegate-mcp",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"mcpName": "io.github.andreilungeanu/cursor-delegate-mcp",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Delegate multi-file coding work from Claude Code, Codex, Copilot, or any MCP client to Cursor's CLI agent — structured results, plan mode, and changed files.",
|
package/src/acp-client.js
CHANGED
|
@@ -95,7 +95,7 @@ export class AcpClient extends EventEmitter {
|
|
|
95
95
|
};
|
|
96
96
|
this.child.once("exit", emitExit);
|
|
97
97
|
this.child.once("close", emitExit);
|
|
98
|
-
this.router = null;
|
|
98
|
+
this.router = null;
|
|
99
99
|
this.peer = new JsonRpcPeer(this.child.stdout, this.child.stdin, {
|
|
100
100
|
onNotification: (method, params) => { if (method === "session/update") this.emit("update", params); },
|
|
101
101
|
// The router is async and its result discarded, so a throw from its own catch would reject
|
|
@@ -148,15 +148,11 @@ export class AcpClient extends EventEmitter {
|
|
|
148
148
|
|
|
149
149
|
getTranscript(n) { return this.peer ? this.peer.formatLog(n) : ""; }
|
|
150
150
|
|
|
151
|
-
// Idempotent while
|
|
152
|
-
//
|
|
153
|
-
// fact as the process being gone: that result is not memoized, and force can retry.
|
|
151
|
+
// Idempotent while teardown is in flight and after a confirmed exit. A missed exit is not
|
|
152
|
+
// memoized — force retries with a new treeKill. A confirmed exit stays so later callers join.
|
|
154
153
|
stop({ timeoutMs = STOP_EXIT_TIMEOUT_MS } = {}) {
|
|
155
154
|
if (!this._stopping) {
|
|
156
155
|
this._stopping = this._teardown(timeoutMs).then((observed) => {
|
|
157
|
-
// A missed exit must not poison later force-kills: the documented retry is a new
|
|
158
|
-
// treeKill, not the same false. A confirmed exit stays memoized so concurrent and
|
|
159
|
-
// later callers still join one teardown.
|
|
160
156
|
if (!observed) this._stopping = null;
|
|
161
157
|
return observed;
|
|
162
158
|
}, (err) => {
|
package/src/doctor.js
CHANGED
|
@@ -100,7 +100,6 @@ async function runDeepHandshake({ spawnSpec, clientFactory, workspace, timeoutMs
|
|
|
100
100
|
// session/new already returned these. currentModel only — any other model needs a set_model
|
|
101
101
|
// first, which this handshake does not send.
|
|
102
102
|
details.currentModelOptions = (client.configOptions ?? [])
|
|
103
|
-
// model and mode are already reported as their own fields.
|
|
104
103
|
.filter((o) => typeof o?.id === "string" && o.id !== "model" && o.id !== "mode")
|
|
105
104
|
.map((o) => ({ id: o.id, values: allowedValues(o) }));
|
|
106
105
|
})();
|
package/src/server.js
CHANGED
|
@@ -77,15 +77,10 @@ const planEntrySchema = z.object({
|
|
|
77
77
|
status: z.enum(PLAN_STATUSES).optional(),
|
|
78
78
|
}).passthrough();
|
|
79
79
|
|
|
80
|
-
// No
|
|
81
|
-
//
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
// fails when a field added in delegate.js is forgotten here. cancel's status vocabulary is
|
|
85
|
-
// published in its tool description, which is now its only schema.
|
|
86
|
-
//
|
|
87
|
-
// Types only. What each field means, and what its absence means, is documented once in
|
|
88
|
-
// skills/delegate/reference.md.
|
|
80
|
+
// No outputSchema: that also requires structuredContent, and a host that reads both (Codex)
|
|
81
|
+
// puts the payload in context twice. One JSON text block; the .strict() copy is in
|
|
82
|
+
// delegate.test.js. Field meanings: skills/delegate/reference.md. cancel status lives on
|
|
83
|
+
// its tool description.
|
|
89
84
|
export const delegateOutputShape = {
|
|
90
85
|
result: z.string(),
|
|
91
86
|
resultSource: z.enum(["pre-tool-fallback", "none"]).optional(),
|
|
@@ -115,16 +110,9 @@ export const delegateOutputShape = {
|
|
|
115
110
|
}).optional(),
|
|
116
111
|
};
|
|
117
112
|
|
|
118
|
-
//
|
|
119
|
-
//
|
|
120
|
-
//
|
|
121
|
-
// on purpose. doctor runs when the agent is already misbehaving, so a schema tight enough to
|
|
122
|
-
// reject a weird protocolVersion would fail on the agent's output rather than on ours.
|
|
123
|
-
// doctor.test.js parses every result against a strict copy of this shape.
|
|
124
|
-
//
|
|
125
|
-
// Types only; what the fields mean is documented once, in TECHNICAL.md.
|
|
126
|
-
// Split out so the drift guard can make it strict on its own: a .strict() on agent does not look
|
|
127
|
-
// inside handshake, which is the level this schema has drifted at twice.
|
|
113
|
+
// Same in-repo contract as delegateOutputShape. Relayed agent fields stay unknown so a
|
|
114
|
+
// weird protocolVersion is a diagnostic, not a failed call. doctor.test.js holds the
|
|
115
|
+
// strict copy. Handshake is its own shape: a .strict() on agent does not look inside it.
|
|
128
116
|
export const doctorHandshakeShape = {
|
|
129
117
|
ok: z.boolean(),
|
|
130
118
|
error: z.string().optional(),
|
|
@@ -145,9 +133,7 @@ export const doctorAgentShape = {
|
|
|
145
133
|
handshake: z.object(doctorHandshakeShape).passthrough().optional(),
|
|
146
134
|
};
|
|
147
135
|
|
|
148
|
-
//
|
|
149
|
-
// because a top-level .strict() does not look inside a nested object — which is exactly where
|
|
150
|
-
// this schema drifted.
|
|
136
|
+
// agent is split out because a top-level .strict() does not look inside a nested object.
|
|
151
137
|
export const doctorOutputShape = {
|
|
152
138
|
plugin: z.object({ version: z.string() }).passthrough(),
|
|
153
139
|
client: z.object({
|
|
@@ -428,10 +414,8 @@ export function installSignalCleanup(map, {
|
|
|
428
414
|
Promise.all(stops).then(leave, leave);
|
|
429
415
|
};
|
|
430
416
|
// Each agent runs in its own process group on POSIX, so a signal aimed at this process no
|
|
431
|
-
// longer reaches it
|
|
432
|
-
//
|
|
433
|
-
// leaks. Delegations still inside their handshake are reached through `pending`, so this
|
|
434
|
-
// covers the agent from the moment it is spawned, not from the moment its session opens.
|
|
417
|
+
// longer reaches it. Installing a handler replaces Node's default; swallowing Ctrl-C would
|
|
418
|
+
// leak the agent. shutdown() already walks pending, so this covers spawn through session/new.
|
|
435
419
|
if (DETACHED) {
|
|
436
420
|
const signals = /** @type {[NodeJS.Signals, number][]} */ ([["SIGINT", 130], ["SIGTERM", 143]]);
|
|
437
421
|
for (const [signal, code] of signals) process.on(signal, () => shutdown(code));
|