mcp-remote 0.1.32 → 0.1.34

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/README.md CHANGED
@@ -110,7 +110,7 @@ Each unique combination of server URL, resource, and custom headers will maintai
110
110
  ```json
111
111
  "command": "npx",
112
112
  "args": [
113
- "-y"
113
+ "-y",
114
114
  "mcp-remote",
115
115
  "https://remote.mcp.server/sse"
116
116
  ]
@@ -11872,7 +11872,7 @@ var Client = class extends Protocol {
11872
11872
  };
11873
11873
 
11874
11874
  // package.json
11875
- var version = "0.1.31";
11875
+ var version = "0.1.33";
11876
11876
 
11877
11877
  // node_modules/.pnpm/pkce-challenge@5.0.0/node_modules/pkce-challenge/dist/index.node.js
11878
11878
  var crypto;
@@ -14068,8 +14068,11 @@ async function connectToRemoteServer(client, serverUrl, authProvider, headers, a
14068
14068
  log(`Connected to remote server using ${transport.constructor.name}`);
14069
14069
  return transport;
14070
14070
  } catch (error) {
14071
- if (error instanceof Error && shouldAttemptFallback2 && (error.message.includes("405") || error.message.includes("Method Not Allowed") || error.message.includes("404") || error.message.includes("Not Found"))) {
14072
- log(`Received error: ${error.message}`);
14071
+ const isStreamableHTTPError = error instanceof StreamableHTTPError;
14072
+ const httpStatusCode = isStreamableHTTPError ? error.code : null;
14073
+ const shouldFallbackOnError = shouldAttemptFallback2 && error instanceof Error && (httpStatusCode === 404 || httpStatusCode === 405 || error.message.includes("405") || error.message.includes("Method Not Allowed") || error.message.includes("404") || error.message.includes("Not Found"));
14074
+ if (shouldFallbackOnError) {
14075
+ log(`Received error (status ${httpStatusCode ?? "unknown"}): ${error.message}`);
14073
14076
  if (recursionReasons.has(REASON_TRANSPORT_FALLBACK)) {
14074
14077
  const errorMessage = `Already attempted transport fallback. Giving up.`;
14075
14078
  log(errorMessage);
@@ -14195,7 +14198,7 @@ function setupOAuthCallbackServerWithLongPoll(options) {
14195
14198
  `);
14196
14199
  options.events.emit("auth-code-received", code);
14197
14200
  });
14198
- const server = app.listen(options.port, () => {
14201
+ const server = app.listen(options.port, "127.0.0.1", () => {
14199
14202
  log(`OAuth callback server running at http://127.0.0.1:${options.port}`);
14200
14203
  });
14201
14204
  const waitForAuthCode = () => {
package/dist/client.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  parseCommandLineArgs,
13
13
  setupSignalHandlers,
14
14
  version
15
- } from "./chunk-K6EVCR35.js";
15
+ } from "./chunk-AWBQ5KVS.js";
16
16
 
17
17
  // src/client.ts
18
18
  import { EventEmitter } from "events";
package/dist/proxy.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  mcpProxy,
11
11
  parseCommandLineArgs,
12
12
  setupSignalHandlers
13
- } from "./chunk-K6EVCR35.js";
13
+ } from "./chunk-AWBQ5KVS.js";
14
14
 
15
15
  // src/proxy.ts
16
16
  import { EventEmitter } from "events";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-remote",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
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",