mcp-chat-connect 1.1.5 → 1.1.6

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.
Files changed (2) hide show
  1. package/index.js +9 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -11,7 +11,13 @@ const WebSocket = require('ws');
11
11
  const CONFIG_DIR = path.join(require('os').homedir(), '.mcp-chat');
12
12
  const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
13
13
 
14
- const MCP_CHAT_URL = process.env.MCP_CHAT_URL || 'https://mcpchat.dovito.com';
14
+ const MCP_CHAT_URL = process.env.MCP_CHAT_URL;
15
+ if (!MCP_CHAT_URL) {
16
+ process.stderr.write('FATAL: MCP_CHAT_URL environment variable is required.\n');
17
+ process.stderr.write('Set it when adding the MCP server, e.g.:\n');
18
+ process.stderr.write(' claude mcp add -e MCP_CHAT_URL=https://your-domain.com -s user mcp-chat $(which mcp-chat-connect)\n');
19
+ process.exit(1);
20
+ }
15
21
 
16
22
  // ─── Helpers ─────────────────────────────────────────────────────────────────
17
23
 
@@ -79,6 +85,8 @@ let wsReconnectTimeout = null;
79
85
  function connectWebSocket() {
80
86
  if (!sessionState.connected || !sessionState.token || !sessionState.channelId) return;
81
87
 
88
+ // Note: JWT is passed as a query parameter because WebSocket does not support custom headers.
89
+ // Be aware this token may appear in server/proxy access logs.
82
90
  const wsUrl = `${MCP_CHAT_URL.replace('https://', 'wss://').replace('http://', 'ws://')}/ws?token=${sessionState.token}&channel=${sessionState.channelId}&session=${sessionState.sessionToken}`;
83
91
 
84
92
  if (wsConnection) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-chat-connect",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "MCP server with channels support for connecting Claude Code sessions to MCP Chat -- real-time team messaging for AI-assisted development",
5
5
  "main": "index.js",
6
6
  "bin": {