From b217e0800739674caa896ad1191f1348029dfe95 Mon Sep 17 00:00:00 2001 From: Jeremy Morrell Date: Mon, 24 Mar 2025 12:08:33 -0700 Subject: [PATCH] Add VPN warning --- README.md | 30 ++++++++++++++++++++++++++++++ package.json | 1 + src/cli/proxy.ts | 22 ++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/README.md b/README.md index 7aebd26..12f14e1 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,33 @@ E.g: Claude Desktop or Windsurf Cursor: ![image](https://github.com/user-attachments/assets/14338bfa-a779-4e8a-a477-71f72cc5d99d) + + +## Debugging + +### Restart Claude + +When modifying `claude_desktop_config.json` it can helpful to completely restart Claude + +### VPN Certs + +You may run into issues if you are behind a VPN, you can try setting the `NODE_EXTRA_CA_CERTS` +environment variable to point to the CA certificate file. If using `claude_desktop_config.json`, +this might look like: + +```json +{ + "mcpServers": { + "remote-example": { + "command": "npx", + "args": [ + "mcp-remote", + "https://remote.mcp.server/sse" + ], + "env": { + "NODE_EXTRA_CA_CERTS": "\${your CA certificate file path}.pem" + } + } + } +} +``` diff --git a/package.json b/package.json index 1dd36a3..5cf09a2 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ } }, "scripts": { + "dev": "tsup --watch", "build": "tsup", "check": "prettier --check . && tsc" }, diff --git a/src/cli/proxy.ts b/src/cli/proxy.ts index 60f4966..d705b35 100644 --- a/src/cli/proxy.ts +++ b/src/cli/proxy.ts @@ -63,6 +63,28 @@ async function runProxy(serverUrl: string, callbackPort: number) { setupSignalHandlers(cleanup) } catch (error) { console.error('Fatal error:', error) + if (error instanceof Error && error.message.includes('self-signed certificate in certificate chain')) { + console.error(`You may be behind a VPN! + +If you are behind a VPN, you can try setting the NODE_EXTRA_CA_CERTS environment variable to point +to the CA certificate file. If using claude_desktop_config.json, this might look like: + +{ + "mcpServers": { + "\${mcpServerName}": { + "command": "npx", + "args": [ + "mcp-remote", + "https://remote.mcp.server/sse" + ], + "env": { + "NODE_EXTRA_CA_CERTS": "\${your CA certificate file path}.pem" + } + } + } +} + `) + } server.close() process.exit(1) }