Skip to main content
Glama
browser-mcp
by cwilko

browser-mcp

A small MCP server that drives a real Google Chrome through Patchright (a Playwright build with the automation signs removed), for research agents reading marketplace sites. Chrome runs headed on a virtual display (Xvfb), with a normal profile, en-GB locale and London time zone.

It serves streamable HTTP at /mcp and enforces its own limits, so an agent cannot browse faster or further than allowed.

Tools

Tool

What it does

navigate(url)

Open a page on an allowed site. Returns URL, title, HTTP status, page-load counts and an accessibility snapshot with element refs ([ref=e42]).

snapshot()

The current page's snapshot again, without loading anything.

click(ref)

Click an element by ref. Returns the new snapshot.

type(ref, text, submit)

Type into an input (for example a search box), optionally pressing Enter.

scroll(direction)

Scroll to load more results.

back()

Re-open the previous page of this session.

close()

Close the session's tab.

There is no script evaluation, file access or screenshot tool.

Related MCP server: Browser MCP

Limits

Limit

Default

Variable

Page loads at a time, whole server

1

Gap between loads on a site (randomised)

4–8 s

MIN_DELAY_MS, MAX_DELAY_MS

Page loads per site per session

60

MAX_LOADS_PER_SITE

Page loads per session

150

MAX_LOADS_PER_SESSION

Time an automatic bot check may take to clear

20 s

CHALLENGE_WAIT_MS

How long a site stays closed after a 429 or an uncleared bot check

6 h

SITE_COOLDOWN_MS

A page load is a navigate, a back, or a click or submit that loads a new document. It counts against the site the page lands on. Cooldowns are kept in memory, so restarting the server clears them.

Hosts:

  • ALLOWED_SITES (required): comma-separated sites whose pages may be opened, for example upwork.com,fiverr.com. Subdomains match. Every top-level navigation is checked, including redirects and clicked links.

  • Sub-resources (scripts, images, bot-check frames) may come from any public host, because blocking them breaks pages and bot checks. No request at all may reach a private or loopback IP address or a host ending in BLOCKED_HOST_SUFFIXES (default localhost,.local,.internal,.svc,.cluster.local,.lan).

Other settings

Variable

Default

AUTH_TOKEN

required

Callers send Authorization: Bearer <token>

PORT

3000

SESSION_IDLE_MS

30 min

Sessions with no request for this long are closed

BROWSER_IDLE_MS

10 min

Chrome is closed when no session has been open for this long, and started again on the next one

MAX_SNAPSHOT_CHARS

60000

Longer snapshots are cut

USER_DATA_DIR

/tmp/browser-profile

Chrome profile (cookies persist across sessions until the pod restarts)

GET /healthz answers without a token.

Build

npm ci && npm run build. The image (Dockerfile, amd64 only because Google Chrome has no Linux arm64 build) is pushed to Docker Hub as wilkobets/browser-mcp by .github/workflows/dockerhub.yml, tagged sha-<commit> on every push to main.

The container needs writable /tmp, /home/node and a large /dev/shm (256 MiB or more); with a read-only root filesystem, mount emptyDirs there.

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
      Not graded
      quality
      B
      maintenance
      Enables any agent to drive a dedicated Chromium instance through MCP, including opening and reading pages, taking steps, logging in via a password vault, downloading/uploading files, and replaying saved routines. It also gates sensitive actions behind approvals and can use client certificates or one-time card data for official procedures.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables agents to observe and act on live browser pages through screenshots, bounded actions, responsive captures, console and network inspection, tab operations, and session management over local stdio or authenticated HTTP.
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coding agents to drive a stealth Chrome session, inspect page digests and interactive elements, and capture API requests, console errors, and page code through MCP tools.
      390 npm
      AGPL 3.0