@ricardodeazambuja/browser-mcp-server 1.0.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.
@@ -0,0 +1,126 @@
1
+ # Changelog - Version 1.0.2
2
+
3
+ ## Release Date
4
+ 2025-12-26
5
+
6
+ ## Summary
7
+ Enhanced browser detection and standalone mode support. The MCP server now intelligently searches for and uses system Chrome/Chromium installations, eliminating the need for redundant browser downloads.
8
+
9
+ ## New Features
10
+
11
+ ### 1. Smart Chrome/Chromium Detection
12
+ - **New function**: `findChromeExecutable()` searches for Chrome/Chromium in common system locations
13
+ - **Search locations**:
14
+ - Linux: `/usr/bin/google-chrome`, `/usr/bin/chromium`, `/usr/bin/chromium-browser`, `/snap/bin/chromium`
15
+ - macOS: `/Applications/Google Chrome.app`, `/Applications/Chromium.app`
16
+ - Windows: `C:\Program Files\Google\Chrome\Application\chrome.exe`
17
+ - Also uses `which` command as fallback on Unix systems
18
+
19
+ ### 2. Three-Tier Browser Strategy
20
+ The server now tries browsers in this order:
21
+ 1. **Antigravity Mode**: Connect to existing Chrome on port 9222 (if available)
22
+ 2. **System Browser**: Use system-installed Chrome/Chromium (if found)
23
+ 3. **Playwright Chromium**: Fall back to Playwright's Chromium (if installed)
24
+
25
+ ### 3. Improved Error Messages
26
+ When no browser is found, users get clear, actionable instructions:
27
+
28
+ ```
29
+ ❌ No Chrome/Chromium browser found!
30
+
31
+ This MCP server needs a Chrome or Chromium browser to work.
32
+
33
+ Option 1 - Install Chrome/Chromium on your system:
34
+ • Ubuntu/Debian: sudo apt install google-chrome-stable
35
+ • Ubuntu/Debian: sudo apt install chromium-browser
36
+ • Fedora: sudo dnf install google-chrome-stable
37
+ • macOS: brew install --cask google-chrome
38
+ • Or download from: https://www.google.com/chrome/
39
+
40
+ Option 2 - Install Playwright's Chromium:
41
+ npm install playwright
42
+ npx playwright install chromium
43
+
44
+ Option 3 - Use with Antigravity:
45
+ Open Antigravity and click the Chrome logo (top right) to start the browser.
46
+ This MCP server will automatically connect to it.
47
+ ```
48
+
49
+ ## Bug Fixes
50
+
51
+ ### 1. Browser Reconnection
52
+ - Fixed browser disconnection detection
53
+ - Improved reconnection logic after browser crashes or closures
54
+
55
+ ## Changes
56
+
57
+ ### package.json
58
+ - Moved Playwright from `peerDependencies` to `dependencies` (^1.57.0)
59
+ - Removed `postinstall` script (no longer auto-installs Chromium)
60
+ - Users can now choose: system Chrome, Chromium, or Playwright Chromium
61
+
62
+ ### browser-mcp-server-playwright.js
63
+ - Added `findChromeExecutable()` function (+43 lines)
64
+ - Enhanced browser launch logic with Chrome detection
65
+ - Improved error handling with context-aware messages
66
+ - Better debug logging for troubleshooting
67
+
68
+ ## Benefits
69
+
70
+ ✅ **No Redundant Downloads**: Uses existing Chrome/Chromium installations
71
+ ✅ **Disk Space Savings**: Avoids downloading ~275MB Playwright Chromium if system browser exists
72
+ ✅ **Faster Installation**: No browser download during npm install
73
+ ✅ **Better UX**: Clear error messages guide users to solutions
74
+ ✅ **Flexible**: Works with Antigravity, system browsers, OR Playwright Chromium
75
+ ✅ **Cross-Platform**: Supports Linux, macOS, and Windows
76
+
77
+ ## Compatibility
78
+
79
+ - **Node.js**: >=16.0.0
80
+ - **Playwright**: ^1.57.0
81
+ - **Browsers**: Chrome, Chromium, or Playwright Chromium
82
+
83
+ ## Testing
84
+
85
+ All 16 browser automation tools tested and verified:
86
+ - ✅ browser_navigate
87
+ - ✅ browser_click
88
+ - ✅ browser_screenshot
89
+ - ✅ browser_get_text
90
+ - ✅ browser_type
91
+ - ✅ browser_evaluate
92
+ - ✅ browser_wait_for_selector
93
+ - ✅ browser_scroll
94
+ - ✅ browser_resize_window
95
+ - ✅ browser_get_dom
96
+ - ✅ browser_start_video_recording
97
+ - ✅ browser_stop_video_recording
98
+ - ✅ browser_health_check
99
+ - ✅ browser_console_start
100
+ - ✅ browser_console_get
101
+ - ✅ browser_console_clear
102
+
103
+ ## Migration Guide
104
+
105
+ ### From v1.0.1 to v1.0.2
106
+
107
+ **No action required!** The update is fully backward compatible.
108
+
109
+ **If you had Playwright Chromium installed:**
110
+ - It will still work as a fallback
111
+ - But the server will prefer your system Chrome/Chromium if available
112
+
113
+ **If you didn't have any browser:**
114
+ - The new error messages will guide you through installation options
115
+ - Choose the option that works best for your system
116
+
117
+ ## Debug Logs
118
+
119
+ Server logs are written to: `/tmp/mcp-browser-server.log`
120
+
121
+ Example log output:
122
+ ```
123
+ Found Chrome at: /usr/bin/google-chrome
124
+ Using system Chrome/Chromium: /usr/bin/google-chrome
125
+ ✅ Successfully launched new Chrome instance (Standalone mode)
126
+ ```
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Ricardo de Azambuja
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.