brave-mcp 1.8.0 → 1.9.0

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 (48) hide show
  1. package/README.md +14 -900
  2. package/build/src/McpContext.js +39 -21
  3. package/build/src/McpPage.js +110 -2
  4. package/build/src/McpResponse.js +66 -1
  5. package/build/src/ToolHandler.js +15 -45
  6. package/build/src/bin/brave-devtools-mcp-main.js +2 -2
  7. package/build/src/bin/brave-devtools.js +1 -1
  8. package/build/src/browser.js +5 -21
  9. package/build/src/collectors/PageCollector.js +63 -1
  10. package/build/src/config/browser-options.js +123 -0
  11. package/build/src/config/category-options.js +80 -0
  12. package/build/src/config/cli-options.js +32 -2
  13. package/build/src/config/mcp-options.js +82 -154
  14. package/build/src/daemon/utils.js +6 -0
  15. package/build/src/devtools/DevToolsCommentBridge.js +83 -0
  16. package/build/src/devtools/DevtoolsUtils.js +6 -1
  17. package/build/src/formatters/CommentFormatter.js +82 -0
  18. package/build/src/formatters/CssFormatter.js +812 -0
  19. package/build/src/formatters/NetworkFormatter.js +5 -2
  20. package/build/src/index.js +178 -102
  21. package/build/src/processors/PerformanceTrace.js +16 -3
  22. package/build/src/telemetry/ClearcutLogger.js +73 -25
  23. package/build/src/telemetry/persistence.js +17 -7
  24. package/build/src/telemetry/transformation.js +4 -0
  25. package/build/src/telemetry/types.js +1 -0
  26. package/build/src/third_party/THIRD_PARTY_NOTICES +5 -5
  27. package/build/src/third_party/bundled-packages.json +2 -2
  28. package/build/src/third_party/devtools-formatter-worker.js +25 -3
  29. package/build/src/third_party/devtools-heap-snapshot-worker.js +25 -3
  30. package/build/src/third_party/index.js +4643 -2839
  31. package/build/src/tools/ToolDefinition.js +15 -0
  32. package/build/src/tools/categories.js +0 -6
  33. package/build/src/tools/comments.js +170 -0
  34. package/build/src/tools/css.js +45 -0
  35. package/build/src/tools/lighthouse.js +3 -3
  36. package/build/src/tools/network.js +1 -1
  37. package/build/src/tools/pages.js +22 -7
  38. package/build/src/tools/screencast.js +1 -0
  39. package/build/src/tools/script.js +1 -0
  40. package/build/src/tools/slim/tools.js +41 -33
  41. package/build/src/tools/tools.js +4 -0
  42. package/build/src/types.js +4 -1
  43. package/build/src/utils/WaitForHelper.js +12 -1
  44. package/build/src/utils/url.js +80 -0
  45. package/build/src/version.js +1 -1
  46. package/package.json +4 -4
  47. package/skills/brave-devtools-cli/SKILL.md +2 -0
  48. package/skills/cookie-debugging/SKILL.md +149 -0
package/README.md CHANGED
@@ -140,413 +140,14 @@ See [Slim tool reference](./docs/slim-tool-reference.md).
140
140
 
141
141
  ### MCP Client configuration
142
142
 
143
- <details>
144
- <summary>Amp</summary>
145
- Follow https://ampcode.com/manual#mcp and use the config provided above. You can also install the Brave DevTools MCP server using the CLI:
146
-
147
- ```bash
148
- amp mcp add brave-devtools -- npx brave-mcp@latest
149
- ```
150
-
151
- </details>
152
-
153
- <details>
154
- <summary>Antigravity</summary>
155
-
156
- To use the Brave DevTools MCP server follow the instructions from <a href="https://antigravity.google/docs/mcp">Antigravity's docs</a> to install a custom MCP server. Add the following config to the MCP servers config:
157
-
158
- ```bash
159
- {
160
- "mcpServers": {
161
- "brave-devtools": {
162
- "command": "npx",
163
- "args": [
164
- "-y",
165
- "brave-mcp@latest",
166
- "--browser-url=http://127.0.0.1:9222"
167
- ]
168
- }
169
- }
170
- }
171
- ```
172
-
173
- This will make the Brave DevTools MCP server automatically connect to the browser that Antigravity is using. If you are not using port 9222, make sure to adjust accordingly.
174
-
175
- Brave DevTools MCP will not start the browser instance automatically using this approach because the Brave DevTools MCP server connects to Antigravity's built-in browser. If the browser is not already running, you have to start it first by clicking the Chrome icon at the top right corner.
176
-
177
- </details>
178
-
179
- <details>
180
- <summary>Bob</summary>
181
-
182
- Follow the <a href="https://bob.ibm.com/docs/ide/configuration/mcp/mcp-in-bob">IBM Bob MCP guide</a> and add the Brave DevTools MCP server to your Bob MCP configuration. Use the global config (`~/.bob/mcp.json`) to apply it across all workspaces, or a project config (`.bob/mcp.json`) to scope it to one project:
183
-
184
- ```json
185
- {
186
- "mcpServers": {
187
- "brave-devtools": {
188
- "command": "npx",
189
- "args": ["-y", "brave-mcp@latest"]
190
- }
191
- }
192
- }
193
- ```
194
-
195
- You can edit these files from **Bob panel → Settings → MCP → Edit Global MCP** (or **Edit Project MCP**). Bob hot-reloads on save. Once the server appears in the MCP tab, switch to the **🌎 Browser Dev** mode to get guided browser debugging directly in Bob.
196
-
197
- </details>
198
-
199
- <details>
200
- <summary>Claude Code</summary>
201
-
202
- **Install via CLI (MCP only)**
203
-
204
- Use the Claude Code CLI to add the Brave DevTools MCP server (<a href="https://code.claude.com/docs/en/mcp">guide</a>):
205
-
206
- ```bash
207
- claude mcp add brave-devtools --scope user npx brave-mcp@latest
208
- ```
209
-
210
- **Install as a Plugin (MCP + Skills)**
211
-
212
- > [!NOTE]
213
- > If you already had Brave DevTools MCP installed previously for Claude Code, make sure to remove it first from your installation and configuration files.
214
-
215
- To install Brave DevTools MCP with skills, add the marketplace registry in Claude Code:
216
-
217
- ```sh
218
- /plugin marketplace add triuzzi/brave-devtools-mcp
219
- ```
220
-
221
- Then, install the plugin:
222
-
223
- ```sh
224
- /plugin install brave-devtools-mcp@brave-devtools-plugins
225
- ```
226
-
227
- Restart Claude Code to have the MCP server and skills load (check with `/skills`).
228
-
229
- > [!TIP]
230
- > If the plugin installation fails with a `Failed to clone repository` error (e.g., HTTPS connectivity issues behind a corporate firewall), see the [troubleshooting guide](./docs/troubleshooting.md#claude-code-plugin-installation-fails-with-failed-to-clone-repository) for workarounds, or use the CLI installation method above instead.
231
-
232
- </details>
233
-
234
- <details>
235
- <summary>Cline</summary>
236
- Follow https://docs.cline.bot/mcp/configuring-mcp-servers and use the config provided above.
237
- </details>
238
-
239
- <details>
240
- <summary>Codex</summary>
241
- Follow the <a href="https://developers.openai.com/codex/mcp/#configure-with-the-cli">configure MCP guide</a>
242
- using the standard config from above. You can also install the Brave DevTools MCP server using the Codex CLI:
243
-
244
- ```bash
245
- codex mcp add brave-devtools -- npx brave-mcp@latest
246
- ```
247
-
248
- **On Windows 11**
249
-
250
- Configure the Brave install location and increase the startup timeout by updating `.codex/config.toml` and adding the following `env` and `startup_timeout_ms` parameters:
251
-
252
- ```
253
- [mcp_servers.brave-devtools]
254
- command = "cmd"
255
- args = [
256
- "/c",
257
- "npx",
258
- "-y",
259
- "brave-mcp@latest",
260
- ]
261
- env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
262
- startup_timeout_ms = 20_000
263
- ```
264
-
265
- </details>
266
-
267
- <details>
268
- <summary>Command Code</summary>
269
-
270
- Use the Command Code CLI to add the Brave DevTools MCP server (<a href="https://commandcode.ai/docs/mcp">MCP guide</a>):
271
-
272
- ```bash
273
- cmd mcp add brave-devtools --scope user npx brave-mcp@latest
274
- ```
275
-
276
- </details>
277
-
278
- <details>
279
- <summary>Copilot CLI</summary>
280
-
281
- Start Copilot CLI:
282
-
283
- ```
284
- copilot
285
- ```
286
-
287
- Start the dialog to add a new MCP server by running:
288
-
289
- ```
290
- /mcp add
291
- ```
292
-
293
- Configure the following fields and press `CTRL+S` to save the configuration:
294
-
295
- - **Server name:** `brave-devtools`
296
- - **Server Type:** `[1] Local`
297
- - **Command:** `npx -y brave-mcp@latest`
298
-
299
- </details>
300
-
301
- <details>
302
- <summary>Copilot / VS Code</summary>
303
-
304
- **Install as a Plugin (Recommended)**
305
-
306
- The easiest way to get up and running is to install `brave-mcp` as an agent plugin.
307
- This bundles the **MCP server** and all **skills** together, so your agent gets both the tools
308
- and the expert guidance it needs to use them effectively.
309
-
310
- 1. Open the **Command Palette** (`Cmd+Shift+P` on macOS or `Ctrl+Shift+P` on Windows/Linux).
311
- 2. Search for and run the **Chat: Install Plugin From Source** command.
312
- 3. Paste in our repository name: `triuzzi/brave-devtools-mcp`.
313
-
314
- That's it! Your agent is now supercharged with Brave DevTools capabilities.
315
-
316
- ---
317
-
318
- **Install as an MCP Server (MCP only)**
319
-
320
- **Click the button to install:**
321
-
322
- [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://vscode.dev/redirect/mcp/install?name=io.github.triuzzi%2Fbrave-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22brave-mcp%22%5D%2C%22env%22%3A%7B%7D%7D)
323
-
324
- [<img src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522io.github.triuzzi%252Fbrave-mcp%2522%252C%2522config%2522%253A%257B%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522brave-mcp%2522%255D%252C%2522env%2522%253A%257B%257D%257D%257D)
325
-
326
- **Or install manually:**
327
-
328
- Follow the VS Code [MCP configuration guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server) using the standard config from above, or use the CLI:
329
-
330
- For macOS and Linux:
331
-
332
- ```bash
333
- code --add-mcp '{"name":"io.github.triuzzi/brave-devtools-mcp","command":"npx","args":["-y","brave-mcp"],"env":{}}'
334
- ```
335
-
336
- For Windows (PowerShell):
337
-
338
- ```powershell
339
- code --add-mcp '{"""name""":"""io.github.triuzzi/brave-devtools-mcp""","""command""":"""npx""","""args""":["""-y""","""brave-mcp"""]}'
340
- ```
341
-
342
- </details>
343
-
344
- <details>
345
- <summary>Cursor</summary>
346
-
347
- **Click the button to install:**
348
-
349
- [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=brave-devtools&config=eyJjb21tYW5kIjoibnB4IC15IGJyYXZlLW1jcEBsYXRlc3QifQ%3D%3D)
350
-
351
- **Or install manually:**
352
-
353
- Go to `Cursor Settings` -> `MCP` -> `New MCP Server`. Use the config provided above.
354
-
355
- </details>
356
-
357
- <details>
358
- <summary>Devin CLI</summary>
359
-
360
- **Install via CLI (MCP only)**
361
-
362
- Use the Devin CLI to add the Brave DevTools MCP server (<a href="https://docs.devin.ai/cli/extensibility/mcp/configuration">guide</a>):
363
-
364
- ```bash
365
- devin mcp add brave-devtools -- npx brave-mcp@latest
366
- ```
367
-
368
- </details>
369
-
370
- <details>
371
- <summary>Factory CLI</summary>
372
- Use the Factory CLI to add the Brave DevTools MCP server (<a href="https://docs.factory.ai/cli/configuration/mcp">guide</a>):
373
-
374
- ```bash
375
- droid mcp add brave-devtools "npx -y brave-mcp@latest"
376
- ```
377
-
378
- </details>
379
-
380
- <details>
381
- <summary>Gemini CLI</summary>
382
- Install the Brave DevTools MCP server using the Gemini CLI.
383
-
384
- **Project wide:**
385
-
386
- ```bash
387
- # Either MCP only:
388
- gemini mcp add brave-devtools npx brave-mcp@latest
389
- # Or as a Gemini extension (MCP+Skills):
390
- gemini extensions install --auto-update https://github.com/triuzzi/brave-devtools-mcp
391
- ```
392
-
393
- **Globally:**
394
-
395
- ```bash
396
- gemini mcp add -s user brave-devtools npx brave-mcp@latest
397
- ```
398
-
399
- Alternatively, follow the <a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#how-to-set-up-your-mcp-server">MCP guide</a> and use the standard config from above.
400
-
401
- </details>
402
-
403
- <details>
404
- <summary>Gemini Code Assist</summary>
405
- Follow the <a href="https://cloud.google.com/gemini/docs/codeassist/use-agentic-chat-pair-programmer#configure-mcp-servers">configure MCP guide</a>
406
- using the standard config from above.
407
- </details>
408
-
409
- <details>
410
- <summary>Grok Build CLI</summary>
411
-
412
- ```bash
413
- grok mcp add brave-devtools npx brave-mcp@latest
414
- ```
415
-
416
- See the <a href="https://docs.x.ai/build/features/skills-plugins-marketplaces">docs</a> for more options
417
- </details>
418
-
419
- <details>
420
- <summary>JetBrains AI Assistant & Junie</summary>
421
-
422
- Go to `Settings | Tools | AI Assistant | Model Context Protocol (MCP)` -> `Add`. Use the config provided above.
423
- The same way brave-mcp can be configured for JetBrains Junie in `Settings | Tools | Junie | MCP Settings` -> `Add`. Use the config provided above.
424
-
425
- </details>
426
-
427
- <details>
428
- <summary>Kiro</summary>
429
-
430
- In **Kiro Settings**, go to `Configure MCP` > `Open Workspace or User MCP Config` > Use the configuration snippet provided above.
431
-
432
- Or, from the IDE **Activity Bar** > `Kiro` > `MCP Servers` > `Click Open MCP Config`. Use the configuration snippet provided above.
433
-
434
- </details>
435
-
436
- <details>
437
- <summary>Katalon Studio</summary>
438
-
439
- The Brave DevTools MCP server can be used with Katalon StudioAssist via an MCP proxy.
440
-
441
- **Step 1:** Install the MCP proxy by following the <a href="https://docs.katalon.com/katalon-studio/studioassist/mcp-servers/setting-up-mcp-proxy-for-stdio-mcp-servers">MCP proxy setup guide</a>.
442
-
443
- **Step 2:** Start the Brave DevTools MCP server with the proxy:
444
-
445
- ```bash
446
- mcp-proxy --transport streamablehttp --port 8080 -- npx -y brave-mcp@latest
447
- ```
448
-
449
- **Note:** You may need to pick another port if 8080 is already in use.
450
-
451
- **Step 3:** In Katalon Studio, add the server to StudioAssist with the following settings:
452
-
453
- - **Connection URL:** `http://127.0.0.1:8080/mcp`
454
- - **Transport type:** `HTTP`
455
-
456
- Once connected, the Brave DevTools MCP tools will be available in StudioAssist.
457
-
458
- </details>
459
-
460
- <details>
461
- <summary>Mistral Vibe</summary>
462
-
463
- Add in ~/.vibe/config.toml:
464
-
465
- ```toml
466
- [[mcp_servers]]
467
- name = "brave-devtools"
468
- transport = "stdio"
469
- command = "npx"
470
- args = ["brave-mcp@latest"]
471
- ```
472
-
473
- </details>
474
-
475
- <details>
476
- <summary>OpenCode</summary>
477
-
478
- Add the following configuration to your `opencode.json` file. If you don't have one, create it at `~/.config/opencode/opencode.json` (<a href="https://opencode.ai/docs/mcp-servers">guide</a>):
479
-
480
- ```json
481
- {
482
- "$schema": "https://opencode.ai/config.json",
483
- "mcp": {
484
- "brave-devtools": {
485
- "type": "local",
486
- "command": ["npx", "-y", "brave-mcp@latest"]
487
- }
488
- }
489
- }
490
- ```
491
-
492
- </details>
493
-
494
- <details>
495
- <summary>Qoder</summary>
496
-
497
- In **Qoder Settings**, go to `MCP Server` > `+ Add` > Use the configuration snippet provided above.
498
-
499
- Alternatively, follow the <a href="https://docs.qoder.com/user-guide/chat/model-context-protocol">MCP guide</a> and use the standard config from above.
500
-
501
- </details>
502
-
503
- <details>
504
- <summary>Qoder CLI</summary>
505
-
506
- Install the Brave DevTools MCP server using the Qoder CLI (<a href="https://docs.qoder.com/cli/using-cli#mcp-servers">guide</a>):
507
-
508
- **Project wide:**
509
-
510
- ```bash
511
- qodercli mcp add brave-devtools -- npx brave-mcp@latest
512
- ```
513
-
514
- **Globally:**
515
-
516
- ```bash
517
- qodercli mcp add -s user brave-devtools -- npx brave-mcp@latest
518
- ```
519
-
520
- </details>
521
-
522
- <details>
523
- <summary>Visual Studio</summary>
524
-
525
- **Click the button to install:**
526
-
527
- [<img src="https://img.shields.io/badge/Visual_Studio-Install-C16FDE?logo=visualstudio&logoColor=white" alt="Install in Visual Studio">](https://vs-open.link/mcp-install?%7B%22name%22%3A%22brave-devtools%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22brave-mcp%40latest%22%5D%7D)
528
-
529
- </details>
530
-
531
- <details>
532
- <summary>Warp</summary>
533
-
534
- Go to `Settings | AI | Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the config provided above.
535
-
536
- </details>
537
-
538
- <details>
539
- <summary>Windsurf</summary>
540
- Follow the <a href="https://docs.windsurf.com/windsurf/cascade/mcp#mcp-config-json">configure MCP guide</a>
541
- using the standard config from above.
542
- </details>
143
+ For setup instructions specific to your editor or agent (e.g. Antigravity, Claude Code, Cursor, VS Code), please see our [Client Configurations Guide][client-configurations-guide].
543
144
 
544
145
  ### Your first prompt
545
146
 
546
147
  Enter the following prompt in your MCP Client to check if everything is working:
547
148
 
548
149
  ```
549
- Check the performance of https://developers.chrome.com
150
+ Check the performance of https://brave.com
550
151
  ```
551
152
 
552
153
  Your MCP client should open the browser and record a performance trace.
@@ -556,516 +157,29 @@ Your MCP client should open the browser and record a performance trace.
556
157
 
557
158
  ## Tools
558
159
 
559
- If you run into any issues, checkout our [troubleshooting guide](./docs/troubleshooting.md).
560
-
561
- <!-- BEGIN AUTO GENERATED TOOLS -->
562
-
563
- - **Input automation** (10 tools)
564
- - [`click`](docs/tool-reference.md#click)
565
- - [`drag`](docs/tool-reference.md#drag)
566
- - [`fill`](docs/tool-reference.md#fill)
567
- - [`fill_form`](docs/tool-reference.md#fill_form)
568
- - [`handle_dialog`](docs/tool-reference.md#handle_dialog)
569
- - [`hover`](docs/tool-reference.md#hover)
570
- - [`press_key`](docs/tool-reference.md#press_key)
571
- - [`type_text`](docs/tool-reference.md#type_text)
572
- - [`upload_file`](docs/tool-reference.md#upload_file)
573
- - [`click_at`](docs/tool-reference.md#click_at)
574
- - **Navigation automation** (6 tools)
575
- - [`close_page`](docs/tool-reference.md#close_page)
576
- - [`list_pages`](docs/tool-reference.md#list_pages)
577
- - [`navigate_page`](docs/tool-reference.md#navigate_page)
578
- - [`new_page`](docs/tool-reference.md#new_page)
579
- - [`select_page`](docs/tool-reference.md#select_page)
580
- - [`wait_for`](docs/tool-reference.md#wait_for)
581
- - **Emulation** (2 tools)
582
- - [`emulate`](docs/tool-reference.md#emulate)
583
- - [`resize_page`](docs/tool-reference.md#resize_page)
584
- - **Performance** (3 tools)
585
- - [`performance_analyze_insight`](docs/tool-reference.md#performance_analyze_insight)
586
- - [`performance_start_trace`](docs/tool-reference.md#performance_start_trace)
587
- - [`performance_stop_trace`](docs/tool-reference.md#performance_stop_trace)
588
- - **Network** (2 tools)
589
- - [`get_network_request`](docs/tool-reference.md#get_network_request)
590
- - [`list_network_requests`](docs/tool-reference.md#list_network_requests)
591
- - **Debugging** (8 tools)
592
- - [`evaluate_script`](docs/tool-reference.md#evaluate_script)
593
- - [`get_console_message`](docs/tool-reference.md#get_console_message)
594
- - [`lighthouse_audit`](docs/tool-reference.md#lighthouse_audit)
595
- - [`list_console_messages`](docs/tool-reference.md#list_console_messages)
596
- - [`take_screenshot`](docs/tool-reference.md#take_screenshot)
597
- - [`take_snapshot`](docs/tool-reference.md#take_snapshot)
598
- - [`screencast_start`](docs/tool-reference.md#screencast_start)
599
- - [`screencast_stop`](docs/tool-reference.md#screencast_stop)
600
- - **Memory** (13 tools)
601
- - [`take_heapsnapshot`](docs/tool-reference.md#take_heapsnapshot)
602
- - [`close_heapsnapshot`](docs/tool-reference.md#close_heapsnapshot)
603
- - [`compare_heapsnapshots`](docs/tool-reference.md#compare_heapsnapshots)
604
- - [`get_heapsnapshot_class_nodes`](docs/tool-reference.md#get_heapsnapshot_class_nodes)
605
- - [`get_heapsnapshot_details`](docs/tool-reference.md#get_heapsnapshot_details)
606
- - [`get_heapsnapshot_dominators`](docs/tool-reference.md#get_heapsnapshot_dominators)
607
- - [`get_heapsnapshot_duplicate_strings`](docs/tool-reference.md#get_heapsnapshot_duplicate_strings)
608
- - [`get_heapsnapshot_edges`](docs/tool-reference.md#get_heapsnapshot_edges)
609
- - [`get_heapsnapshot_object_details`](docs/tool-reference.md#get_heapsnapshot_object_details)
610
- - [`get_heapsnapshot_retainers`](docs/tool-reference.md#get_heapsnapshot_retainers)
611
- - [`get_heapsnapshot_retaining_paths`](docs/tool-reference.md#get_heapsnapshot_retaining_paths)
612
- - [`get_heapsnapshot_summary`](docs/tool-reference.md#get_heapsnapshot_summary)
613
- - [`query_heapsnapshot_objects`](docs/tool-reference.md#query_heapsnapshot_objects)
614
- - **Extensions** (5 tools)
615
- - [`install_extension`](docs/tool-reference.md#install_extension)
616
- - [`list_extensions`](docs/tool-reference.md#list_extensions)
617
- - [`reload_extension`](docs/tool-reference.md#reload_extension)
618
- - [`trigger_extension_action`](docs/tool-reference.md#trigger_extension_action)
619
- - [`uninstall_extension`](docs/tool-reference.md#uninstall_extension)
620
- - **Third-party** (2 tools)
621
- - [`execute_3p_developer_tool`](docs/tool-reference.md#execute_3p_developer_tool)
622
- - [`list_3p_developer_tools`](docs/tool-reference.md#list_3p_developer_tools)
623
- - **WebMCP** (2 tools)
624
- - [`execute_webmcp_tool`](docs/tool-reference.md#execute_webmcp_tool)
625
- - [`list_webmcp_tools`](docs/tool-reference.md#list_webmcp_tools)
626
- - **Progressive Web Apps** (4 tools)
627
- - [`get_os_app_state`](docs/tool-reference.md#get_os_app_state)
628
- - [`install_pwa`](docs/tool-reference.md#install_pwa)
629
- - [`launch_pwa`](docs/tool-reference.md#launch_pwa)
630
- - [`uninstall_pwa`](docs/tool-reference.md#uninstall_pwa)
631
-
632
- <!-- END AUTO GENERATED TOOLS -->
160
+ If you run into any issues, checkout our [troubleshooting guide][troubleshooting].
161
+ See the full [Tool reference][tool-reference] for a complete list of all supported MCP capabilities.
633
162
 
634
163
  ## Configuration
635
164
 
636
- The Brave DevTools MCP server supports the following configuration option:
637
-
638
- <!-- BEGIN AUTO GENERATED OPTIONS -->
639
-
640
- - **`--autoConnect`/ `--auto-connect`**
641
- If specified, automatically connects to a Brave instance running locally from the user data directory identified by the channel parameter (default channel is release). Requires remote debugging to be enabled via brave://inspect/#remote-debugging.
642
- - **Type:** boolean
643
- - **Default:** `false`
644
-
645
- - **`--browserUrl`/ `--browser-url`, `-u`**
646
- Connect to a running, debuggable Brave instance (e.g. `http://127.0.0.1:9222`). For more details see: https://github.com/triuzzi/brave-devtools-mcp#connecting-to-a-running-brave-instance.
647
- - **Type:** string
648
- - **Default:** `false`
649
-
650
- - **`--wsEndpoint`/ `--ws-endpoint`, `-w`**
651
- WebSocket endpoint to connect to a running Brave instance (e.g., ws://127.0.0.1:9222/devtools/browser/<id>). Alternative to --browserUrl.
652
- - **Type:** string
653
- - **Default:** `false`
654
-
655
- - **`--wsHeaders`/ `--ws-headers`**
656
- Custom headers for WebSocket connection in JSON format (e.g., '{"Authorization":"Bearer token"}'). Only works with --wsEndpoint.
657
- - **Type:** string
658
- - **Default:** `false`
659
-
660
- - **`--headless`**
661
- Whether to run in headless (no UI) mode.
662
- - **Type:** boolean
663
- - **Default:** `false`
664
-
665
- - **`--executablePath`/ `--executable-path`, `-e`**
666
- Path to a custom Brave executable. Can also be set via BRAVE_PATH.
667
- - **Type:** string
668
- - **Default:** `false`
669
-
670
- - **`--isolated`**
671
- If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to false.
672
- - **Type:** boolean
673
- - **Default:** `false`
674
-
675
- - **`--userDataDir`/ `--user-data-dir`**
676
- Path to the user data directory for Brave. Default is $HOME/.cache/brave-devtools-mcp/brave-profile$CHANNEL_SUFFIX_IF_NON_RELEASE
677
- - **Type:** string
678
- - **Default:** `false`
679
-
680
- - **`--channel`**
681
- Specify a different Brave channel. The default is the release channel.
682
- - **Type:** string
683
- - **Choices:** `release`, `beta`, `nightly`
684
- - **Default:** `false`
685
-
686
- - **`--logFile`/ `--log-file`**
687
- Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.
688
- - **Type:** string
689
- - **Default:** `false`
690
-
691
- - **`--viewport`**
692
- Initial viewport size for Brave instances started by the server. For example, `1280x720`. In headless mode, max size is 3840x2160px.
693
- - **Type:** string
694
- - **Default:** `false`
695
-
696
- - **`--proxyServer`/ `--proxy-server`**
697
- Proxy server configuration for Brave passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.
698
- - **Type:** string
699
- - **Default:** `false`
700
-
701
- - **`--acceptInsecureCerts`/ `--accept-insecure-certs`**
702
- If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.
703
- - **Type:** boolean
704
- - **Default:** `false`
705
-
706
- - **`--pageIdRouting`/ `--page-id-routing`**
707
- Require pageId on page-scoped tools and route requests by page ID (useful for concurrent agent sessions). Use --no-page-id-routing to disable.
708
- - **Type:** boolean
709
- - **Default:** `true`
710
-
711
- - **`--experimentalDevtools`/ `--experimental-devtools`**
712
- Whether to enable automation over DevTools targets
713
- - **Type:** boolean
714
- - **Default:** `false`
715
-
716
- - **`--experimentalVision`/ `--experimental-vision`**
717
- Whether to enable coordinate-based tools such as click_at(x,y). Usually requires a computer-use model able to produce accurate coordinates by looking at screenshots.
718
- - **Type:** boolean
719
- - **Default:** `false`
720
-
721
- - **`--memoryDebugging`/ `--memory-debugging`, `-experimentalMemory`**
722
- Whether to enable memory debugging tools.
723
- - **Type:** boolean
724
- - **Default:** `false`
725
-
726
- - **`--experimentalStructuredContent`/ `--experimental-structured-content`**
727
- Whether to output structured formatted content.
728
- - **Type:** boolean
729
- - **Default:** `false`
730
-
731
- - **`--experimentalIncludeAllPages`/ `--experimental-include-all-pages`**
732
- Whether to include all kinds of pages such as webviews or background pages as pages.
733
- - **Type:** boolean
734
- - **Default:** `false`
735
-
736
- - **`--experimentalScreencast`/ `--experimental-screencast`**
737
- Exposes experimental screencast tools (requires ffmpeg). Install ffmpeg https://www.ffmpeg.org/download.html and ensure it is available in the MCP server PATH.
738
- - **Type:** boolean
739
- - **Default:** `false`
740
-
741
- - **`--experimentalFfmpegPath`/ `--experimental-ffmpeg-path`**
742
- Path to ffmpeg executable for screencast recording.
743
- - **Type:** string
744
- - **Default:** `false`
745
-
746
- - **`--categoryExperimentalWebmcp`/ `--category-experimental-webmcp`**
747
- Set to true to enable debugging WebMCP tools. Requires a recent Brave version with the following flags: `--enable-features=WebMCP,DevToolsWebMCPSupport`
748
- - **Type:** boolean
749
- - **Default:** `false`
750
-
751
- - **`--braveArg`/ `--brave-arg`**
752
- Additional arguments for Brave. Only applies when Brave is launched by brave-devtools-mcp.
753
- - **Type:** array
754
- - **Default:** `false`
755
-
756
- - **`--blockedUrlPattern`/ `--blocked-url-pattern`**
757
- Restricts browser's network access by blocking specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Silently detaches from targets with blocked URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.
758
- - **Type:** array
759
- - **Default:** `false`
760
-
761
- - **`--allowedUrlPattern`/ `--allowed-url-pattern`**
762
- Restricts browser's network access by allowing only specified URL patterns (uses https://urlpattern.spec.whatwg.org/). Requires a recent Brave version. Silently detaches from targets with unallowed URLs upon connection, and blocks runtime requests (including navigations and subresources). Accepts an array of patterns.
763
- - **Type:** array
764
- - **Default:** `false`
765
-
766
- - **`--ignoreDefaultBraveArg`/ `--ignore-default-brave-arg`**
767
- Explicitly disable default arguments for Brave. Only applies when Brave is launched by brave-devtools-mcp.
768
- - **Type:** array
769
- - **Default:** `false`
770
-
771
- - **`--categoryEmulation`/ `--category-emulation`**
772
- Set to false to exclude tools related to emulation.
773
- - **Type:** boolean
774
- - **Default:** `true`
775
-
776
- - **`--categoryPerformance`/ `--category-performance`**
777
- Set to false to exclude tools related to performance.
778
- - **Type:** boolean
779
- - **Default:** `true`
780
-
781
- - **`--categoryNetwork`/ `--category-network`**
782
- Set to false to exclude tools related to network.
783
- - **Type:** boolean
784
- - **Default:** `true`
785
-
786
- - **`--categoryExtensions`/ `--category-extensions`**
787
- Set to true to include tools related to extensions. This feature is only supported with a pipe connection; autoConnect, browserUrl, and wsEndpoint are not supported.
788
- - **Type:** boolean
789
- - **Default:** `false`
790
-
791
- - **`--categoryExperimentalThirdParty`/ `--category-experimental-third-party`**
792
- Set to true to enable third-party developer tools exposed by the inspected page itself
793
- - **Type:** boolean
794
- - **Default:** `false`
795
-
796
- - **`--categoryPwa`/ `--category-pwa`**
797
- Set to true to include tools for automating Progressive Web Apps (install, launch, uninstall, and OS state). This feature is only supported with a pipe connection; autoConnect, browserUrl, and wsEndpoint are not supported.
798
- - **Type:** boolean
799
- - **Default:** `false`
800
-
801
- - **`--performanceCrux`/ `--performance-crux`**
802
- Set to false to disable sending URLs from performance traces to CrUX API to get field performance data.
803
- - **Type:** boolean
804
- - **Default:** `true`
805
-
806
- - **`--usageStatistics`/ `--usage-statistics`**
807
- Usage statistics collection is disabled by default in this fork.
808
- - **Type:** boolean
809
- - **Default:** `false`
810
-
811
- - **`--screenshotFormat`/ `--screenshot-format`**
812
- Override the default output format used by take_screenshot when the caller does not specify one. JPEG and WebP are ~3-5x smaller than PNG, which helps reduce context size in AI conversations. Unset preserves the existing default ("png").
813
- - **Type:** string
814
- - **Choices:** `jpeg`, `png`, `webp`
815
- - **Default:** `false`
816
-
817
- - **`--screenshotQuality`/ `--screenshot-quality`**
818
- Override the default compression quality (0-100) used by take_screenshot for JPEG and WebP when the caller does not specify one. Lower values mean smaller files. Ignored for PNG. Unset preserves the Puppeteer default.
819
- - **Type:** number
820
- - **Default:** `false`
821
-
822
- - **`--screenshotMaxWidth`/ `--screenshot-max-width`**
823
- Maximum width in pixels for screenshots. If the captured image is wider, it is downscaled (preserving aspect ratio) before being returned. Reduces context size in AI conversations. Unset means no resize.
824
- - **Type:** number
825
- - **Default:** `false`
826
-
827
- - **`--screenshotMaxHeight`/ `--screenshot-max-height`**
828
- Maximum height in pixels for screenshots. If the captured image is taller, it is downscaled (preserving aspect ratio) before being returned. Can be combined with --screenshot-max-width; the smaller scale factor wins. Unset means no resize.
829
- - **Type:** number
830
- - **Default:** `false`
831
-
832
- - **`--slim`**
833
- Exposes a "slim" set of 3 tools covering navigation, script execution and screenshots only. Useful for basic browser tasks.
834
- - **Type:** boolean
835
- - **Default:** `false`
836
-
837
- - **`--redactNetworkHeaders`/ `--redact-network-headers`**
838
- If true, redacts some of the network headers considered sensitive before returning to the client.
839
- - **Type:** boolean
840
- - **Default:** `false`
841
-
842
- - **`--allowUnrestrictedPaths`/ `--allow-unrestricted-paths`**
843
- If set, disables the default path restriction that applies when the MCP client does not negotiate the roots capability. By default, file-writing tools are restricted to the OS temp directory when no roots are configured. Use this only when connecting a trusted local client that does not implement MCP roots and requires access to paths outside the temp directory.
844
- - **Type:** boolean
845
- - **Default:** `false`
846
-
847
- <!-- END AUTO GENERATED OPTIONS -->
848
-
849
- Pass them via the `args` property in the JSON configuration. For example:
850
-
851
- ```json
852
- {
853
- "mcpServers": {
854
- "brave-devtools": {
855
- "command": "npx",
856
- "args": [
857
- "brave-mcp@latest",
858
- "--channel=nightly",
859
- "--headless=true",
860
- "--isolated=true"
861
- ]
862
- }
863
- }
864
- }
865
- ```
866
-
867
- ### Connecting via WebSocket with custom headers
868
-
869
- You can connect directly to a Brave WebSocket endpoint and include custom headers (e.g., for authentication):
870
-
871
- ```json
872
- {
873
- "mcpServers": {
874
- "brave-devtools": {
875
- "command": "npx",
876
- "args": [
877
- "brave-mcp@latest",
878
- "--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/<id>",
879
- "--wsHeaders={\"Authorization\":\"Bearer YOUR_TOKEN\"}"
880
- ]
881
- }
882
- }
883
- }
884
- ```
885
-
886
- To get the WebSocket endpoint from a running Brave instance, visit `http://127.0.0.1:9222/json/version` and look for the `webSocketDebuggerUrl` field.
887
-
888
- You can also run `npx brave-mcp@latest --help` to see all available configuration options.
889
-
890
- ## Concepts
891
-
892
- ### Concurrent sessions
893
-
894
- Most MCP clients start one Brave DevTools MCP server per conversation.
895
- By default, the server runs with `--pageIdRouting` enabled, making `pageId` a
896
- required parameter on page-scoped tools (such as `click`, `fill`, `navigate_page`,
897
- `take_snapshot`, etc.) so multiple agents or subagents sharing a server instance can
898
- route tool calls directly to the specific tab they are working with.
165
+ Find the complete list of server parameters (e.g., `--headless`, `--isolated`, `--slim`) and how to configure WebSocket connections in the [Configuration Guide][configuration-guide].
899
166
 
900
- For `evaluate_script`, `pageId` is required by default for targeting pages, but
901
- becomes optional when `--categoryExtensions` is enabled so that `serviceWorkerId`
902
- can be specified instead to evaluate inside an extension background service worker.
167
+ ## Advanced usage
903
168
 
904
- To disable this behavior and default to the currently selected page, pass
905
- `--no-page-id-routing`.
906
-
907
- ```json
908
- {
909
- "mcpServers": {
910
- "brave-devtools": {
911
- "command": "npx",
912
- "args": ["-y", "brave-mcp@latest"]
913
- }
914
- }
915
- }
916
- ```
917
-
918
- If you run multiple independent MCP client sessions and want each session to
919
- launch its own temporary Brave profile, also pass `--isolated`. This avoids
920
- sharing the default Brave DevTools MCP user data directory between those
921
- server instances.
922
-
923
- ### User data directory
924
-
925
- By default, `brave-mcp` starts the Brave release channel using the following user
926
- data directory:
927
-
928
- - Linux / macOS: `$HOME/.cache/brave-devtools-mcp/brave-profile`
929
- - Windows: `%USERPROFILE%\.cache\brave-devtools-mcp\brave-profile`
930
-
931
- For non-release channels, the channel name is appended to the directory name, for example
932
- `brave-profile-nightly`.
933
-
934
- The user data directory is not cleared between runs and is reused for subsequent
935
- runs with the same channel. Only one browser can use it at a time. Set the `isolated`
936
- option to `true` to use a temporary user data directory instead which will be cleared
937
- automatically after the browser is closed.
938
-
939
- ### Connecting to a running Brave instance
940
-
941
- By default, the Brave DevTools MCP server will start a new Brave instance with a dedicated profile. This might not be ideal in all situations:
942
-
943
- - If you would like to maintain the same application state when alternating between manual site testing and agent-driven testing.
944
- - When the MCP needs to sign into a website. Some accounts may prevent sign-in when the browser is controlled via WebDriver (the default launch mechanism for the Brave DevTools MCP server).
945
- - If you're running your LLM inside a sandboxed environment, but you would like to connect to a Brave instance that runs outside the sandbox.
946
-
947
- In these cases, start Brave first and let the Brave DevTools MCP server connect to it. There are two ways to do so:
948
-
949
- - **Automatic connection**: best for sharing state between manual and agent-driven testing.
950
- - **Manual connection via remote debugging port**: best when running inside a sandboxed environment.
951
-
952
- #### Automatically connecting to a running Brave instance
953
-
954
- **Step 1:** Set up remote debugging in Brave
955
-
956
- In Brave, do the following to set up remote debugging:
957
-
958
- 1. Navigate to `brave://inspect/#remote-debugging` to enable remote debugging.
959
- 2. Follow the dialog UI to allow or disallow incoming debugging connections.
960
-
961
- **Step 2:** Configure Brave DevTools MCP server to automatically connect to a running Brave instance
962
-
963
- To connect the `brave-mcp` server to the running Brave instance, use
964
- `--autoConnect` command line argument for the MCP server.
965
-
966
- The following code snippet is an example configuration for gemini-cli:
967
-
968
- ```json
969
- {
970
- "mcpServers": {
971
- "brave-devtools": {
972
- "command": "npx",
973
- "args": ["brave-mcp@latest", "--autoConnect"]
974
- }
975
- }
976
- }
977
- ```
978
-
979
- **Step 3:** Test your setup
980
-
981
- Make sure your browser is running. Open gemini-cli and run the following prompt:
982
-
983
- ```none
984
- Check the performance of https://developers.chrome.com
985
- ```
986
-
987
- > [!NOTE]
988
- > The <code>autoConnect</code> option requires the user to start Brave. If the user has multiple active profiles, the MCP server connects to Brave's default profile and can access all open windows for that profile.
989
-
990
- The Brave DevTools MCP server will try to connect to your running Brave
991
- instance. It shows a dialog asking for user permission.
992
-
993
- Clicking **Allow** results in the Brave DevTools MCP server opening
994
- [developers.chrome.com](http://developers.chrome.com) and taking a performance
995
- trace.
996
-
997
- #### Manual connection using port forwarding
998
-
999
- You can connect to a running Brave instance by using the `--browser-url` option. This is useful if you are running the MCP server in a sandboxed environment that does not allow starting a new Brave instance.
1000
-
1001
- Here is a step-by-step guide on how to connect to a running Brave instance:
1002
-
1003
- **Step 1: Configure the MCP client**
1004
-
1005
- Add the `--browser-url` option to your MCP client configuration. The value of this option should be the URL of the running Brave instance. `http://127.0.0.1:9222` is a common default.
1006
-
1007
- ```json
1008
- {
1009
- "mcpServers": {
1010
- "brave-devtools": {
1011
- "command": "npx",
1012
- "args": ["brave-mcp@latest", "--browser-url=http://127.0.0.1:9222"]
1013
- }
1014
- }
1015
- }
1016
- ```
1017
-
1018
- **Step 2: Start the Brave browser**
1019
-
1020
- > [!WARNING]
1021
- > Enabling the remote debugging port opens up a debugging port on the running browser instance. Any application on your machine can connect to this port and control the browser. Make sure that you are not browsing any sensitive websites while the debugging port is open.
1022
-
1023
- Start the Brave browser with the remote debugging port enabled. Make sure to close any running Brave instances before starting a new one with the debugging port enabled. The port number you choose must be the same as the one you specified in the `--browser-url` option in your MCP client configuration.
1024
-
1025
- Use a dedicated user data directory when enabling the remote debugging port so your regular browsing profile and data are not exposed to the debugging session.
1026
-
1027
- **macOS**
1028
-
1029
- ```bash
1030
- /Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser --remote-debugging-port=9222 --user-data-dir=/tmp/brave-profile-release
1031
- ```
1032
-
1033
- **Linux**
1034
-
1035
- ```bash
1036
- /usr/bin/brave-browser --remote-debugging-port=9222 --user-data-dir=/tmp/brave-profile-release
1037
- ```
1038
-
1039
- **Windows**
1040
-
1041
- ```bash
1042
- "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" --remote-debugging-port=9222 --user-data-dir="%TEMP%\brave-profile-release"
1043
- ```
1044
-
1045
- **Step 3: Test your setup**
1046
-
1047
- After configuring the MCP client and starting the Brave browser, you can test your setup by running a simple prompt in your MCP client:
1048
-
1049
- ```
1050
- Check the performance of https://developers.chrome.com
1051
- ```
1052
-
1053
- Your MCP client should connect to the running Brave instance and receive a performance report.
1054
-
1055
- If you hit VM-to-host port forwarding issues, see the “Remote debugging between virtual machine (VM) and host fails” section in [`docs/troubleshooting.md`](./docs/troubleshooting.md#remote-debugging-between-virtual-machine-vm-and-host-fails).
1056
-
1057
- For more details on remote debugging, see the [Chromium DevTools documentation](https://developer.chrome.com/docs/devtools/remote-debugging/).
1058
-
1059
- ### Debugging Chrome on Android
1060
-
1061
- Please consult [these instructions](./docs/debugging-android.md).
169
+ For advanced features such as handling concurrent sessions, persistent user data directories, connecting to a running Brave instance instead of starting a new one, or debugging on Android, see our [Advanced Usage Guide][advanced-usage-guide].
1062
170
 
1063
171
  ## Known limitations
1064
172
 
1065
- See [Troubleshooting](./docs/troubleshooting.md).
173
+ See [Troubleshooting][troubleshooting].
1066
174
 
1067
175
  ## Integrating as a browser subagent
1068
176
 
1069
177
  If you are developing agentic tooling and want to provide an integrated browser subagent as part of your product, we recommend building on top of Brave DevTools for agents.
1070
178
 
1071
179
  For a reference implementation, see the [Gemini CLI browser agent documentation](https://geminicli.com/docs/core/subagents/#browser-agent).
180
+
181
+ [advanced-usage-guide]: ./docs/advanced-usage.md
182
+ [client-configurations-guide]: ./docs/client-configurations.md
183
+ [configuration-guide]: ./docs/configuration.md
184
+ [tool-reference]: ./docs/tool-reference.md
185
+ [troubleshooting]: ./docs/troubleshooting.md