cursor-delegate-mcp 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,17 +1,18 @@
1
1
  # Cursor Delegate MCP
2
2
 
3
- **Stop rationing your smartest model.**
3
+ **Keep the brains. Delegate the build.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/cursor-delegate-mcp)](https://www.npmjs.com/package/cursor-delegate-mcp)
6
6
  [![npm downloads](https://img.shields.io/npm/dt/cursor-delegate-mcp)](https://www.npmjs.com/package/cursor-delegate-mcp)
7
7
  [![node](https://img.shields.io/node/v/cursor-delegate-mcp)](https://nodejs.org)
8
8
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
9
+ [![tests](https://github.com/andreilungeanu/cursor-delegate-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/andreilungeanu/cursor-delegate-mcp/actions/workflows/test.yml)
9
10
 
10
11
  <img src="assets/logo-light.png" alt="Cursor Delegate MCP logo" width="150" align="left" hspace="15">
11
12
 
12
- You know the drill: **Fable**, **Sol**, or **Opus** starts grinding through a refactor, and you watch your subscription's 5-hour window melt — or your API bill climb. Here's the thing: most of what burns your quota isn't intelligence work. It's typing.
13
+ Use your best coding agent where its judgment matters most: understanding the task, shaping the plan, and reviewing the result.
13
14
 
14
- Cursor Delegate is an MCP bridge that lets Claude Code, ChatGPT/Codex, Copilot — or any MCP client — keep the thinking and hand the typing to **Cursor's CLI agent**.
15
+ Cursor Delegate is the MCP bridge that lets Claude Code, ChatGPT/Codex, Copilot — or any MCP client — hand implementation to **Cursor's CLI agent**, then get a clean, structured result back for review.
15
16
 
16
17
  <br clear="left">
17
18
 
@@ -53,7 +54,7 @@ You → your agent (plans & reviews)
53
54
 
54
55
  You need [Node.js 22+](https://nodejs.org/) and the [Cursor CLI](https://cursor.com/docs/cli/overview), logged in (`cursor-agent login`).
55
56
 
56
- ### Claude Code (recommended)
57
+ ### Claude Code
57
58
 
58
59
  ```shell
59
60
  /plugin marketplace add andreilungeanu/cursor-delegate-mcp
@@ -64,7 +65,7 @@ Then just ask:
64
65
 
65
66
  > Delegate to Cursor: migrate src/api from callbacks to async/await and update the tests, then walk me through what changed.
66
67
 
67
- That's the whole loop — Claude writes the brief, Cursor grinds through the files, Claude walks you through the diff. Claude Code runs the server bundled with the plugin; dependencies install automatically on first session.
68
+ That's the whole loop — Claude writes the brief, Cursor grinds through the files, Claude walks you through the diff.
68
69
 
69
70
  ### ChatGPT desktop / Codex
70
71
 
@@ -79,20 +80,7 @@ codex plugin add cursor-delegate-mcp@cursor-delegate-mcp
79
80
  copilot plugin install andreilungeanu/cursor-delegate-mcp
80
81
  ```
81
82
 
82
- Both plugins bundle the delegation skill and start the published npm release via `npx` — nothing else to set up.
83
-
84
- ### Any other MCP client
85
-
86
- ```json
87
- {
88
- "mcpServers": {
89
- "cursor-delegate-mcp": {
90
- "command": "npx",
91
- "args": ["-y", "cursor-delegate-mcp"]
92
- }
93
- }
94
- }
95
- ```
83
+ ### More clients
96
84
 
97
85
  <details>
98
86
  <summary><strong>VS Code</strong> — <code>.vscode/mcp.json</code></summary>
@@ -116,7 +104,7 @@ Or run **Chat: Install Plugin From Source** with this repository's URL.
116
104
  <details>
117
105
  <summary><strong>JetBrains AI Assistant</strong> — Settings → Tools → AI Assistant → MCP</summary>
118
106
 
119
- Import the standard definition above via **Settings → Tools → AI Assistant → Model Context Protocol (MCP)**.
107
+ Under **Settings → Tools → AI Assistant → Model Context Protocol (MCP)**, add a server with command `npx` and arguments `-y cursor-delegate-mcp`.
120
108
 
121
109
  </details>
122
110
 
@@ -157,14 +145,20 @@ Requires 17.14+. Note the top-level key is `servers`, not `mcpServers`.
157
145
 
158
146
  </details>
159
147
 
160
- <details>
161
- <summary><strong>Kiro, Kilo Code, Zed, and friends</strong></summary>
148
+ ### Kiro, Kilo Code, and any other MCP client
162
149
 
163
- Any MCP client works — drop the standard `npx` definition above into the client's MCP config.
150
+ Add the following server to the client's MCP config:
164
151
 
165
- </details>
166
-
167
- Give the **`delegate`** tool a task. If anything seems off, run **`doctor`**.
152
+ ```json
153
+ {
154
+ "mcpServers": {
155
+ "cursor-delegate-mcp": {
156
+ "command": "npx",
157
+ "args": ["-y", "cursor-delegate-mcp"]
158
+ }
159
+ }
160
+ }
161
+ ```
168
162
 
169
163
  ## License
170
164
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursor-delegate-mcp",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "description": "MCP server bridging AI coding hosts to cursor-agent over the Agent Client Protocol (ACP).",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  ],
44
44
  "scripts": {
45
45
  "test": "node --test test/*.test.js",
46
- "test:pack": "node scripts/packed-smoke.mjs",
46
+ "test:pack": "node test/npm-package-smoke.mjs",
47
47
  "start": "node src/server.js"
48
48
  },
49
49
  "dependencies": {
package/src/acp-client.js CHANGED
@@ -57,7 +57,7 @@ export class AcpClient extends EventEmitter {
57
57
  });
58
58
  return new Promise((resolve, reject) => {
59
59
  this.child.once("error", (e) =>
60
- reject(new Error(`Failed to spawn agent (${command}): ${e.message}. Install Cursor CLI and run 'agent login'.`)));
60
+ reject(new Error(`Failed to spawn agent (${command}): ${e.message}. Install Cursor CLI and run 'cursor-agent login'.`)));
61
61
  this.child.once("spawn", () => resolve());
62
62
  });
63
63
  }
package/src/delegate.js CHANGED
@@ -26,7 +26,7 @@ async function openSession(client, resumeSessionId, workspace) {
26
26
  }
27
27
 
28
28
  // Composer bare ids (e.g. composer-2.5) expose standard vs fast via set_config_option.
29
- // Other models use separate ids (e.g. gpt-5-fast) — see agent --list-models.
29
+ // Other models use separate ids (e.g. gpt-5-fast) — see cursor-agent --list-models.
30
30
  function composerFastToggleApplies(model) {
31
31
  return /^composer-\d+(?:\.\d+)?$/i.test(model);
32
32
  }
package/src/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import process from "node:process";
3
- import path from "node:path";
3
+ import { realpathSync } from "node:fs";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -268,7 +268,14 @@ export function buildServer({ runDelegate: runDelegateInjected, runDoctor: runDo
268
268
  }
269
269
 
270
270
  const __filename = fileURLToPath(import.meta.url);
271
- const isMain = process.argv[1] && path.resolve(process.argv[1]) === path.resolve(__filename);
271
+ let isMain = false;
272
+ if (process.argv[1]) {
273
+ try {
274
+ isMain = realpathSync(process.argv[1]) === realpathSync(__filename);
275
+ } catch {
276
+ // An imported module must not fail just because argv[1] is not a file.
277
+ }
278
+ }
272
279
 
273
280
  if (isMain) {
274
281
  const server = buildServer();
package/src/spawn.js CHANGED
@@ -10,7 +10,7 @@ export function splitArgs(raw) {
10
10
  }
11
11
 
12
12
  export function resolveAcpSpawn() {
13
- const command = process.env.ACP_AGENT_COMMAND || "agent";
13
+ const command = process.env.ACP_AGENT_COMMAND || "cursor-agent";
14
14
  const args = process.env.ACP_AGENT_ARGS
15
15
  ? splitArgs(process.env.ACP_AGENT_ARGS)
16
16
  : ["acp"];