Back to Browse

Browser Dev Tools MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

MCP server for browser use: batch clicks, typing, waits, checks in one call on Chrome, Edge, Firefox

About

MCP server for browser use: batch clicks, typing, waits, checks in one call on Chrome, Edge, Firefox

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

7 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

network_websocket

Check that this permission is expected for this type of plugin.

file_system

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "mcp-browser-dev-tools": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-browser-dev-tools@0.5.9"
      ]
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

mcp-browser-dev-tools

npm version npm downloads

An MCP server for browser use: let an AI agent work in a real browser with fewer back-and-forths. It sends a whole sequence of clicks, typing, waits, and checks in one tool call and gets every result back together, in your Chrome, Edge, or Firefox. Against Playwright MCP and Chrome DevTools MCP, on six browser tasks with six models, it took the least time with every model and the fewest turns with five of the six (comparison).

One run_steps call dismisses a late cookie banner, fills a sign-up form, submits it, and waits for the confirmation code. One reply, 1.1 seconds later, reports all seven steps ok and the new text on the page.

A real run, recorded with the server's own record_video: the agent sends every action of a sign-up in one call and gets one reply.

Quick Start

You need Node.js 24 or later. Give the agent a browser profile of its own, not your everyday one: set MCP_BROWSER_USER_DATA_DIR to a new folder, and browsers the agent launches use it. Register the server with your MCP client:

# Claude Code
claude mcp add browser-devtools --scope user \
  -e MCP_BROWSER_USER_DATA_DIR=~/.mcp-browser-profile \
  -- npx -y mcp-browser-dev-tools@latest serve

# Codex
codex mcp add browser-devtools \
  --env MCP_BROWSER_USER_DATA_DIR=~/.mcp-browser-profile \
  -- npx -y mcp-browser-dev-tools@latest serve

Cursor and other clients that use an mcpServers config:

{
  "mcpServers": {
    "browser-devtools": {
      "command": "npx",
      "args": ["-y", "mcp-browser-dev-tools@latest", "serve"],
      "env": { "MCP_BROWSER_USER_DATA_DIR": "~/.mcp-browser-profile" }
    }
  }
}

The agent acts as whoever the browser profile is signed in as. In a profile of its own, you sign in only to the sites you want it to use, and your everyday sign-ins and saved passwords are not in it. Without the setting, launching a browser that is not running can open your everyday profile with a debugging port that any local program can use (see Safety). The server expands the leading ~/.

@latest makes npx check for the current release when the client starts the server, reusing its cached copy when nothing changed; the check takes a moment and needs the npm registry or a cached answer. Without a version, npx uses an already installed copy, such as one from npm install -g, however old.

Then ask the agent for browser work, for example "open example.com and check the console for errors" or "attach to my open tab and find out why the form won't submit". The agent starts with ensure_browser, which reuses a browser that is already running with a debugging port, or launches one with that profile. See Configuration for native Windows, WSL, and Firefox.

What It Does

An AI agent sends one run_steps call with five steps to the browser and gets one reply with every result

Your agent gets 50 browser tools over MCP: open or attach to tabs, click, type, drag, upload files, and navigate, read the console and network, block or mock requests, take screenshots, and save and restore sessions. At the center is run_steps: the agent sends a whole task, with branches and waits in it, and the server carries it out in the browser and replies once. run_tabs does the same in several tabs at the same time.

Why This One

  • Fewer round trips. Every model turn costs thinking time and tokens, so the agent does more with each call. In the benchmark, signing up through a form took 3.8 turns on average over six models, against 6.5 with Playwright MCP and 8.2 with Chrome DevTools MCP.
  • Actions say what they did. A click, a typed value, or a whole batch comes back with what changed on the page once it settles: controls that appeared, disappeared, or changed, new text such as an error or a toast, console errors, and after a navigation the new page's controls. The agent can confirm the result without another look at the page.
  • Many pages at once. Research over several pages happens side by side: run_tabs opens them together and read_text brings back what they say. In the benchmark, reading five slow pages took 16.2 s and 5.5 turns on average over six models, against 34.6 s and 8.8 with Playwright MCP.
  • Calm on real pages. Waits end on whichever outcome shows up, actions wait out a covering banner or a button that isn't enabled yet, and if a step fails the reply lists the page's controls, so the next try is an informed one.
  • Right where you work. It attaches to the browser you already use, with its logins, tabs, and extensions, and speaks to Chrome, Edge, and Firefox with the same tools.
  • A debugger at hand. Console messages with stack traces, network requests and HAR export, cookies and storage, and a one-call debug report.

Against Playwright MCP and Chrome DevTools MCP, on the same tasks with six models, it took the least time with every model, the fewest turns with five of the six, and cost the least on average and with four of the six: see the comparison.

One Call, Start To Finish

A run_steps call that dismisses a cookie banner if one is showing, fills in and submits a form, waits for either the success or the error message, and reads it:

{
  "sessionId": "chromium:1f0c…",
  "steps": [
    {
      "tool": "if",
      "arguments": {
        "condition": { "selector": "text=Accept cookies" },
        "then": [
          {
            "tool": "click",
            "arguments": { "selector": "text=Accept cookies" }
          }
        ]
      }
    },
    {
      "tool": "type",
      "arguments": {
        "selector": "role=textbox[name=\"Email\"]",
        "text": "ada@example.com"
      }
    },
    {
      "tool": "click",
      "arguments": { "selector": "role=button[name=\"Sign up\"]" }
    },
    {
      "tool": "wait_for",
      "arguments": {
        "anyOf": [
          { "selector": "#message", "textIncludes": "Welcome" },
          { "selector": "#message", "textIncludes": "error" }
        ]
      }
    },
    { "tool": "inspect_element", "arguments": { "selector": "#message" } }
  ]
}

The result has each step's outcome: which branch the if took, which anyOf alternative matched, and the message element with its text. Because the batch has actions, the result also has changes: what the batch changed on the page, as described in Tools. Locators can be CSS, text=, role= with an accessible name, or name=. The full semantics of run_steps, if, repeat, and conditions are in Tools.

Many Pages At Once

An AI agent sends one run_tabs call with four URLs, the browser loads and reads them side by side, and one reply comes back with every page's text

A research step usually means opening several pages and reading each one. read_text with links: true collects the result links from a search page; then one run_tabs call opens them all and reads them side by side:

{
  "browserFamily": "chromium",
  "tabs": [
    {
      "url": "https://docs.example.com/a",
      "steps": [{ "tool": "read_text", "arguments": { "maxChars": 4000 } }]
    },
    {
      "url": "https://blog.example.com/b",
      "steps": [{ "tool": "read_text", "arguments": { "maxChars": 4000 } }]
    },
    {
      "url": "https://news.example.com/d",
      "steps": [
        { "tool": "wait_for", "arguments": { "selector": "article" } },
        {
          "tool": "read_text",
          "arguments": { "selector": "article", "maxChars": 4000 }
        }
      ]
    }
  ]
}

The result lists every tab in the order given, each with its steps' results: here, each page's main text, cut to maxChars. Each tab opens a new tab, loads its URL, and runs its steps at the same time as the others, so the call takes about as long as the slowest page; the tabs close afterwards. Steps are the same as in run_steps, including if and repeat, and a tab that fails or runs past its timeoutMs does not stop the others. browserFamily picks the browser for the new tabs when the server runs in its default auto mode. The details are in Tools.

Record A Demo

record_video records what a Chromium tab shows while the agent drives it, as an MP4. For a 1920x1080 recording, set the viewport first, then start, act, and stop:

{ "name": "set_viewport", "arguments": { "sessionId": "s1", "width": 1920, "height": 1080 } }
{ "name": "record_video", "arguments": { "sessionId": "s1", "action": "start" } }
{ "name": "click", "arguments": { "sessionId": "s1", "selector": "text=Open dashboard" } }
{ "name": "record_video", "arguments": { "sessionId": "s1", "action": "stop", "path": "/home/me/demo.mp4" } }

stop returns the file's path, durationMs, frames, width, and height. Chrome streams a frame on each repaint, and stop encodes them with ffmpeg (found on PATH, or named by MCP_BROWSER_FFMPEG) at a constant frame rate, each frame lasting as long as it was on screen. Without ffmpeg, stop keeps the frames and returns the command that encodes them. record_video is in the performance group, reached through more_tools or as a run_steps step. The details, including fps, quality, maxWidth and maxHeight, and maxDurationMs, are in Tools.

Measured

Six models ran six browser tasks three times each with this server, Playwright MCP, and Chrome DevTools MCP, each server with its own headless Chrome and all three at the same time: 324 runs, all passed. The tasks are a sign-up behind a late cookie banner, a payment that fails until retried, settings behind a login redirect, five slow pages to read, one row to archive among identical buttons, and a layout to measure after a view switch. A run passes only if the page recorded the right outcome and the agent's reply has what the page showed.

Per task, average over the six modelsTimeTurnsCost
mcp-browser-dev-tools 0.5.816.8 s5.5$0.042
Playwright MCP 0.0.8623.4 s7.6$0.047
Chrome DevTools MCP 1.14.022.4 s8.3$0.053

It took the least time with every model and the fewest turns with five of the six. The lead comes from multi-step tasks; on the two shortest the turns are level, and Playwright MCP cost slightly less with Opus 5.5 and Sonnet 5.5. With the three Claude models, browser-use's MCP server took 17.5 s per task against 10.7 s here.

The comparison page has every model and task, how each run works, and every run's record. PERFORMANCE.md has the method, earlier runs, and a run with one action per call against batching.

Tools

50 tools, described in docs/tools.md. The server lists the core set by default, since every model turn pays for each tool listed, and more_tools lists, describes, and calls the rest; MCP_BROWSER_TOOLS=all, or a list of groups such as network,state, lists them too (Tool Sets).

  • Browser and tabs: browser_status, ensure_browser, launch_browser, list_tabs, new_tab, close_tab, attach_tab, detach_tab, list_sessions
  • Act: navigate, reload, click, hover, drag, type, select, press_key, upload_file, scroll, set_viewport, set_dialog_answers
  • Wait and batch: wait_for, run_steps, run_tabs
  • Watch across calls: watch, unwatch, list_watches
  • Inspect: get_page_state, get_snapshot, get_document, inspect_element, query_elements, read_text, take_screenshot, evaluate_js
  • Console and network: get_console_messages, get_network_requests, get_events, get_har, set_network
  • Performance: get_performance, record_trace, record_video
  • Session state: get_cookies, get_storage, capture_session_snapshot, restore_session_snapshot, compare_page_state, compare_selector, capture_debug_report

Configuration

The defaults work for most setups: the server finds a Chromium or Firefox debugging endpoint on loopback ports 9222–9226, or launches a browser when asked. The settings people change most:

  • MCP_BROWSER_FAMILY: auto (default), chromium, edge, or firefox
  • CDP_BASE_URL and FIREFOX_BIDI_WS_URL: fixed browser endpoints
  • MCP_BROWSER_USER_DATA_DIR: the profile to launch browsers with
  • MCP_BROWSER_ENABLE_EVAL=0: turn off page JavaScript from the agent (evaluate_js and expression conditions)
  • MCP_BROWSER_ENABLE_WATCH_REACTIONS=1: let a watch click and type in a background tab of its own while no call is running (off by default)

Every setting, per-client examples, and how the server reuses or launches browsers are in docs/configuration.md. WSL with a Windows browser, and other platform walkthroughs, are in docs/setup.md.

Safety

  • The server only connects to loopback browser endpoints unless you set MCP_BROWSER_ALLOW_REMOTE_ENDPOINTS=1 (or its older name, MCP_BROWSER_ALLOW_REMOTE_CDP=1) or start it with the WSL relay (--bootstrap-wsl-relay), which turns that on and listens on the WSL network adapter without authentication: see Setup.
  • Tools both read and act on the page: they click, type, navigate, and run page JavaScript through evaluate_js, as whoever the browser profile is signed in as. Point the server at a profile you are willing to let an agent use. Set MCP_BROWSER_USER_DATA_DIR to a dedicated profile: without it, launching a browser that is not running can open your everyday Edge, Chromium, or Firefox profile with a debugging port that any local program can use. It is the default, not a limit: the agent can name another profile folder in a launch_browser or ensure_browser call.
  • MCP_BROWSER_ENABLE_EVAL=0 removes evaluate_js and the expression field of wait_for and run_steps conditions. This narrows the tool surface rather than drawing a security boundary: the other tools already read cookies and storage and can navigate anywhere. To approve page scripts one at a time, use your MCP client's tool permissions, and note that wait_for and run_steps calls can carry scripts too, and that a set_network mock can replace a page's own script with one the agent wrote.
  • upload_file gives a page files from the server's working directory, the temp directory, and MCP_BROWSER_UPLOAD_DIRS. Your MCP client chooses the working directory: if it starts the server in your home folder, every file there qualifies, and in /, every file on the disk. MCP_BROWSER_UPLOAD_DIRS only adds folders, so keep the working directory narrow: have your client start the server in a project folder.
  • Pages are not opened from file://, and tabs already on a local file are not attached, unless you set MCP_BROWSER_ALLOW_FILE_URLS=1, since a local page can show any file the browser can read. Like Playwright MCP's, this is a guardrail, not a sandbox: a tab that is moved to a local file after the agent attached stays usable, whether you move it or a script the agent runs in the page does, such as one that goes back in the tab's history. Screenshots, traces, and videos are saved to any absolute path the agent names, and replace an existing file of the same type only when the call passes overwrite.
  • While a tab is attached, the server answers its JavaScript dialogs so that they do not block the page, also the ones you raise in that tab yourself: alert and beforeunload are accepted, confirm is accepted, and prompt is dismissed, until set_dialog_answers says otherwise for that tab (Dialogs).
  • MCP_BROWSER_ENABLE_UNSAFE_LAUNCH_ARGS=1 lets the agent pass browser flags of its own when it launches a browser. Some browser flags name a program to run, so treat that setting as letting the agent run programs.
  • A watch (the watch tool) goes on reading its tab between calls, until unwatch, 10 minutes without a pull, or the client closing. It only reads, and in a tab it opened a confirm dialog is dismissed (in a tab you attached, dialogs are answered as for any attached tab: confirm is accepted unless you set otherwise). It acts only if you start the server with MCP_BROWSER_ENABLE_WATCH_REACTIONS=1: then a watch armed with "reactions": "act" also clicks and types, in a background tab it opened, with no call in flight, and only while the browser reports that tab to be on the pages the watch was pinned to (A watch that acts). The watch command does the same from a terminal, with no agent: it acts only when you pass --allow-steps with the hash of the watch file, and it starts no program. It writes to its state directory (MCP_BROWSER_STATE_DIR names it): for each watch name a lock file and, while a watcher runs, its process id and start time; and, only for a watch file with "afterGap": "fire", the trigger names, a hash of each trigger's definition and keyed hashes of the item keys seen. No address, selector or text of a page is written (Names and what is kept on disk).
  • On Chrome and Edge, once a tool has clicked or typed in a tab, the browser treats that tab as focused until it is detached, so that input also arrives when the tab is not in front. The tab stays where it is, but its page reads as visible, and may mark what it shows as read.
  • get_events returns the browser's protocol events: console, network and page events cut down to a few fields, and the rest as the browser sent them, without anything named for headers, cookies, or a request's body. get_cookies returns the cookies a page's script can read; a session snapshot holds the same.
  • MCP_BROWSER_TOOLS changes which tools are listed, not which can run: the others stay callable through more_tools.
  • The install commands use @latest, so a new release runs on the next start. To run only a version you have checked, pin it, such as mcp-browser-dev-tools@0.5.9.

The server has no runtime dependencies and no install scripts (prepare sets up the repository's git hooks and does not run when you install from npm), and npm releases are built by GitHub Actions from signed tags, with provenance. We ran this check on our own releases and fixed what it found: see the security review. To check it yourself before installing, give your coding agent this prompt:

Check https://github.com/Hinaser/mcp-browser-dev-tools for malicious or risky code before I install it. Look for network requests that leave this machine, data sent or saved outside the browser, downloaded code that gets run, and whether the npm package mcp-browser-dev-tools matches the source.

In Codex, allow network access when it asks; without it, Codex can only read GitHub through web search and cannot compare the npm package. Type the package name exactly: similarly named packages exist.

Compared With Playwright

Playwright is the better choice for deterministic automation and end-to-end tests, with its assertions, tracing, and CI tooling. This server is for a different job: letting an AI agent inspect and operate a live browser through MCP. The agent calls a fixed set of tools instead of writing and running scripts, can work in the tab and session you already have open, and uses the same tools on Chromium and Firefox.

Documentation

Development

corepack enable
pnpm install
pnpm run check
pnpm run pack:check

The repository uses pnpm for development and CI; the package is published to npm. See Publishing and Repository Settings for the release process.

Reviews

No reviews yet

Be the first to review this server!