342 |
Browser Control MCP Options
343 |
Configure settings for the Browser Control MCP extension.
344 |
345 |
346 |
MCP Server Installation
347 |
348 |
To use this extension, you need to install the local MCP server. Choose one of the following options:
349 |
350 |
359 |
360 |
370 |
371 |
372 | After installing the MCP server, you'll need to configure it with the secret key shown below.
373 |
374 |
375 |
376 |
377 |
378 |
Secret Key
379 |
380 |
This secret key is automatically generated when the extension is installed and is used to authenticate
381 | connections to the MCP server:
382 |
Loading...
383 |
384 |
385 |
386 |
387 |
388 |
389 |
WebSocket Ports
390 |
391 |
Configure the WebSocket ports for MCP server connections (comma-separated list). Note: Changing this value will reload the extension.
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
Tool Permissions
400 |
401 |
Enable or disable specific MCP tools that can interact with your browser:
402 |
406 |
407 |
408 |
409 |
410 |
Domain Filtering
411 |
412 |
Configure which domains the extension can interact with:
413 |
414 |
415 |
Domain Deny List
416 |
The extension will not open tabs or get content from tabs with these domains (one domain per line):
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
View recent tool usage history:
429 |
430 |
431 |
Loading audit log...
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
--------------------------------------------------------------------------------
/firefox-extension/__tests__/message-handler.test.ts:
--------------------------------------------------------------------------------
1 | import { MessageHandler } from "../message-handler";
2 | import { WebsocketClient } from "../client";
3 | import type { ServerMessageRequest } from "@browser-control-mcp/common";
4 | import { ExtensionConfig } from "../extension-config";
5 |
6 | // Mock the WebsocketClient
7 | jest.mock("../client", () => {
8 | return {
9 | WebsocketClient: jest.fn().mockImplementation(() => {
10 | return {
11 | sendResourceToServer: jest.fn().mockResolvedValue(undefined),
12 | sendErrorToServer: jest.fn().mockResolvedValue(undefined),
13 | };
14 | }),
15 | };
16 | });
17 |
18 | describe("MessageHandler", () => {
19 | let messageHandler: MessageHandler;
20 | let mockClient: jest.Mocked