Skip to main content
Glama
browser-mcp
by NjProVk

browser-mcp

An MCP server that drives an installed Chrome, Chromium, or Edge over the DevTools protocol. It has 41 tools for pages, elements, forms, frames, screenshots, the network log, and downloads. Under it is easybrowser, the library in the easybrowser folder, with its own documentation.

Connect over stdio

You need Python 3.11 or later, uv, and an installed copy of Chrome, Chromium, or Edge. Install the dependencies from the repository folder.

uv sync

For an MCP client that uses JSON configuration, add an entry to mcpServers. Replace C:/tools/browser-mcp with the folder that holds the repository.

{
  "mcpServers": {
    "browser": {
      "command": "C:/tools/browser-mcp/.venv/Scripts/python.exe",
      "args": ["C:/tools/browser-mcp/server.py"]
    }
  }
}

To check the connection, call browser_init(headless=true), then browser_navigate(url="https://example.org") and browser_get_interactive_elements(). You can pass selectors from the response directly to browser_click and browser_type. If you skip the explicit browser_init call, the first page tool opens a visible browser window.

Related MCP server: agent-browser-mcp

Connect over HTTP

Start the web server from the repository folder.

uv run python web_server.py

In the client, choose Streamable HTTP and enter http://127.0.0.1:8000/sse. Set the port with --port. Each client gets its own browser session and temporary profile. Calling browser_close or disconnecting the MCP client normally shuts down the browser processes. If Chromium crashes, the next call opens a clean profile with the previous settings.

Browser and files

  • browser_init accepts a proxy, a timeout in seconds, comma-separated paths to unpacked extensions, load_mode (normal, eager, none), and URL blocking patterns in load_filter. Chromium supports HTTP(S) proxies with optional authentication and SOCKS5 proxies without authentication.

  • The engine locates the browser automatically. To select a specific build, set EASYBROWSER_EXECUTABLE to the full path to its executable. Loading unpacked extensions was tested with an installed copy of Chrome 156.

  • Pages open with easybrowser's fingerprint protection (privacy=True): one consistent profile (user agent, languages, time zone, CPU, memory, WebGL) for a page, its workers and its iframes. See profiles and fingerprint protection for what it does and does not do. BROWSER_MCP_PRIVACY changes it for the server: standard (the default), extended (Canvas, audio and WebGL readbacks too), or off.

  • Enable network logging for the main document before navigation with browser_navigate(use_network=true). To monitor subsequent actions, call browser_network_list. Use id with browser_network_get to retrieve request details and the response body.

  • The tools accept CSS, XPath, and shorthand selectors such as text=Sign in, tag:input@name=email, and @id=submit. Use the css: or xpath: prefix to select a syntax explicitly.

  • To work in an iframe, select a path from browser_list_frames using browser_switch_frame. An empty path returns to the main page. get_page_screenshot(full_page=true) captures the entire document at the top level and only the visible area when an iframe is selected.

  • If a alert, confirm, or prompt opens and requires a manual response, the current call may return status="dialog". Read the dialog text with browser_dialog_status and respond with browser_handle_alert. Set the automatic handling policy separately for each tab.

  • The tools return absolute file paths. Screenshots go to screenshots and downloads go to the shared downloads directory in the repository folder. Use BROWSER_MCP_DATA_DIR to set a different base directory.

Verification

uv run pytest tests -q
uv run pytest tests_engine -q

tests starts the server and calls its tools through the MCP SDK against local pages in headless Chromium; tests_engine tests easybrowser itself. The two suites have files of the same name, so run them one at a time. They check changes to the DOM, the contents of downloaded files, network responses, HTTP session isolation, and browser process cleanup.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for controlling Chromium/Chrome via Chrome DevTools Protocol. Supports cross-platform automation, auto-launch, and automatic reconnection.
      25
      1
      MIT
    • A
      license
      A
      quality
      A
      maintenance
      MCP server that drives your real Chrome/Edge/Opera browser through a Chrome extension and DevTools Protocol, preserving logins and session state, and can also perform OS-level mouse and keyboard input behind approval.
      51
      2
      MIT
    • A
      license
      D
      quality
      B
      maintenance
      Connects to an already-running Chrome/Chromium instance over CDP and exposes 75 browser-automation tools over newline-delimited MCP JSON-RPC on stdin/stdout, covering navigation, forms, keyboard/mouse input, screenshots, cookies, storage, tabs and frames, assertions, and retry/batch/step composition. It does not launch a browser itself, requiring a localhost debugging port on the existing instance.
      75
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to drive a running Microsoft Edge browser over the Chrome DevTools Protocol, exposing 16 tools for navigation, clicking, typing, screenshots, page-content reading, and tab management. Runs in stdio mode for per-client processes or as a shared HTTP endpoint so multiple agents can operate the same browser session.
      16
      MIT