mcp-remote 0.0.19 → 0.0.20

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.
@@ -14,7 +14,7 @@ var require_package = __commonJS({
14
14
  "package.json"(exports, module) {
15
15
  module.exports = {
16
16
  name: "mcp-remote",
17
- version: "0.0.19",
17
+ version: "0.0.20",
18
18
  description: "Remote proxy for Model Context Protocol, allowing local-only clients to connect to remote servers using oAuth",
19
19
  keywords: [
20
20
  "mcp",
@@ -125,13 +125,17 @@ async function connectToRemoteServer(serverUrl, authProvider, headers, waitForAu
125
125
  const url = new URL(serverUrl);
126
126
  const eventSourceInit = {
127
127
  fetch: (url2, init) => {
128
- return fetch(url2, {
129
- ...init,
130
- headers: {
131
- ...init?.headers,
132
- ...headers
133
- }
134
- });
128
+ return Promise.resolve(authProvider?.tokens?.()).then(
129
+ (tokens) => fetch(url2, {
130
+ ...init,
131
+ headers: {
132
+ ...init?.headers,
133
+ ...headers,
134
+ ...tokens?.access_token ? { Authorization: `Bearer ${tokens.access_token}` } : {},
135
+ Accept: "text/event-stream"
136
+ }
137
+ })
138
+ );
135
139
  }
136
140
  };
137
141
  const transport = new SSEClientTransport(url, {
package/dist/client.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  log,
8
8
  parseCommandLineArgs,
9
9
  setupSignalHandlers
10
- } from "./chunk-CPAWKS46.js";
10
+ } from "./chunk-VQ556LTN.js";
11
11
 
12
12
  // src/client.ts
13
13
  import { EventEmitter } from "events";
package/dist/proxy.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  mcpProxy,
9
9
  parseCommandLineArgs,
10
10
  setupSignalHandlers
11
- } from "./chunk-CPAWKS46.js";
11
+ } from "./chunk-VQ556LTN.js";
12
12
 
13
13
  // src/proxy.ts
14
14
  import { EventEmitter } from "events";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-remote",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
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",