mcp-remote 0.1.2 → 0.1.4
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 +1 -1
- package/dist/{chunk-XFJBHM5U.js → chunk-YE4P5JSH.js} +27 -10
- package/dist/client.js +1 -1
- package/dist/proxy.js +1 -1
- package/package.json +2 -6
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ To bypass authentication, or to emit custom headers on all requests to your remo
|
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
**Note:** Cursor
|
|
58
|
+
**Note:** Cursor and Claude Desktop (Windows) have 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
59
|
|
|
60
60
|
```jsonc
|
|
61
61
|
{
|
|
@@ -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.1.
|
|
17
|
+
version: "0.1.4",
|
|
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",
|
|
@@ -49,9 +49,7 @@ var require_package = __commonJS({
|
|
|
49
49
|
"@modelcontextprotocol/sdk": "^1.10.2",
|
|
50
50
|
"@types/express": "^5.0.0",
|
|
51
51
|
"@types/node": "^22.13.10",
|
|
52
|
-
"@types/react": "^19.0.12",
|
|
53
52
|
prettier: "^3.5.3",
|
|
54
|
-
react: "^19.0.0",
|
|
55
53
|
tsup: "^8.4.0",
|
|
56
54
|
tsx: "^4.19.3",
|
|
57
55
|
typescript: "^5.8.2"
|
|
@@ -67,9 +65,7 @@ var require_package = __commonJS({
|
|
|
67
65
|
dts: true,
|
|
68
66
|
clean: true,
|
|
69
67
|
outDir: "dist",
|
|
70
|
-
external: [
|
|
71
|
-
"react"
|
|
72
|
-
]
|
|
68
|
+
external: []
|
|
73
69
|
}
|
|
74
70
|
};
|
|
75
71
|
}
|
|
@@ -6593,11 +6589,18 @@ function log(str, ...rest) {
|
|
|
6593
6589
|
function mcpProxy({ transportToClient, transportToServer }) {
|
|
6594
6590
|
let transportToClientClosed = false;
|
|
6595
6591
|
let transportToServerClosed = false;
|
|
6596
|
-
transportToClient.onmessage = (
|
|
6592
|
+
transportToClient.onmessage = (_message) => {
|
|
6593
|
+
const message = _message;
|
|
6597
6594
|
log("[Local\u2192Remote]", message.method || message.id);
|
|
6595
|
+
if (message.method === "initialize") {
|
|
6596
|
+
const { clientInfo } = message.params;
|
|
6597
|
+
if (clientInfo) clientInfo.name = `${clientInfo.name} (via mcp-remote ${MCP_REMOTE_VERSION})`;
|
|
6598
|
+
log(JSON.stringify(message, null, 2));
|
|
6599
|
+
}
|
|
6598
6600
|
transportToServer.send(message).catch(onServerError);
|
|
6599
6601
|
};
|
|
6600
|
-
transportToServer.onmessage = (
|
|
6602
|
+
transportToServer.onmessage = (_message) => {
|
|
6603
|
+
const message = _message;
|
|
6601
6604
|
log("[Remote\u2192Local]", message.method || message.id);
|
|
6602
6605
|
transportToClient.send(message).catch(onClientError);
|
|
6603
6606
|
};
|
|
@@ -6760,7 +6763,16 @@ function setupOAuthCallbackServerWithLongPoll(options) {
|
|
|
6760
6763
|
authCode = code;
|
|
6761
6764
|
log("Auth code received, resolving promise");
|
|
6762
6765
|
authCompletedResolve(code);
|
|
6763
|
-
res.send(
|
|
6766
|
+
res.send(`
|
|
6767
|
+
Authorization successful!
|
|
6768
|
+
You may close this window and return to the CLI.
|
|
6769
|
+
<script>
|
|
6770
|
+
// If this is a non-interactive session (no manual approval step was required) then
|
|
6771
|
+
// this should automatically close the window. If not, this will have no effect and
|
|
6772
|
+
// the user will see the message above.
|
|
6773
|
+
window.close();
|
|
6774
|
+
</script>
|
|
6775
|
+
`);
|
|
6764
6776
|
options.events.emit("auth-code-received", code);
|
|
6765
6777
|
});
|
|
6766
6778
|
const server = app.listen(options.port, () => {
|
|
@@ -6870,6 +6882,11 @@ function setupSignalHandlers(cleanup) {
|
|
|
6870
6882
|
process.exit(0);
|
|
6871
6883
|
});
|
|
6872
6884
|
process.stdin.resume();
|
|
6885
|
+
process.stdin.on("end", async () => {
|
|
6886
|
+
log("\nShutting down...");
|
|
6887
|
+
await cleanup();
|
|
6888
|
+
process.exit(0);
|
|
6889
|
+
});
|
|
6873
6890
|
}
|
|
6874
6891
|
function getServerUrlHash(serverUrl) {
|
|
6875
6892
|
return crypto2.createHash("md5").update(serverUrl).digest("hex");
|
|
@@ -7003,7 +7020,7 @@ var NodeOAuthClientProvider = class {
|
|
|
7003
7020
|
softwareId;
|
|
7004
7021
|
softwareVersion;
|
|
7005
7022
|
get redirectUrl() {
|
|
7006
|
-
return `http://
|
|
7023
|
+
return `http://localhost:${this.options.callbackPort}${this.callbackPath}`;
|
|
7007
7024
|
}
|
|
7008
7025
|
get clientMetadata() {
|
|
7009
7026
|
return {
|
package/dist/client.js
CHANGED
package/dist/proxy.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-remote",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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",
|
|
@@ -35,9 +35,7 @@
|
|
|
35
35
|
"@modelcontextprotocol/sdk": "^1.10.2",
|
|
36
36
|
"@types/express": "^5.0.0",
|
|
37
37
|
"@types/node": "^22.13.10",
|
|
38
|
-
"@types/react": "^19.0.12",
|
|
39
38
|
"prettier": "^3.5.3",
|
|
40
|
-
"react": "^19.0.0",
|
|
41
39
|
"tsup": "^8.4.0",
|
|
42
40
|
"tsx": "^4.19.3",
|
|
43
41
|
"typescript": "^5.8.2"
|
|
@@ -53,8 +51,6 @@
|
|
|
53
51
|
"dts": true,
|
|
54
52
|
"clean": true,
|
|
55
53
|
"outDir": "dist",
|
|
56
|
-
"external": [
|
|
57
|
-
"react"
|
|
58
|
-
]
|
|
54
|
+
"external": []
|
|
59
55
|
}
|
|
60
56
|
}
|