Browser Control MCP server

Enables browser automation through a Firefox extension for tab management, webpage content extraction, history searching, and text highlighting via secure WebSocket communication.
Back to servers
Setup instructions
Provider
Eyal Zehavi
Release date
Apr 09, 2025
Language
TypeScript
Stats
148 stars

This MCP server enables AI assistants to interact with your Firefox browser, managing tabs, searching history, and reading webpage content. It provides a secure way for AI to help with browsing tasks while maintaining user privacy and control.

Installation Options

Option 1: Using Pre-built Extensions

Firefox Extension

  1. Install the Firefox extension from Mozilla Add-ons
  2. After installation, the "Manage extension" page will open automatically
  3. Copy the secret key shown on this page for later use

Claude Desktop Extension

  1. Download the DXT file from the Firefox extension's "Manage extension" page
  2. Open the file or drag it into Claude Desktop's settings window
  3. Enable the DXT extension in Claude Desktop

Option 2: Building From Source

Build the Project

npm install
npm run build

Install Firefox Extension

As a temporary add-on:

  1. Type about:debugging in Firefox address bar
  2. Click "This Firefox"
  3. Click "Load Temporary Add-on..."
  4. Select the manifest.json file from the firefox-extension folder
  5. Copy the secret key from the preferences page

Or install the permanent add-on from Mozilla Add-ons.

Configure MCP Server

Add this configuration to your MCP servers config file (e.g., claude_desktop_config.json):

{
    "mcpServers": {
        "browser-control": {
            "command": "node",
            "args": [
                "/path/to/repo/mcp-server/dist/server.js"
            ],
            "env": {
                "EXTENSION_SECRET": "<secret_from_firefox_extension_options_page>",
                "EXTENSION_PORT": "8089" 
            }
        }
    }
}

Replace /path/to/repo with your actual repository path and <secret_from_firefox_extension_options_page> with the secret key from the extension.

Docker Configuration (Alternative)

Build the Docker image:

docker build -t browser-control-mcp .

Add this configuration to your MCP servers config file:

{
    "mcpServers": {
        "browser-control": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-i",
                "-p", "127.0.0.1:8089:8089",
                "-e", "EXTENSION_SECRET=<secret_from_extension>",
                "-e", "CONTAINERIZED=true",
                "browser-control-mcp"
            ]
        }
    }
}

Usage Examples

Tab Management

You can ask the AI assistant to:

  • Close unneeded tabs: "Close all non-work-related tabs in my browser"
  • Organize tabs into groups: "Group all development tabs into a group called 'Development'"
  • Reorder tabs: "Rearrange my browser tabs in a logical order"
  • Clean up unused tabs: "Close tabs I haven't accessed in the last 24 hours"

Browser History Search

The assistant can help you find previously visited pages:

  • "Find an article in my browser history about the Milford track in NZ"
  • "Open up to 10 articles about AI that I visited last week, avoiding duplicates"

Browsing and Research

Use the assistant for research tasks:

  • "Open Hacker News, read the top story and its comments, then analyze the discussion"
  • "Search Google Scholar for recent L-theanine papers, open the 3 most cited, and summarize them"
  • "Find flower shops near me and create a table of their locations and hours"

Security Features

This MCP server is designed with security in mind:

  • No webpage modification or arbitrary scripting
  • Reading webpage content requires explicit user consent for each domain
  • Local-only connection with a shared secret
  • No remote data collection
  • Extension-side audit log and configuration options
  • No third-party runtime dependencies in the extension

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "browser-control" '{"command":"node","args":["/path/to/repo/mcp-server/dist/server.js"],"env":{"EXTENSION_SECRET":"<secret_from_extension>"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "browser-control": {
            "command": "node",
            "args": [
                "/path/to/repo/mcp-server/dist/server.js"
            ],
            "env": {
                "EXTENSION_SECRET": "<secret_from_extension>"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "browser-control": {
            "command": "node",
            "args": [
                "/path/to/repo/mcp-server/dist/server.js"
            ],
            "env": {
                "EXTENSION_SECRET": "<secret_from_extension>"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later