@actiondock/mcp 2.4.1 → 2.5.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/dist/http.js CHANGED
@@ -190,12 +190,13 @@ export function startMcpHttpServer(options = {}) {
190
190
  ...corsHeaders,
191
191
  },
192
192
  });
193
- });
193
+ }, options.tls);
194
194
  if (server.ready) {
195
195
  await server.ready;
196
196
  }
197
197
  const actualHost = host === "0.0.0.0" ? "127.0.0.1" : host;
198
- const url = `http://${formatHostForUrl(actualHost)}:${server.port}`;
198
+ const protocol = options.tls ? "https" : "http";
199
+ const url = `${protocol}://${formatHostForUrl(actualHost)}:${server.port}`;
199
200
  return {
200
201
  port: server.port ?? port,
201
202
  host,
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ActionDockApp, ActionDockHost, ActionDockTarget, RuntimeStorage } from "@actiondock/core";
1
+ import type { ActionDockApp, ActionDockHost, ActionDockTarget, RuntimeStorage, ServerTlsOptions } from "@actiondock/core";
2
2
  import type { ActionDefinition, RunRecord, RunStatus } from "@actiondock/sdk";
3
3
  /**
4
4
  * MCP 任务状态枚举(兼容 Model Context Protocol Task 规范)。
@@ -91,6 +91,8 @@ export interface HttpSecurityOptions {
91
91
  allowInsecureHttp?: boolean;
92
92
  corsOrigins?: string[];
93
93
  maxBodyBytes?: number;
94
+ /** 服务端 TLS/HTTPS 安全传输选项 */
95
+ tls?: ServerTlsOptions;
94
96
  }
95
97
  export interface ActionDockMcpHttpOptions extends Omit<ActionDockMcpOptions, "host">, Omit<HttpSecurityOptions, "host"> {
96
98
  host?: string | ActionDockHost;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actiondock/mcp",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "ActionDock MCP Adapter for exposing Actions as Model Context Protocol (MCP) Tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "test": "node ../../scripts/run-tests.ts"
30
30
  },
31
31
  "dependencies": {
32
- "@actiondock/core": "^2.4.1",
33
- "@actiondock/sdk": "^2.4.1",
32
+ "@actiondock/core": "^2.5.0",
33
+ "@actiondock/sdk": "^2.5.0",
34
34
  "@modelcontextprotocol/server": "^2.0.0"
35
35
  },
36
36
  "devDependencies": {