@kadoa/mcp 0.6.5-rc.1 → 0.6.5

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +20 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -468,7 +468,7 @@ The server starts in HTTP mode. You authenticate via OAuth the same way as with
468
468
  | `MCP_AUTH_JWKS_URL` | JWKS URL for the issuer |
469
469
  | `MCP_AUTH_AUDIENCE` | Exact MCP resource URL served by this deployment; its path must be `/mcp` |
470
470
  | `MCP_DOWNSTREAM_TOKEN_ENDPOINT` | Public API service-authenticated downstream exchange endpoint |
471
- | `MCP_DOWNSTREAM_EXCHANGE_SECRET` | Dedicated service credential shared only with the downstream exchange |
471
+ | `MCP_DOWNSTREAM_EXCHANGE_SECRET` | Dedicated service credential shared only with the downstream exchange; must satisfy the same validation as Public API `KADOA_MCP_DOWNSTREAM_EXCHANGE_SECRET` |
472
472
  | `MCP_ALLOWED_ORIGIN_HOSTNAMES` | Comma-separated hostnames admitted when an HTTP Origin header is present; required outside loopback |
473
473
  | `MCP_LEGACY_TRANSPORT_ENABLED` | `true` serves supported 2025 protocol versions through central auth; `false` rejects them |
474
474
 
package/dist/index.js CHANGED
@@ -47084,7 +47084,7 @@ var package_default;
47084
47084
  var init_package = __esm(() => {
47085
47085
  package_default = {
47086
47086
  name: "@kadoa/mcp",
47087
- version: "0.6.5-rc.1",
47087
+ version: "0.6.5",
47088
47088
  description: "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
47089
47089
  type: "module",
47090
47090
  main: "dist/index.js",
@@ -49264,15 +49264,24 @@ class ServiceDownstreamTokenExchanger {
49264
49264
  this.fetchImpl = fetchImpl;
49265
49265
  }
49266
49266
  async exchange(subjectToken) {
49267
- const response = await this.fetchImpl(this.config.endpoint, {
49268
- method: "POST",
49269
- redirect: "error",
49270
- headers: {
49271
- authorization: `Bearer ${this.config.exchangeSecret}`,
49272
- "content-type": "application/json"
49273
- },
49274
- body: JSON.stringify({ subject_token: subjectToken, resource: this.config.mcpResource })
49275
- });
49267
+ let response;
49268
+ try {
49269
+ response = await this.fetchImpl(this.config.endpoint, {
49270
+ method: "POST",
49271
+ redirect: "error",
49272
+ signal: AbortSignal.timeout(DOWNSTREAM_TOKEN_EXCHANGE_TIMEOUT_MS),
49273
+ headers: {
49274
+ authorization: `Bearer ${this.config.exchangeSecret}`,
49275
+ "content-type": "application/json"
49276
+ },
49277
+ body: JSON.stringify({ subject_token: subjectToken, resource: this.config.mcpResource })
49278
+ });
49279
+ } catch (error) {
49280
+ if (error instanceof Error && error.name === "TimeoutError") {
49281
+ throw new Error("MCP downstream token exchange failed: request timed out");
49282
+ }
49283
+ throw new Error(`MCP downstream token exchange failed: ${error instanceof Error ? error.message : String(error)}`);
49284
+ }
49276
49285
  if (!response.ok) {
49277
49286
  throw new Error(`MCP downstream token exchange failed with status ${response.status}`);
49278
49287
  }
@@ -49290,6 +49299,7 @@ function requestLocalDownstreamTokenProvider(exchanger, subjectToken) {
49290
49299
  return exchange;
49291
49300
  };
49292
49301
  }
49302
+ var DOWNSTREAM_TOKEN_EXCHANGE_TIMEOUT_MS = 5000;
49293
49303
 
49294
49304
  // src/kadoa-access-token.ts
49295
49305
  import { createPublicKey, verify } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kadoa/mcp",
3
- "version": "0.6.5-rc.1",
3
+ "version": "0.6.5",
4
4
  "description": "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",