|
| 1 | +# Chrome MCP Server Setup Guide |
| 2 | + |
| 3 | +This guide explains how to start and use the Chrome MCP (Model Context Protocol) server for browser automation and inspection. |
| 4 | + |
| 5 | +## What is the Chrome MCP Server? |
| 6 | + |
| 7 | +The Chrome MCP server allows Claude to: |
| 8 | +- Open URLs in your browser |
| 9 | +- Take screenshots |
| 10 | +- Inspect network traffic |
| 11 | +- Check browser console logs |
| 12 | +- Run accessibility/performance audits |
| 13 | +- Get DOM elements |
| 14 | + |
| 15 | +This is useful for verifying features like HTTP 103 Early Hints that require browser-level inspection. |
| 16 | + |
| 17 | +## Current Status |
| 18 | + |
| 19 | +According to Conductor settings, the browser MCP server is **enabled** but not currently running. |
| 20 | + |
| 21 | +Error message: |
| 22 | +``` |
| 23 | +Failed to discover browser connector server. Please ensure it's running. |
| 24 | +``` |
| 25 | + |
| 26 | +## How to Start the Chrome MCP Server |
| 27 | + |
| 28 | +### Method 1: Check Conductor Settings |
| 29 | + |
| 30 | +1. Open **Conductor** preferences/settings |
| 31 | +2. Look for **MCP Servers** or **Extensions** section |
| 32 | +3. Find **Browser Tools** or **Chrome Connector** |
| 33 | +4. Check if there's a **Start** or **Enable** button |
| 34 | +5. Verify the status shows "Running" or "Connected" |
| 35 | + |
| 36 | +### Method 2: Chrome Extension (Most Likely) |
| 37 | + |
| 38 | +The browser MCP server typically requires a Chrome extension to act as a bridge: |
| 39 | + |
| 40 | +1. **Check if extension is installed:** |
| 41 | + - Open Chrome |
| 42 | + - Go to `chrome://extensions/` |
| 43 | + - Look for "Conductor Browser Connector" or similar |
| 44 | + |
| 45 | +2. **If not installed, you may need to:** |
| 46 | + - Contact Conductor support ( [email protected]) |
| 47 | + - Check Conductor documentation for extension link |
| 48 | + - Install from Chrome Web Store |
| 49 | + |
| 50 | +3. **Enable the extension:** |
| 51 | + - Make sure it's toggled ON |
| 52 | + - Check for any permission requests |
| 53 | + - Look for a Conductor icon in Chrome toolbar |
| 54 | + |
| 55 | +### Method 3: Local Server Process |
| 56 | + |
| 57 | +Some MCP servers run as separate processes: |
| 58 | + |
| 59 | +1. **Check if a process needs to be started:** |
| 60 | + ```bash |
| 61 | + # Check for any conductor or mcp processes |
| 62 | + ps aux | grep -i "conductor\|mcp\|browser" |
| 63 | + ``` |
| 64 | + |
| 65 | +2. **Look for startup scripts:** |
| 66 | + ```bash |
| 67 | + # Check Conductor app directory |
| 68 | + ls ~/Library/Application\ Support/com.conductor.app/ |
| 69 | + |
| 70 | + # Look for browser-related scripts |
| 71 | + find ~/Library/Application\ Support/com.conductor.app/ -name "*browser*" |
| 72 | + ``` |
| 73 | + |
| 74 | +### Method 4: Browser with DevTools API |
| 75 | + |
| 76 | +The MCP server might require Chrome to be launched with specific flags: |
| 77 | + |
| 78 | +1. **Close all Chrome windows** |
| 79 | + |
| 80 | +2. **Launch Chrome with remote debugging:** |
| 81 | + ```bash |
| 82 | + # macOS |
| 83 | + /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ |
| 84 | + --remote-debugging-port=9222 \ |
| 85 | + --remote-debugging-address=127.0.0.1 |
| 86 | + |
| 87 | + # Or for Arc browser |
| 88 | + /Applications/Arc.app/Contents/MacOS/Arc \ |
| 89 | + --remote-debugging-port=9222 |
| 90 | + ``` |
| 91 | + |
| 92 | +3. **Verify debugging port is open:** |
| 93 | + ```bash |
| 94 | + curl http://localhost:9222/json |
| 95 | + # Should return JSON with browser tabs info |
| 96 | + ``` |
| 97 | + |
| 98 | +4. **In Conductor:** Try using the browser tools again |
| 99 | + |
| 100 | +## Verification Steps |
| 101 | + |
| 102 | +Once you think the server is running: |
| 103 | + |
| 104 | +1. **Test basic connectivity:** |
| 105 | + - Ask Claude to take a screenshot |
| 106 | + - Ask Claude to open a URL |
| 107 | + - Check if errors are gone |
| 108 | + |
| 109 | +2. **Example test in Conductor:** |
| 110 | + ``` |
| 111 | + Can you take a screenshot of the current browser window? |
| 112 | + ``` |
| 113 | + |
| 114 | +3. **If successful, you should see:** |
| 115 | + - No "Failed to discover" error |
| 116 | + - Screenshot returned or action completed |
| 117 | + |
| 118 | +## Troubleshooting |
| 119 | + |
| 120 | +### "Failed to discover browser connector server" |
| 121 | + |
| 122 | +**Possible causes:** |
| 123 | +1. Chrome extension not installed or disabled |
| 124 | +2. Chrome not running with debugging port |
| 125 | +3. MCP server process not started |
| 126 | +4. Firewall blocking localhost:9222 |
| 127 | +5. Wrong browser (need Chrome/Arc, not Safari/Firefox) |
| 128 | + |
| 129 | +**Solutions:** |
| 130 | +1. Restart Chrome with `--remote-debugging-port=9222` |
| 131 | +2. Check Chrome extensions are enabled |
| 132 | +3. Restart Conductor app |
| 133 | +4. Check Conductor logs for errors |
| 134 | + |
| 135 | +### "Extension installed but not connecting" |
| 136 | + |
| 137 | +1. **Check extension permissions:** |
| 138 | + - Click the extension icon |
| 139 | + - Look for permission requests |
| 140 | + - Grant access to all sites if prompted |
| 141 | + |
| 142 | +2. **Verify localhost access:** |
| 143 | + ```bash |
| 144 | + # Test if debugging port is accessible |
| 145 | + curl -v http://localhost:9222/json/version |
| 146 | + ``` |
| 147 | + |
| 148 | +3. **Check browser console:** |
| 149 | + - Open DevTools in Chrome |
| 150 | + - Look for errors about MCP or Conductor |
| 151 | + |
| 152 | +### "Process running but Claude can't connect" |
| 153 | + |
| 154 | +1. **Check port conflicts:** |
| 155 | + ```bash |
| 156 | + lsof -i :9222 |
| 157 | + # Should show Chrome process |
| 158 | + ``` |
| 159 | + |
| 160 | +2. **Verify MCP server config:** |
| 161 | + - Check Conductor settings for correct port |
| 162 | + - Ensure localhost/127.0.0.1 is allowed |
| 163 | + |
| 164 | +3. **Restart both:** |
| 165 | + - Quit Chrome completely |
| 166 | + - Restart Conductor |
| 167 | + - Start Chrome with debugging port |
| 168 | + - Try MCP tools again |
| 169 | + |
| 170 | +## Contact Conductor Support |
| 171 | + |
| 172 | +If you can't get it working, contact Conductor support: |
| 173 | + |
| 174 | + |
| 175 | + |
| 176 | +**In your message, include:** |
| 177 | +1. Conductor version |
| 178 | +2. macOS version |
| 179 | +3. Browser (Chrome/Arc) and version |
| 180 | +4. Screenshot of the error |
| 181 | +5. Output of: |
| 182 | + ```bash |
| 183 | + ps aux | grep -i chrome |
| 184 | + lsof -i :9222 |
| 185 | + curl http://localhost:9222/json/version |
| 186 | + ``` |
| 187 | + |
| 188 | +They can provide: |
| 189 | +- Specific installation instructions |
| 190 | +- Chrome extension download link |
| 191 | +- Configuration settings |
| 192 | +- Debugging steps for your setup |
| 193 | + |
| 194 | +## What to Do Meanwhile |
| 195 | + |
| 196 | +While waiting to get the MCP server working, you can: |
| 197 | + |
| 198 | +1. **Use manual verification:** |
| 199 | + - Follow `docs/verify-early-hints-manual.md` |
| 200 | + - Take screenshots manually |
| 201 | + - Export HAR files from DevTools |
| 202 | + |
| 203 | +2. **Use curl for basic testing:** |
| 204 | + ```bash |
| 205 | + # Check HTML debug comments |
| 206 | + curl -s https://rails-pdzxq1kxxwqg8.cpln.app/ | grep -A10 "Early Hints" |
| 207 | + |
| 208 | + # Check Link headers |
| 209 | + curl -I https://rails-pdzxq1kxxwqg8.cpln.app/ | grep -i link |
| 210 | + ``` |
| 211 | + |
| 212 | +3. **Document findings manually:** |
| 213 | + - Open the PR review app in browser |
| 214 | + - Take screenshots of Network tab |
| 215 | + - Share with the PR for review |
| 216 | + |
| 217 | +## Once MCP Server is Running |
| 218 | + |
| 219 | +When the Chrome MCP server works, Claude will be able to: |
| 220 | + |
| 221 | +1. **Open the PR review app:** |
| 222 | + ``` |
| 223 | + Open https://rails-pdzxq1kxxwqg8.cpln.app/ in Chrome |
| 224 | + ``` |
| 225 | + |
| 226 | +2. **Inspect network traffic:** |
| 227 | + ``` |
| 228 | + Show me the network logs for that page |
| 229 | + ``` |
| 230 | + |
| 231 | +3. **Take screenshots:** |
| 232 | + ``` |
| 233 | + Take a screenshot of the Network tab waterfall |
| 234 | + ``` |
| 235 | + |
| 236 | +4. **Check for early hints:** |
| 237 | + ``` |
| 238 | + Look for HTTP 103 responses in the network traffic |
| 239 | + ``` |
| 240 | + |
| 241 | +5. **Verify console output:** |
| 242 | + ``` |
| 243 | + Are there any console errors? |
| 244 | + ``` |
| 245 | + |
| 246 | +This will provide definitive proof of whether early hints are working at the browser level. |
| 247 | + |
| 248 | +## Alternative: Use Selenium/Playwright Directly |
| 249 | + |
| 250 | +If the MCP server is too complex, you could also: |
| 251 | + |
| 252 | +1. **Install Playwright:** |
| 253 | + ```bash |
| 254 | + npm install -g playwright |
| 255 | + playwright install chromium |
| 256 | + ``` |
| 257 | + |
| 258 | +2. **Create a test script:** |
| 259 | + ```javascript |
| 260 | + // verify-early-hints.js |
| 261 | + const { chromium } = require('playwright'); |
| 262 | + |
| 263 | + (async () => { |
| 264 | + const browser = await chromium.launch(); |
| 265 | + const context = await browser.newContext(); |
| 266 | + const page = await context.newPage(); |
| 267 | + |
| 268 | + // Listen to all network responses |
| 269 | + page.on('response', response => { |
| 270 | + console.log(`${response.status()} ${response.url()}`); |
| 271 | + if (response.status() === 103) { |
| 272 | + console.log('✅ Early Hints detected!'); |
| 273 | + } |
| 274 | + }); |
| 275 | + |
| 276 | + await page.goto('https://rails-pdzxq1kxxwqg8.cpln.app/'); |
| 277 | + await page.screenshot({ path: 'page.png' }); |
| 278 | + await browser.close(); |
| 279 | + })(); |
| 280 | + ``` |
| 281 | + |
| 282 | +3. **Run the test:** |
| 283 | + ```bash |
| 284 | + node verify-early-hints.js |
| 285 | + ``` |
| 286 | + |
| 287 | +This would give you programmatic verification without needing the MCP server. |
0 commit comments