align-mcp-remote 0.1.40 → 0.1.41

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.
@@ -15632,7 +15632,7 @@ var Client = class extends Protocol {
15632
15632
  };
15633
15633
 
15634
15634
  // package.json
15635
- var version2 = "0.1.39";
15635
+ var version2 = "0.1.40";
15636
15636
 
15637
15637
  // node_modules/pkce-challenge/dist/index.node.js
15638
15638
  var crypto;
@@ -18113,9 +18113,24 @@ async function performDownstreamAuth(authProvider, downstreamResource, callbackP
18113
18113
  const host = authProvider.options.host || "localhost";
18114
18114
  const redirectUrl = `http://${host}:${downstreamCallbackPort}/oauth/callback`;
18115
18115
  const scope = downstreamResource.scopes_required?.join(" ") ?? "";
18116
+ const downstreamClientMetadata = {
18117
+ redirect_uris: [redirectUrl],
18118
+ token_endpoint_auth_method: "none",
18119
+ grant_types: ["authorization_code", "refresh_token"],
18120
+ response_types: ["code"],
18121
+ client_name: authProvider.options.clientName || "MCP CLI Client",
18122
+ scope
18123
+ };
18124
+ const downstreamClientInfo = await registerClient(downstreamAs, {
18125
+ metadata: downstreamServerMetadata,
18126
+ clientMetadata: downstreamClientMetadata
18127
+ });
18128
+ debugLog("Registered downstream client", { client_id: downstreamClientInfo.client_id });
18129
+ const downstreamHash = crypto2.createHash("md5").update(downstreamAs).digest("hex");
18130
+ await writeJsonFile(downstreamHash, "downstream_client_info.json", downstreamClientInfo);
18116
18131
  const { authorizationUrl, codeVerifier } = await startAuthorization(downstreamAs, {
18117
18132
  metadata: downstreamServerMetadata,
18118
- clientInformation: await authProvider.clientInformation(),
18133
+ clientInformation: downstreamClientInfo,
18119
18134
  redirectUrl,
18120
18135
  scope,
18121
18136
  resource: new URL(downstreamResource.resource)
@@ -18135,7 +18150,7 @@ ${authorizationUrl.toString()}
18135
18150
  const code = await waitForDownstreamCode();
18136
18151
  const tokens = await exchangeAuthorization(downstreamAs, {
18137
18152
  metadata: downstreamServerMetadata,
18138
- clientInformation: await authProvider.clientInformation(),
18153
+ clientInformation: downstreamClientInfo,
18139
18154
  authorizationCode: code,
18140
18155
  codeVerifier,
18141
18156
  redirectUri: redirectUrl
package/dist/client.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  performDownstreamAuth,
14
14
  setupSignalHandlers,
15
15
  version
16
- } from "./chunk-X7AWYUMO.js";
16
+ } from "./chunk-YCBPOVTL.js";
17
17
 
18
18
  // src/client.ts
19
19
  import { EventEmitter } from "events";
package/dist/proxy.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  parseCommandLineArgs,
12
12
  performDownstreamAuth,
13
13
  setupSignalHandlers
14
- } from "./chunk-X7AWYUMO.js";
14
+ } from "./chunk-YCBPOVTL.js";
15
15
 
16
16
  // src/proxy.ts
17
17
  import { EventEmitter } from "events";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "align-mcp-remote",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "Remote proxy for Model Context Protocol, allowing local-only clients to connect to remote servers using oAuth",
5
5
  "keywords": [
6
6
  "mcp",