cursor-delegate-mcp 2.1.1 → 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 CHANGED
@@ -6,6 +6,28 @@ 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
+
16
+ ## [2.2.0] - 2026-09-03
17
+
18
+ ### Added
19
+
20
+ - Registry and protocol icons: `server.json` `icons[]` and the MCP `initialize` payload
21
+ advertise the light and dark logos as HTTPS URLs (SEP-973). Codex `interface.logoDark`.
22
+
23
+ ### Changed
24
+
25
+ - README client list checked against vendor docs (3 Sep 2026): OpenCode and Google
26
+ Antigravity added; Kiro, Kilo Code, and Zed no longer share one portable snippet;
27
+ Visual Studio covers 2022 17.14+ and 2026. npm description/keywords and
28
+ `llms-install.md` match that list; OpenCode, Kilo Code, and Zed are called out
29
+ as not using `mcpServers`.
30
+
9
31
  ## [2.1.1] - 2026-09-03
10
32
 
11
33
  ### Fixed
package/README.md CHANGED
@@ -46,7 +46,7 @@ Composer and Grok run on their **own usage allowance** on every Cursor plan —
46
46
  - 📋 **Plan first** — `plan` mode: Cursor drafts a plan, you review it, then the same session implements it.
47
47
  - 🔍 **Ask anything** — `ask` mode: Q&A over your codebase.
48
48
  - 🩺 **Self-diagnosing** — a `doctor` tool that tells you exactly what's missing if setup isn't right.
49
- - 🔌 **Portable** — plain stdio MCP, so it runs anywhere: VS Code, JetBrains, Windsurf, Visual Studio, and more.
49
+ - 🔌 **Portable** — plain stdio MCP, so it runs anywhere: VS Code, JetBrains, Windsurf, Visual Studio, OpenCode, Antigravity, and more.
50
50
 
51
51
  `plan` and `ask` are instructions to the agent, and `workspace` is its working directory — [Security](SECURITY.md) and the [delegate reference](skills/delegate/reference.md) spell out what the bridge enforces and what it reports back.
52
52
 
@@ -129,44 +129,74 @@ 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
+ Same `mcpServers` block as the generic snippet above. Cascade caps you at 100 tools across all servers.
133
+
134
+ </details>
135
+
136
+ <details>
137
+ <summary><strong>Visual Studio 2022 / 2026</strong> — <code>%USERPROFILE%\.mcp.json</code></summary>
138
+
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`.
140
+
141
+ </details>
142
+
143
+ <details>
144
+ <summary><strong>OpenCode</strong> — <code>~/.config/opencode/opencode.json</code> or project <code>opencode.json</code></summary>
145
+
146
+ OpenCode does **not** use `mcpServers`. Local servers go under `mcp`, with `type: "local"` and `command` as one array:
147
+
132
148
  ```json
133
149
  {
134
- "mcpServers": {
150
+ "$schema": "https://opencode.ai/config.json",
151
+ "mcp": {
135
152
  "cursor-delegate": {
136
- "command": "npx",
137
- "args": ["-y", "cursor-delegate-mcp"]
153
+ "type": "local",
154
+ "command": ["npx", "-y", "cursor-delegate-mcp"],
155
+ "enabled": true
138
156
  }
139
157
  }
140
158
  }
141
159
  ```
142
160
 
143
- Heads-up: Cascade caps you at 100 tools across all servers.
161
+ </details>
162
+
163
+ <details>
164
+ <summary><strong>Google Antigravity</strong> — <code>~/.gemini/config/mcp_config.json</code> or workspace <code>.agents/mcp_config.json</code></summary>
165
+
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.
144
167
 
145
168
  </details>
146
169
 
147
170
  <details>
148
- <summary><strong>Visual Studio 2022</strong> — <code>%USERPROFILE%\.mcp.json</code></summary>
171
+ <summary><strong>Kiro</strong> — <code>.kiro/settings/mcp.json</code> or <code>~/.kiro/settings/mcp.json</code></summary>
172
+
173
+ Same `mcpServers` block as the generic snippet above. Workspace file wins when both exist.
174
+
175
+ </details>
176
+
177
+ <details>
178
+ <summary><strong>Kilo Code</strong> — <code>kilo.jsonc</code> (<code>mcp</code> key, not <code>mcpServers</code>)</summary>
179
+
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`.
181
+
182
+ </details>
183
+
184
+ <details>
185
+ <summary><strong>Zed</strong> — Settings → AI → MCP Servers, or <code>context_servers</code> in Zed settings</summary>
149
186
 
150
187
  ```json
151
188
  {
152
- "servers": {
189
+ "context_servers": {
153
190
  "cursor-delegate": {
154
- "type": "stdio",
155
191
  "command": "npx",
156
- "args": ["-y", "cursor-delegate-mcp"]
192
+ "args": ["-y", "cursor-delegate-mcp"],
193
+ "env": {}
157
194
  }
158
195
  }
159
196
  }
160
197
  ```
161
198
 
162
- Requires 17.14+. Note the top-level key is `servers`, not `mcpServers`.
163
-
164
- </details>
165
-
166
- <details>
167
- <summary><strong>Kiro, Kilo Code, Zed</strong> — and any other stdio MCP client</summary>
168
-
169
- Use the portable definition above in the client's own MCP config file.
199
+ Zed's native agent uses this. External ACP agents in Zed read their own MCP config unless you forward Zed's servers.
170
200
 
171
201
  </details>
172
202
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "cursor-delegate-mcp",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "mcpName": "io.github.andreilungeanu/cursor-delegate-mcp",
5
5
  "type": "module",
6
- "description": "Delegate multi-file coding work from Claude Code, Codex, or Copilot to Cursor's CLI agent — structured results, plan mode, and changed files.",
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.",
7
7
  "license": "MIT",
8
8
  "author": "Andrei Lungeanu <andrei@lungeanu.ro>",
9
9
  "repository": {
@@ -25,6 +25,9 @@
25
25
  "chatgpt",
26
26
  "github-copilot",
27
27
  "vscode",
28
+ "opencode",
29
+ "antigravity",
30
+ "windsurf",
28
31
  "composer",
29
32
  "composer-2.5",
30
33
  "delegation",
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; // set before first stdout line
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 a teardown is in flight and after a confirmed exit, so a force-cancel
152
- // racing the delegation's own finally tears down once. A missed exit is not the same
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) => {
@@ -189,8 +185,15 @@ export class AcpClient extends EventEmitter {
189
185
  }));
190
186
  const observed = await Promise.race([exited, bounded]);
191
187
  clearTimeout(timer);
192
- // Pending RPCs are left to the exit handler, which rejects them with agent-exit. Rejecting
193
- // them here too would settle the same promises twice for no new information.
188
+ // The exit handler rejects in-flight RPCs with stderr. Doing that here on a confirmed
189
+ // exit would race it and the first settlement would drop the forensics. A stop that
190
+ // did not see the child die never gets that handler, so settle those RPCs only when
191
+ // the process is still alive and emitExit has not run.
192
+ if (!observed && !this._exitEmitted && isChildAlive(child)) {
193
+ try {
194
+ this.peer?.rejectAllPending(makeError("agent-exit", "agent process did not exit after stop"));
195
+ } catch {}
196
+ }
194
197
  try { this.peer?.close(); } catch {}
195
198
  return observed;
196
199
  }
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
@@ -11,6 +11,13 @@ import { VERSION, readPackageVersion } from "./version.js";
11
11
  import { DETACHED } from "./proc.js";
12
12
  import { PLAN_PRIORITIES, PLAN_STATUSES, TODO_STATUSES } from "./acp-enums.js";
13
13
 
14
+ const ICON_BASE = `https://raw.githubusercontent.com/andreilungeanu/cursor-delegate-mcp/v${VERSION}/assets`;
15
+ /** @type {Array<{ src: string, mimeType: string, sizes: string[], theme: "light" | "dark" }>} */
16
+ const SERVER_ICONS = [
17
+ { src: `${ICON_BASE}/logo-light.png`, mimeType: "image/png", sizes: ["1024x1024"], theme: "light" },
18
+ { src: `${ICON_BASE}/logo-dark.png`, mimeType: "image/png", sizes: ["1024x1024"], theme: "dark" },
19
+ ];
20
+
14
21
  const nodeMajor = Number(process.versions.node.split(".")[0]);
15
22
  if (nodeMajor < 20) {
16
23
  console.error(`cursor-delegate-mcp requires Node 20+ (found ${process.versions.node})`);
@@ -70,15 +77,10 @@ const planEntrySchema = z.object({
70
77
  status: z.enum(PLAN_STATUSES).optional(),
71
78
  }).passthrough();
72
79
 
73
- // No tool declares an outputSchema: declaring one obliges the server to also return
74
- // structuredContent, and a host that reads both it and the text block — Codex does — puts the
75
- // payload in the model's context twice. Every tool returns one compact JSON text block instead.
76
- // So this is an in-repo contract, enforced by the .strict() copy in delegate.test.js, which
77
- // fails when a field added in delegate.js is forgotten here. cancel's status vocabulary is
78
- // published in its tool description, which is now its only schema.
79
- //
80
- // Types only. What each field means, and what its absence means, is documented once in
81
- // 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.
82
84
  export const delegateOutputShape = {
83
85
  result: z.string(),
84
86
  resultSource: z.enum(["pre-tool-fallback", "none"]).optional(),
@@ -108,16 +110,9 @@ export const delegateOutputShape = {
108
110
  }).optional(),
109
111
  };
110
112
 
111
- // What doctor reports about the launcher — the same in-repo contract as delegateOutputShape.
112
- //
113
- // Fields this bridge computes are typed; fields relayed verbatim from the agent are left unknown
114
- // on purpose. doctor runs when the agent is already misbehaving, so a schema tight enough to
115
- // reject a weird protocolVersion would fail on the agent's output rather than on ours.
116
- // doctor.test.js parses every result against a strict copy of this shape.
117
- //
118
- // Types only; what the fields mean is documented once, in TECHNICAL.md.
119
- // Split out so the drift guard can make it strict on its own: a .strict() on agent does not look
120
- // 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.
121
116
  export const doctorHandshakeShape = {
122
117
  ok: z.boolean(),
123
118
  error: z.string().optional(),
@@ -138,9 +133,7 @@ export const doctorAgentShape = {
138
133
  handshake: z.object(doctorHandshakeShape).passthrough().optional(),
139
134
  };
140
135
 
141
- // Exported as a shape for the same reason as delegateOutputShape, and with agent split out
142
- // because a top-level .strict() does not look inside a nested object — which is exactly where
143
- // this schema drifted.
136
+ // agent is split out because a top-level .strict() does not look inside a nested object.
144
137
  export const doctorOutputShape = {
145
138
  plugin: z.object({ version: z.string() }).passthrough(),
146
139
  client: z.object({
@@ -266,7 +259,7 @@ export function buildServer({ runDelegate: runDelegateInjected, runDoctor: runDo
266
259
  const runDelegate = runDelegateInjected || runDelegateDefault;
267
260
  const runDoctor = runDoctorInjected || runDoctorDefault;
268
261
  const server = new McpServer(
269
- { name: "cursor-delegate-mcp", version: VERSION },
262
+ { name: "cursor-delegate-mcp", version: VERSION, icons: SERVER_ICONS },
270
263
  { instructions: SERVER_INSTRUCTIONS }
271
264
  );
272
265
 
@@ -421,10 +414,8 @@ export function installSignalCleanup(map, {
421
414
  Promise.all(stops).then(leave, leave);
422
415
  };
423
416
  // Each agent runs in its own process group on POSIX, so a signal aimed at this process no
424
- // longer reaches it the way it did when the two shared a group. Installing a handler replaces
425
- // Node's default, and a server that swallows Ctrl-C would be a worse bug than the agent it
426
- // leaks. Delegations still inside their handshake are reached through `pending`, so this
427
- // 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.
428
419
  if (DETACHED) {
429
420
  const signals = /** @type {[NodeJS.Signals, number][]} */ ([["SIGINT", 130], ["SIGTERM", 143]]);
430
421
  for (const [signal, code] of signals) process.on(signal, () => shutdown(code));
package/src/turn-state.js CHANGED
@@ -87,7 +87,6 @@ export function makeTurnState({ onProgress, progressThrottleMs = 2000 } = {}) {
87
87
  state.messages.reset();
88
88
  },
89
89
 
90
- // The result text as it stands.
91
90
  text() {
92
91
  return state.resultChunks.join("");
93
92
  },