mcp-remote 0.0.20 → 0.0.21

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
@@ -55,6 +55,23 @@ To bypass authentication, or to emit custom headers on all requests to your remo
55
55
  }
56
56
  ```
57
57
 
58
+ **Note:** Cursor has a bug where spaces inside `args` aren't escaped when it invokes `npx`, which ends up mangling these values. You can work around it using:
59
+
60
+ ```jsonc
61
+ {
62
+ // rest of config...
63
+ "args": [
64
+ "mcp-remote",
65
+ "https://remote.mcp.server/sse",
66
+ "--header",
67
+ "Authorization:${AUTH_HEADER}" // note no spaces around ':'
68
+ ]
69
+ },
70
+ "env": {
71
+ "AUTH_HEADER": "Bearer <auth-token>" // spaces OK in env vars
72
+ }
73
+ ```
74
+
58
75
  ### Flags
59
76
 
60
77
  * If `npx` is producing errors, consider adding `-y` as the first argument to auto-accept the installation of the `mcp-remote` package.
@@ -87,6 +104,16 @@ To bypass authentication, or to emit custom headers on all requests to your remo
87
104
  ]
88
105
  ```
89
106
 
107
+ * To allow HTTP connections in trusted private networks, add the `--allow-http` flag. Note: This should only be used in secure private networks where traffic cannot be intercepted.
108
+
109
+ ```json
110
+ "args": [
111
+ "mcp-remote",
112
+ "http://internal-service.vpc/sse",
113
+ "--allow-http"
114
+ ]
115
+ ```
116
+
90
117
  ### Claude Desktop
91
118
 
92
119
  [Official Docs](https://modelcontextprotocol.io/quickstart/user)
@@ -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.20",
17
+ version: "0.0.21",
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",
@@ -271,13 +271,15 @@ async function parseCommandLineArgs(args, defaultPort, usage) {
271
271
  });
272
272
  const serverUrl = args[0];
273
273
  const specifiedPort = args[1] ? parseInt(args[1]) : void 0;
274
+ const allowHttp = args.includes("--allow-http");
274
275
  if (!serverUrl) {
275
276
  log(usage);
276
277
  process.exit(1);
277
278
  }
278
279
  const url = new URL(serverUrl);
279
280
  const isLocalhost = (url.hostname === "localhost" || url.hostname === "127.0.0.1") && url.protocol === "http:";
280
- if (!(url.protocol == "https:" || isLocalhost)) {
281
+ if (!(url.protocol == "https:" || isLocalhost || allowHttp)) {
282
+ log("Error: Non-HTTPS URLs are only allowed for localhost or when --allow-http flag is provided");
281
283
  log(usage);
282
284
  process.exit(1);
283
285
  }
@@ -438,11 +440,15 @@ var NodeOAuthClientProvider = class {
438
440
  this.callbackPath = options.callbackPath || "/oauth/callback";
439
441
  this.clientName = options.clientName || "MCP CLI Client";
440
442
  this.clientUri = options.clientUri || "https://github.com/modelcontextprotocol/mcp-cli";
443
+ this.softwareId = options.softwareId || "2e6dc280-f3c3-4e01-99a7-8181dbd1d23d";
444
+ this.softwareVersion = options.softwareVersion || MCP_REMOTE_VERSION;
441
445
  }
442
446
  serverUrlHash;
443
447
  callbackPath;
444
448
  clientName;
445
449
  clientUri;
450
+ softwareId;
451
+ softwareVersion;
446
452
  get redirectUrl() {
447
453
  return `http://127.0.0.1:${this.options.callbackPort}${this.callbackPath}`;
448
454
  }
@@ -453,7 +459,9 @@ var NodeOAuthClientProvider = class {
453
459
  grant_types: ["authorization_code", "refresh_token"],
454
460
  response_types: ["code"],
455
461
  client_name: this.clientName,
456
- client_uri: this.clientUri
462
+ client_uri: this.clientUri,
463
+ software_id: this.softwareId,
464
+ software_version: this.softwareVersion
457
465
  };
458
466
  }
459
467
  /**
package/dist/client.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  log,
8
8
  parseCommandLineArgs,
9
9
  setupSignalHandlers
10
- } from "./chunk-VQ556LTN.js";
10
+ } from "./chunk-LWDSICAM.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-VQ556LTN.js";
11
+ } from "./chunk-LWDSICAM.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.20",
3
+ "version": "0.0.21",
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",