chrometools-mcp 3.5.2 → 3.5.3
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/CHANGELOG.md +7 -0
- package/bridge/bridge-client.js +12 -7
- package/browser/browser-manager.js +1 -1
- package/index.js +2 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [3.5.3] - 2026-02-16
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Bridge connection errors flooding stderr** — Bridge client no longer prints `console.error` on connection failures (ECONNREFUSED). All bridge connection errors are now debug-level only (visible with `DEBUG=1`). Fixes MCP clients showing scary error messages for users without Chrome Extension
|
|
9
|
+
- **Unwanted auto-reconnect on startup** — `scheduleReconnect` now only triggers when a previously established connection is lost, not on initial connection failure. Eliminates 5 retry attempts when bridge service is simply not running
|
|
10
|
+
- **Removed auto-install bridge from startup** — Bridge auto-installation via `reg add` (Windows registry) was running on every server start, which is intrusive and unnecessary for users without Chrome Extension. Bridge installation remains available via `npx chrometools-mcp --install-bridge`
|
|
11
|
+
|
|
5
12
|
## [3.5.2] - 2026-02-16
|
|
6
13
|
|
|
7
14
|
### Added
|
package/bridge/bridge-client.js
CHANGED
|
@@ -89,7 +89,7 @@ export async function connectToBridge() {
|
|
|
89
89
|
ws = new WebSocket(`ws://127.0.0.1:${BRIDGE_PORT}`);
|
|
90
90
|
|
|
91
91
|
const connectTimeout = setTimeout(() => {
|
|
92
|
-
|
|
92
|
+
debugLog('Bridge connection timeout (5s)');
|
|
93
93
|
logToFile('TIMEOUT: Connection timeout after 5s');
|
|
94
94
|
ws?.close();
|
|
95
95
|
resolve(false);
|
|
@@ -115,22 +115,27 @@ export async function connectToBridge() {
|
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
ws.on('close', (code, reason) => {
|
|
118
|
-
|
|
118
|
+
debugLog(`Bridge disconnected (code=${code}, reason=${reason || 'none'})`);
|
|
119
119
|
logToFile(`CLOSE: WebSocket closed, code=${code}, reason=${reason || 'none'}`);
|
|
120
|
+
const wasConnected = isConnected;
|
|
120
121
|
isConnected = false;
|
|
121
122
|
ws = null;
|
|
122
|
-
|
|
123
|
+
// Only reconnect if we were previously connected (lost connection)
|
|
124
|
+
// Don't reconnect if initial connection failed (bridge not running)
|
|
125
|
+
if (wasConnected) {
|
|
126
|
+
scheduleReconnect();
|
|
127
|
+
}
|
|
123
128
|
});
|
|
124
129
|
|
|
125
130
|
ws.on('error', (error) => {
|
|
126
131
|
clearTimeout(connectTimeout);
|
|
127
|
-
|
|
132
|
+
debugLog(`Bridge connection error: ${error.message}`);
|
|
128
133
|
logToFile(`ERROR: WebSocket error: ${error.message}`);
|
|
129
134
|
resolve(false);
|
|
130
135
|
});
|
|
131
136
|
|
|
132
137
|
} catch (error) {
|
|
133
|
-
|
|
138
|
+
debugLog(`Failed to create WebSocket: ${error.message}`);
|
|
134
139
|
logToFile(`EXCEPTION: Failed to create WebSocket: ${error.message}`);
|
|
135
140
|
resolve(false);
|
|
136
141
|
}
|
|
@@ -143,12 +148,12 @@ export async function connectToBridge() {
|
|
|
143
148
|
function scheduleReconnect() {
|
|
144
149
|
if (reconnectTimer) return;
|
|
145
150
|
if (reconnectAttempts >= MAX_RECONNECT_ATTEMPTS) {
|
|
146
|
-
|
|
151
|
+
debugLog(`Bridge: max reconnect attempts (${MAX_RECONNECT_ATTEMPTS}) reached, giving up`);
|
|
147
152
|
return;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
reconnectAttempts++;
|
|
151
|
-
debugLog(`Scheduling reconnect attempt ${reconnectAttempts}/${MAX_RECONNECT_ATTEMPTS}`);
|
|
156
|
+
debugLog(`Scheduling Bridge reconnect attempt ${reconnectAttempts}/${MAX_RECONNECT_ATTEMPTS}`);
|
|
152
157
|
|
|
153
158
|
reconnectTimer = setTimeout(async () => {
|
|
154
159
|
reconnectTimer = null;
|
|
@@ -264,7 +264,7 @@ function scheduleBridgeReconnect() {
|
|
|
264
264
|
if (attempt < delays.length) {
|
|
265
265
|
setTimeout(tryConnect, delays[attempt]);
|
|
266
266
|
} else {
|
|
267
|
-
|
|
267
|
+
debugLog('Bridge not available after Chrome launch (extension may not be installed)');
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import {Server} from "@modelcontextprotocol/sdk/server/index.js";
|
|
4
4
|
import {StdioServerTransport} from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -3916,18 +3916,7 @@ async function main() {
|
|
|
3916
3916
|
console.error("[chrometools-mcp] GUI mode requires X server (DISPLAY=" + (process.env.DISPLAY || "not set") + ")");
|
|
3917
3917
|
}
|
|
3918
3918
|
|
|
3919
|
-
//
|
|
3920
|
-
try {
|
|
3921
|
-
const { isBridgeInstalled, installBridge } = await import('./bridge/install.js');
|
|
3922
|
-
if (!isBridgeInstalled()) {
|
|
3923
|
-
console.error('[chrometools-mcp] Bridge not installed. Auto-installing...');
|
|
3924
|
-
await installBridge({ silent: true });
|
|
3925
|
-
}
|
|
3926
|
-
} catch (e) {
|
|
3927
|
-
console.error('[chrometools-mcp] Bridge auto-install failed:', e.message);
|
|
3928
|
-
}
|
|
3929
|
-
|
|
3930
|
-
// Connect to Bridge Service (if running)
|
|
3919
|
+
// Connect to Bridge Service (if running — optional, for Chrome Extension integration)
|
|
3931
3920
|
await startWebSocketServer();
|
|
3932
3921
|
|
|
3933
3922
|
// Register handler for syncing active tab when user switches tabs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrometools-mcp",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.3",
|
|
4
4
|
"description": "MCP (Model Context Protocol) server for Chrome automation using Puppeteer. Persistent browser sessions, UI framework detection (MUI, Ant Design, etc.), Page Object support, visual testing, Figma comparison. Works seamlessly in WSL, Linux, macOS, and Windows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|