conductor-node-mcp 14.1.0 → 14.2.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/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2025 Conductor
189
+ Copyright 2026 Conductor
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -52,7 +52,7 @@ If you use Claude Code, you can install the MCP server by running the command be
52
52
  environment variables in Claude Code's `.claude.json`, which can be found in your home directory.
53
53
 
54
54
  ```
55
- claude mcp add --transport stdio conductor_node_api --env CONDUCTOR_SECRET_KEY="Your CONDUCTOR_SECRET_KEY here." -- npx -y conductor-node-mcp
55
+ claude mcp add conductor_node_mcp_api --env CONDUCTOR_SECRET_KEY="Your CONDUCTOR_SECRET_KEY here." -- npx -y conductor-node-mcp
56
56
  ```
57
57
 
58
58
  ## Code Mode
@@ -1,16 +1,13 @@
1
1
  import { ClientOptions } from 'conductor-node';
2
2
  export type WorkerInput = {
3
- opts: ClientOptions;
3
+ project_name: string;
4
4
  code: string;
5
+ client_opts: ClientOptions;
5
6
  };
6
- export type WorkerSuccess = {
7
+ export type WorkerOutput = {
8
+ is_error: boolean;
7
9
  result: unknown | null;
8
- logLines: string[];
9
- errLines: string[];
10
- };
11
- export type WorkerError = {
12
- message: string | undefined;
13
- logLines: string[];
14
- errLines: string[];
10
+ log_lines: string[];
11
+ err_lines: string[];
15
12
  };
16
13
  //# sourceMappingURL=code-tool-types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool-types.d.mts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"code-tool-types.d.mts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC"}
@@ -1,16 +1,13 @@
1
1
  import { ClientOptions } from 'conductor-node';
2
2
  export type WorkerInput = {
3
- opts: ClientOptions;
3
+ project_name: string;
4
4
  code: string;
5
+ client_opts: ClientOptions;
5
6
  };
6
- export type WorkerSuccess = {
7
+ export type WorkerOutput = {
8
+ is_error: boolean;
7
9
  result: unknown | null;
8
- logLines: string[];
9
- errLines: string[];
10
- };
11
- export type WorkerError = {
12
- message: string | undefined;
13
- logLines: string[];
14
- errLines: string[];
10
+ log_lines: string[];
11
+ err_lines: string[];
15
12
  };
16
13
  //# sourceMappingURL=code-tool-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool-types.d.ts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"code-tool-types.d.ts","sourceRoot":"","sources":["src/code-tool-types.ts"],"names":[],"mappings":"OAEO,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,aAAa,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAiD;AAIjE;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA8ClC"}
1
+ {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAgE;AAIhF;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAwDlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAiD;AAIjE;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA8ClC"}
1
+ {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAgE;AAIhF;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CAwDlC"}
package/code-tool.js CHANGED
@@ -38,14 +38,24 @@ function codeTool() {
38
38
  },
39
39
  body: JSON.stringify({
40
40
  project_name: 'conductor',
41
- client_opts: {},
42
41
  code,
42
+ client_opts: {},
43
43
  }),
44
44
  });
45
45
  if (!res.ok) {
46
46
  throw new Error(`${res.status}: ${res.statusText} error when trying to contact Code Tool server. Details: ${await res.text()}`);
47
47
  }
48
- return (0, types_1.asTextContentResult)((await res.json()));
48
+ const { is_error, result, log_lines, err_lines } = (await res.json());
49
+ const hasLogs = log_lines.length > 0 || err_lines.length > 0;
50
+ const output = {
51
+ result,
52
+ ...(log_lines.length > 0 && { log_lines }),
53
+ ...(err_lines.length > 0 && { err_lines }),
54
+ };
55
+ if (is_error) {
56
+ return (0, types_1.asErrorResult)(typeof result === 'string' && !hasLogs ? result : JSON.stringify(output, null, 2));
57
+ }
58
+ return (0, types_1.asTextContentResult)(output);
49
59
  };
50
60
  return { metadata, tool, handler };
51
61
  }
package/code-tool.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.js","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAetF,4BA8CC;AA3DD,sCAAiF;AAEjF,wCAAmC;AAEnC;;;;;;;;GAQG;AACH,SAAgB,QAAQ;IACtB,MAAM,QAAQ,GAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,E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1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { asTextContentResult } from "./types.mjs";
2
+ import { asErrorResult, asTextContentResult } from "./types.mjs";
3
3
  import { readEnv } from "./server.mjs";
4
4
  /**
5
5
  * A tool that runs code against a copy of the SDK.
@@ -35,14 +35,24 @@ export function codeTool() {
35
35
  },
36
36
  body: JSON.stringify({
37
37
  project_name: 'conductor',
38
- client_opts: {},
39
38
  code,
39
+ client_opts: {},
40
40
  }),
41
41
  });
42
42
  if (!res.ok) {
43
43
  throw new Error(`${res.status}: ${res.statusText} error when trying to contact Code Tool server. Details: ${await res.text()}`);
44
44
  }
45
- return asTextContentResult((await res.json()));
45
+ const { is_error, result, log_lines, err_lines } = (await res.json());
46
+ const hasLogs = log_lines.length > 0 || err_lines.length > 0;
47
+ const output = {
48
+ result,
49
+ ...(log_lines.length > 0 && { log_lines }),
50
+ ...(err_lines.length > 0 && { err_lines }),
51
+ };
52
+ if (is_error) {
53
+ return asErrorResult(typeof result === 'string' && !hasLogs ? result : JSON.stringify(output, null, 2));
54
+ }
55
+ return asTextContentResult(output);
46
56
  };
47
57
  return { metadata, tool, handler };
48
58
  }
package/code-tool.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.mjs","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAqC,mBAAmB,EAAE;OAE1D,EAAE,OAAO,EAAE;AAElB;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ;IACtB,MAAM,QAAQ,GAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC7E,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EACT,iiCAAiiC;QACniC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QA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AAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,MAAM,KACX,GAAG,CAAC,UACN,4DAA4D,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;QACJ,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAiB,CAAC;QACtF,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG;YACb,MAAM;YACN,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;YAC1C,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC;SAC3C,CAAC;QACF,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,aAAa,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC1G,CAAC;QACD,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conductor-node-mcp",
3
- "version": "14.1.0",
3
+ "version": "14.2.0",
4
4
  "description": "The official MCP Server for the Conductor API",
5
5
  "author": "Conductor <support@conductor.is>",
6
6
  "types": "./index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "fix": "eslint --fix --ext ts,js ."
28
28
  },
29
29
  "dependencies": {
30
- "conductor-node": "^14.1.0",
30
+ "conductor-node": "^14.2.0",
31
31
  "@cloudflare/cabidela": "^0.2.4",
32
32
  "@modelcontextprotocol/sdk": "^1.24.0",
33
33
  "@valtown/deno-http-worker": "^0.0.21",
package/server.js CHANGED
@@ -15,7 +15,7 @@ const code_tool_1 = require("./code-tool.js");
15
15
  const docs_search_tool_1 = __importDefault(require("./docs-search-tool.js"));
16
16
  const newMcpServer = () => new mcp_js_1.McpServer({
17
17
  name: 'conductor_node_api',
18
- version: '14.1.0',
18
+ version: '14.2.0',
19
19
  }, { capabilities: { tools: {}, logging: {} } });
20
20
  exports.newMcpServer = newMcpServer;
21
21
  // Create server instance
package/server.mjs CHANGED
@@ -6,7 +6,7 @@ import { codeTool } from "./code-tool.mjs";
6
6
  import docsSearchTool from "./docs-search-tool.mjs";
7
7
  export const newMcpServer = () => new McpServer({
8
8
  name: 'conductor_node_api',
9
- version: '14.1.0',
9
+ version: '14.2.0',
10
10
  }, { capabilities: { tools: {}, logging: {} } });
11
11
  // Create server instance
12
12
  export const server = newMcpServer();
@@ -3,16 +3,13 @@
3
3
  import { ClientOptions } from 'conductor-node';
4
4
 
5
5
  export type WorkerInput = {
6
- opts: ClientOptions;
6
+ project_name: string;
7
7
  code: string;
8
+ client_opts: ClientOptions;
8
9
  };
9
- export type WorkerSuccess = {
10
+ export type WorkerOutput = {
11
+ is_error: boolean;
10
12
  result: unknown | null;
11
- logLines: string[];
12
- errLines: string[];
13
- };
14
- export type WorkerError = {
15
- message: string | undefined;
16
- logLines: string[];
17
- errLines: string[];
13
+ log_lines: string[];
14
+ err_lines: string[];
18
15
  };
package/src/code-tool.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { McpTool, Metadata, ToolCallResult, asTextContentResult } from './types';
3
+ import { McpTool, Metadata, ToolCallResult, asErrorResult, asTextContentResult } from './types';
4
4
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
5
5
  import { readEnv } from './server';
6
- import { WorkerSuccess } from './code-tool-types';
6
+ import { WorkerInput, WorkerOutput } from './code-tool-types';
7
7
  /**
8
8
  * A tool that runs code against a copy of the SDK.
9
9
  *
@@ -42,9 +42,9 @@ export function codeTool(): McpTool {
42
42
  },
43
43
  body: JSON.stringify({
44
44
  project_name: 'conductor',
45
- client_opts: {},
46
45
  code,
47
- }),
46
+ client_opts: {},
47
+ } satisfies WorkerInput),
48
48
  });
49
49
 
50
50
  if (!res.ok) {
@@ -55,7 +55,17 @@ export function codeTool(): McpTool {
55
55
  );
56
56
  }
57
57
 
58
- return asTextContentResult((await res.json()) as WorkerSuccess);
58
+ const { is_error, result, log_lines, err_lines } = (await res.json()) as WorkerOutput;
59
+ const hasLogs = log_lines.length > 0 || err_lines.length > 0;
60
+ const output = {
61
+ result,
62
+ ...(log_lines.length > 0 && { log_lines }),
63
+ ...(err_lines.length > 0 && { err_lines }),
64
+ };
65
+ if (is_error) {
66
+ return asErrorResult(typeof result === 'string' && !hasLogs ? result : JSON.stringify(output, null, 2));
67
+ }
68
+ return asTextContentResult(output);
59
69
  };
60
70
 
61
71
  return { metadata, tool, handler };
package/src/server.ts CHANGED
@@ -21,7 +21,7 @@ export const newMcpServer = () =>
21
21
  new McpServer(
22
22
  {
23
23
  name: 'conductor_node_api',
24
- version: '14.1.0',
24
+ version: '14.2.0',
25
25
  },
26
26
  { capabilities: { tools: {}, logging: {} } },
27
27
  );