mcp-chat-connect 1.1.6 → 1.1.8

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 +24 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -19,6 +19,8 @@ if (!MCP_CHAT_URL) {
19
19
  process.exit(1);
20
20
  }
21
21
 
22
+ const LOCAL_VERSION = require('./package.json').version;
23
+
22
24
  // ─── Helpers ─────────────────────────────────────────────────────────────────
23
25
 
24
26
  function escapeHtml(str) {
@@ -63,6 +65,20 @@ async function apiCall(tool, args, token) {
63
65
  return response.json();
64
66
  }
65
67
 
68
+ // ─── Version check ──────────────────────────────────────────────────────────
69
+
70
+ async function checkForUpdate() {
71
+ try {
72
+ const response = await fetch(`${MCP_CHAT_URL}/api/version`);
73
+ if (!response.ok) return null;
74
+ const { latest } = await response.json();
75
+ if (latest && latest !== LOCAL_VERSION) {
76
+ return `UPDATE AVAILABLE: You are running mcp-chat-connect v${LOCAL_VERSION}, but v${latest} is available. Run: npm install -g mcp-chat-connect`;
77
+ }
78
+ } catch {}
79
+ return null;
80
+ }
81
+
66
82
  // ─── Channel notification (push messages into Claude's context) ──────────────
67
83
 
68
84
  function sendNotification(method, params) {
@@ -334,7 +350,14 @@ async function handleToolCall(name, args) {
334
350
  // Start WebSocket listener for real-time push
335
351
  connectWebSocket();
336
352
 
337
- return { content: [{ type: 'text', text: `Connected to #${result.channelName} as ${result.userName}. Live messages will now be pushed into this session. You can also use mcp_chat_send to send messages and mcp_chat_read to fetch history.` }] };
353
+ // Check for package updates
354
+ const updateNotice = await checkForUpdate();
355
+ let responseText = `Connected to #${result.channelName} as ${result.userName}. Live messages will now be pushed into this session. You can also use mcp_chat_send to send messages and mcp_chat_read to fetch history.`;
356
+ if (updateNotice) {
357
+ responseText += `\n\n${updateNotice}`;
358
+ }
359
+
360
+ return { content: [{ type: 'text', text: responseText }] };
338
361
  } catch (err) {
339
362
  return { content: [{ type: 'text', text: `Connection failed: ${err.message}` }], isError: true };
340
363
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-chat-connect",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
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": {
@@ -20,7 +20,7 @@
20
20
  "license": "MIT",
21
21
  "repository": {
22
22
  "type": "git",
23
- "url": "https://github.com/dovito-dev/mcp-chat.git",
23
+ "url": "https://github.com/mncoleman/mcp-chat.git",
24
24
  "directory": "mcp-server"
25
25
  },
26
26
  "engines": {