Skip to main content
Glama
quark-browser-mcp

quark-browser-mcp

by RrOrange

quark-browser-mcp

English · 简体中文

An MCP server that drives the browser you're already logged into, over the Chrome DevTools Protocol.

Zero dependencies — node:http for the transport, Node 22+ global WebSocket for CDP.

node server.mjs --http 9311        # streamable HTTP at http://127.0.0.1:9311/mcp
node server.mjs                    # or stdio

Why

Most browser MCP servers launch a fresh Chrome profile, so you're logged out of everything.

This one attaches to a running Chromium browser that already has your cookies, sessions and extensions — so an agent can act as you on sites you're signed in to, without a login dance every time.

It was built for the Quark PC client (a Chromium 144 derivative), but the protocol is plain CDP, so any Chromium with --remote-debugging-port works: Chrome, Edge, Brave, CentBrowser, …

Related MCP server: BrowserUse

Requirements

  • Node.js 22+ (for the built-in WebSocket)

  • A Chromium-based browser started with a debugging port:

your-browser.exe --remote-debugging-port=9223

Verify: curl http://127.0.0.1:9223/json/version should return JSON.

Pick a free port. If another browser already uses 9222, pass it a different one — this server defaults to 9223 and can be pointed anywhere with QUARK_CDP.

Install

git clone https://github.com/RrOrange/quark-browser-mcp.git
cd quark-browser-mcp

No npm install needed — there are no dependencies.

Run

# HTTP transport (easiest for MCP clients that take a URL)
node server.mjs --http 9311

# stdio transport
node server.mjs

Environment:

Variable

Default

Meaning

QUARK_CDP

http://127.0.0.1:9223

where the browser's CDP endpoint lives

Register with any MCP client:

# Claude Code
claude mcp add --transport http quark-browser http://127.0.0.1:9311/mcp

For clients that only speak stdio, point them at node /path/to/server.mjs.

Health check

curl http://127.0.0.1:9311/health
# {"ok":true,"cdp":"http://127.0.0.1:9223"}

Tools

Tool

What it does

browser_tabs

list tabs (id / title / url)

browser_open

open a new tab at a url

browser_navigate

navigate the current tab

browser_snapshot

text snapshot: url, title, and [n]-numbered interactive elements

browser_click

click ref (scrolls into view → mousedown/mouseup/click), returns a fresh snapshot by default

browser_type

fill ref using the native value setter (works with React controlled inputs)

browser_press

dispatch a key: Enter, Tab, Escape, Control+a

browser_eval

run JS in the page, return a JSON-serialisable value

Typical session:

browser_open      {"url":"https://music.163.com"}
browser_snapshot  {}
browser_type      {"ref":3,"text":"周杰伦"}
browser_press     {"key":"Enter"}
browser_click     {"ref":7}

Every tab target accepts an optional target_id; omit it to act on the first page.

Design notes

  • The snapshot is the addressing scheme. Every snapshot rewrites data-qb-ref on the elements it returns, so old refs die immediately. The model has to look before it acts — no stale CSS selectors.

  • Click scrolls first. scrollIntoView({block:'center'}), then dispatch mousedown/mouseup/click at the element's centre, so lazy-loaded and half-visible targets still work.

  • Typing uses the native setter. HTMLInputElement.prototype's value setter plus input/change events — React and Vue controlled components see it as real input.

  • Snapshot comes back with the action. Click returns the resulting page state in the same call, which halves the round trips.

  • Text snapshots, not screenshots. Interactive elements only, capped at 500 per snapshot, labels truncated to 80 characters — cheap in tokens and good enough to drive a page.

Tested

Target: Quark PC 7.4.9.1045, Chrome/144.0.7559.86.

GET  /health                 → {"ok":true,"cdp":"http://127.0.0.1:9223"}
initialize                   → protocolVersion 2025-06-18
tools/list                   → 8 tools
browser_tabs                 → 8 real tabs
browser_open example.com     → new tab id=01D07EA3…
browser_snapshot             → URL/TITLE/REFS:1 → [1] a "Learn more" -> https://iana.org/…
browser_eval document.title  → "Example Domain | https://example.com/"
browser_type   {ref:1}       → typed into [1] input
browser_click  {ref:2}       → clicked [2] button
verify        document.title  → "clicked:hello-mcp"     ← page JS really ran

Works with any Chromium exposing CDP; the table just records what this was verified against.

Security

The debugging port is full control of the browser, including every logged-in session.

  • Keep it on 127.0.0.1; never expose it on a LAN interface or forward it publicly.

  • If you need it from another machine, tunnel it (ssh -L 9223:127.0.0.1:9223 …).

  • Chromium only binds the debugging port to loopback by default — keep it that way.

  • An agent with these tools can read anything the browser can read. Grant it deliberately.

Roadmap

  • screenshot tool (Page.captureScreenshot) for vision models

  • explicit tab switch / close tools

  • optional ref-less coordinate clicking

  • optional --allow-origin for restricted HTTP clients

License

MIT

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
      B
      quality
      C
      maintenance
      Enables MCP clients to drive a real Chromium browser for automation, including navigation, JavaScript execution, CDP commands, network capture, and multi-tab control.
      7
      GPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to control Chrome/Edge browsers via CDP, including page navigation, element interaction, snapshots, network debugging, script execution, and performance tracing.
      AGPL 3.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to drive the user's real Chrome over CDP with tools for tab management, page inspection, smart form interaction, disabled-control diagnostics, and screenshots while keeping one connection alive across multi-step agent loops.
      MIT