Browser MCP

Browser MCP

Automates browser actions through AI with 39 tools including navigation, tab management, JavaScript execution, and cookie access, using a Chrome extension for local automation.

Category
访问服务器

README

<a href="https://browsermcp.io"> <img src="./.github/images/banner.png" alt="Browser MCP banner"> </a>

<h3 align="center">Browser MCP</h3>

<p align="center"> Automate your browser with AI. <br /> <a href="https://browsermcp.io"><strong>Website</strong></a> • <a href="https://docs.browsermcp.io"><strong>Docs</strong></a> </p>

About

Browser MCP is an MCP server + browser extension that allows you to automate your browser using AI applications like VS Code, Claude, Cursor, and Windsurf. Supports both Chrome and Firefox.

This is a fork of the original Browser MCP with the following changes:

  • Standalone build: All monorepo dependencies (@repo/*, @r2r/messaging) replaced with local implementations
  • Extended toolset: 39 tools (up from 12 core tools) including tab management, JavaScript execution, cookie/storage access, CSS injection, network monitoring, and more
  • Cross-browser extension: Full-featured extension with all 36 command handlers, compatible with both Chrome (MV3) and Firefox (MV3)
  • WSL support: Auto-detects WSL IP and writes a config file for the extension to discover the correct WebSocket address
  • Connection resilience: Speed guidance in tool descriptions, connection error detection with retry hints

Features

  • ⚡ Fast: Automation happens locally on your machine, resulting in better performance without network latency.
  • 🔒 Private: Since automation happens locally, your browser activity stays on your device and isn't sent to remote servers.
  • 👤 Logged In: Uses your existing browser profile, keeping you logged into all your services.
  • 🥷🏼 Stealth: Avoids basic bot detection and CAPTCHAs by using your real browser fingerprint.

Installation

Prerequisites

  • Node.js >= 18
  • Google Chrome, Chromium, or Firefox 113+
  • The Browser MCP extension (included in extension/)

From source

git clone https://github.com/IlGabbia998/browsermcp-mcp.git
cd browsermcp-mcp
npm install
npm run build

Load the extension

Chrome

  1. Open Chrome and navigate to chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked and select the extension/ folder from this project
  4. The extension will show in your toolbar — click it and hit Reconnect when the MCP server is running

Firefox

  1. Copy extension/manifest.firefox.json to extension/manifest.json (replacing the Chrome one)
  2. Open Firefox and navigate to about:debugging#/runtime/this-firefox
  3. Click Load Temporary Add-on...
  4. Select extension/manifest.json from this project
  5. The extension will show in your toolbar — click it and hit Connect when the MCP server is running

Note: Chrome and Firefox use different manifest formats for MV3. Use manifest.json for Chrome and manifest.firefox.json for Firefox. Firefox temporary add-ons are removed when Firefox is restarted.

Using in your MCP client

Add the server to your MCP client config. The built entry point is dist/index.js.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "browser": {
      "command": "node",
      "args": ["/absolute/path/to/browsermcp-mcp/dist/index.js"]
    }
  }
}

opencode

Add to your opencode.json:

{
  "mcp": {
    "browser": {
      "type": "local",
      "command": ["node", "/absolute/path/to/browsermcp-mcp/dist/index.js"],
      "enabled": true
    }
  }
}

Cursor / Windsurf

Add to your MCP settings (.cursor/mcp.json or equivalent):

{
  "mcpServers": {
    "browser": {
      "command": "node",
      "args": ["/absolute/path/to/browsermcp-mcp/dist/index.js"]
    }
  }
}

Connect the browser

  1. Start the MCP server (via your MCP client or node dist/index.js)
  2. Open Chrome/Firefox and click the Browser MCP extension icon in the toolbar
  3. Click Reconnect — the extension auto-discovers the server address
  4. The MCP server will detect the connection automatically

Available Tools (39)

Core

Tool Description
browser_navigate Navigate to a URL
browser_go_back Navigate back
browser_go_forward Navigate forward
browser_snapshot Capture an accessibility snapshot of the page
browser_click Click an element (by ref or description)
browser_hover Hover over an element
browser_type Type text into an input field
browser_select_option Select an option in a dropdown
browser_drag Drag from one element to another
browser_press_key Press a keyboard key
browser_wait Wait for N seconds
browser_screenshot Take a screenshot
browser_get_console_logs Get browser console logs

Navigation & Tabs

Tool Description
browser_scroll Scroll the page (up/down/left/right)
browser_new_tab Open a new tab
browser_reload Reload the current page
browser_list_tabs List all open tabs
browser_close_tab Close a tab by ID
browser_switch_tab Switch to a tab by ID

Page Interaction

Tool Description
browser_find_text Find text content on the page
browser_execute_js Execute arbitrary JavaScript
browser_get_links Extract all links from the page
browser_get_elements Query elements by CSS selector
browser_extract_table Extract table data as structured JSON
browser_extract_meta Extract page metadata and OpenGraph tags
browser_extract_images Extract all images from the page
browser_right_click Right-click an element
browser_double_click Double-click an element
browser_highlight Highlight elements matching a selector
browser_readability Extract main article content
browser_wait_for Wait for an element to appear
browser_get_computed_style Get computed CSS styles for an element
browser_inject_css Inject custom CSS into the page

Storage & Cookies

Tool Description
browser_get_cookies Get cookies for the current page
browser_set_cookies Set a cookie
browser_get_storage Read from localStorage or sessionStorage
browser_set_storage Write to localStorage or sessionStorage

Monitoring

Tool Description
browser_network_log Start/stop/query network request logging
browser_console_log Start/stop/query console log interception

Usage examples

Ask your AI assistant to do things like:

  • "Go to github.com and take a screenshot"
  • "Click the login button and fill in my email"
  • "Scroll down and click the next page link"
  • "Extract all links from this page"
  • "Show me the cookies for this site"
  • "Run JavaScript to get the page title"
  • "Monitor network requests while I navigate"
  • "Inject a custom CSS theme on this page"

The AI uses accessibility snapshots to understand the page structure and interact with elements reliably.

Contributing

This is a standalone build of the Browser MCP server, extracted from the original monorepo. All monorepo dependencies have been replaced with local implementations.

Project structure

src/
  index.ts              # Entry point, tool registration
  server.ts             # MCP server with connection error handling
  context.ts            # WebSocket context management
  ws.ts                 # WebSocket server creation
  lib/
    config/             # App and MCP configuration
    messaging/          # WebSocket message sender
    types/              # Zod schemas for all tools
  tools/
    snapshot.ts         # Core interaction tools (click, type, hover, etc.)
    common.ts           # Navigation tools (navigate, goBack, etc.)
    custom.ts           # Screenshot, console logs
    extended.ts         # All extended tools (26 new tools)
    tool.ts             # Tool type definitions
  utils/
    port.ts             # Port utilities
    aria-snapshot.ts    # Accessibility snapshot capture
extension/
  background.js         # Cross-browser service worker (36 command handlers)
  manifest.json         # Extension manifest (MV3, Chrome + Firefox compatible)
  popup.html            # Extension popup UI
  popup.js              # Popup JavaScript
  icons/                # Extension icons

Credits

Browser MCP was adapted from the Playwright MCP server in order to automate the user's browser rather than creating new browser instances. This allows using the user's existing browser profile to use logged-in sessions and avoid bot detection mechanisms that commonly block automated browser use.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选