Skip to main content
Glama
zhaohaijun734-arch

local-chrome-cdp-probe-mcp

local-chrome-cdp-probe-mcp

Real-browser measurement + screenshots through your local Chrome via the Chrome DevTools Protocol. Zero npm dependencies (Node >= 20 global fetch/WebSocket), zero Python deps beyond the MCP SDK. For when Playwright is not cached and agent-browser is not installed, but the bug report is "this button looks squashed on my screen".

Why this exists — the traps it removes

Trap

Symptom

Handled by

/json/new with GET

plain text "Using unsafe HTTP verb GET..." then .json() explodes

probe uses PUT (Chrome >= 111 contract)

Host sandbox kills Chrome's sandbox

renderer dies, DevTools ws closes with 1006 immediately

--no-sandbox --disable-dev-shm-usage baked in

Node WebSocket sends an Origin header

DevTools rejects the upgrade, 1006

--remote-allow-origins=* baked in

Retina display doubles physical pixels

measured sizes 2x of CSS px

--force-device-scale-factor=1 baked in

httpOnly login cookies unreachable from scripts

"just set document.cookie" fails

login is a fetch POST executed INSIDE the page - the browser's cookie jar applies

Modal overlays ruin screenshots

shot full of forced-password-change mask

your measure_js can remove the mask before capture

Related MCP server: chrome-mcp

Install & run

pip install -e .            # mcp only
node --version              # must be >= 20
python server.py            # stdio transport
{
  "mcpServers": {
    "local-chrome-cdp-probe": {
      "command": "python",
      "args": ["/path/to/local-chrome-cdp-probe-mcp/server.py"]
    }
  }
}

Optional env: CHROME_PATH (any Chromium), NODE_BIN (default node), PROBE_TIMEOUT (wrapper timeout, default 60s; per-probe --timeout-ms default 30s).

Smoke test

python test_smoke.py    # real Chrome round trip on a local file:// page

License: MIT.

Available Tools

2 tools
probe_availableA

Preflight: check node + the bundled probe script + Chrome detection.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full disclosure burden. It does convey the substance of the operation (environment/dependency probing) and implicitly that it is a non-mutating diagnostic, but it says nothing about what a result looks like, whether it fails fast, how long it may take (Chrome detection can be slow), or whether missing dependencies raise or return a status. Useful but incomplete for an unannotated tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence prefixed with 'Preflight:' that identifies the stage and then lists the checks. No filler, no redundancy, and the most important cue (when in the workflow it runs) comes first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should explain what the agent gets back so it can interpret results and decide whether to proceed to probe_page. It lists what is checked but not what a successful or failed result looks like, leaving a real gap for a diagnostic tool whose entire value is its return payload.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing for parameter documentation to add; the baseline for a no-param tool is 4. The description correctly implies no inputs are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete action (preflight check) and enumerates the three things verified: Node, the bundled probe script, and Chrome detection. That is far more informative than a tautology, and it is distinguishable from probe_page. It stops short of 5 only because 'check' is a slightly loose verb and the scope of each check (version threshold? install path?) is unspecified.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The word 'Preflight' strongly implies this runs before the real work, which in context means before probe_page, but that ordering is never stated explicitly and no alternatives or when-not conditions are given. Usage is inferable rather than spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

probe_pageA

Measure and/or screenshot a page in real local Chrome.

Args: url: full URL to probe (http/https/file) measure_js: in-page JS expression (IIFE returning an object) evaluated after load; its value comes back as measurements. Example that measures one element's real text width: (() => { const el = document.querySelector('#target'); if (!el) return null; const b = el.getBoundingClientRect(); const cs = getComputedStyle(el); return { x: Math.round(b.x), y: Math.round(b.y), w: Math.round(b.width), h: Math.round(b.height), usable_text_width: Math.round(el.clientWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight) - 2) }; })() viewport_w / viewport_h: emulated viewport (also set via Emulation.setDeviceMetricsOverride, so it holds regardless of the Chrome window size) screenshot: capture a PNG and return it as base64 login: "user:pass" - a JSON POST login executed IN the page context before measuring (httpOnly cookies are fine - the page fetch carries them). Requires the target app to have a JSON login API. login_url: login endpoint path, default /api/auth/login login_body: JSON template with %u / %p placeholders, default {"username":"%u","password":"%p"} timeout_ms: overall probe timeout

Returns: {ok, origin, viewport, login_status, measurements, png_base64}

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
loginNo
login_urlNo
login_bodyNo
measure_jsNo
screenshotNo
timeout_msNo
viewport_hNo
viewport_wNo

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses that viewport emulation persists regardless of the Chrome window size, that login runs a JSON POST inside the page context and therefore carries httpOnly cookies, and that the target app must expose a JSON login API. It stops short of stating whether the tool is otherwise side-effect-free, whether the browser session is shared, or any concurrency/timeout failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in one sentence, then parameters are enumerated in a scannable list with the return shape last. The measure_js example is long but earns its space by making a non-obvious parameter usable; there is only minor redundancy in the viewport bullet.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter browser automation tool with no annotations and no output schema, the description supplies the return shape ({ok, origin, viewport, login_status, measurements, png_base64}), the login mechanics, and the measurement example. It is nearly complete; only safety/side-effect profile and failure modes are absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 9 parameters, so the description must compensate entirely and it does: every parameter is documented with type-appropriate semantics, defaults (login_url=/api/auth/login, timeout 30000), the %u/%p placeholder contract in login_body, and a full working measure_js IIFE example. This is far beyond what the bare schema conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair and resource: 'Measure and/or screenshot a page in real local Chrome.' The 'real local Chrome' qualifier distinguishes it from headless/HTTP fetching and from the sibling probe_available, which by its name only checks reachability. An agent knows immediately what this tool produces (measurements and/or a PNG).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the worked measure_js example (measuring one element's real rendered text width), which conveys the intended use case without stating when to prefer this over probe_available or when not to use it. There are no explicit exclusions or prerequisites beyond the login-requires-JSON-API note. Adequate but with a clear routing gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 2 tool updatesv1.0.0
    • First observedprobe_available
    • First observedprobe_page

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct roles: probe_available is a preflight/environment check (node, bundled script, Chrome detection) while probe_page performs the actual measurement/screenshot work. There is no overlap in purpose, so an agent can pick correctly without hesitation.

Naming Consistency5/5

Both tools use the same snake_case, 'probe_' prefixed pattern (probe_available, probe_page), which reads as a deliberate, predictable namespace. No mixing of conventions or verb styles.

Tool Count3/5

Two tools is on the thin side, though the server's scope (a local Chrome CDP probe) is intentionally narrow. Much of the capability is folded into probe_page's many parameters, so the count is defensible but borderline minimal.

Completeness4/5

The surface covers preflight, navigation, viewport emulation, authenticated JSON login, arbitrary in-page measurement, and screenshots, which is solid for the stated purpose. Gaps exist around multi-page/batch probing, wait conditions (network idle, selector waits), and console/error capture, but the free-form measure_js escape hatch lets agents work around most of them.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables MCP clients to drive a real, logged-in Chrome browser for web automation tasks like navigation, clicking, typing, and screenshotting.
    0
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Drive your real, signed-in Chrome browser from any MCP client, enabling browser automation such as navigation, clicking, typing, and screenshots through standard MCP tools.
    1
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables fast browser automation on a real Chrome tab via a local hub, providing MCP tools for clicking, filling, snapshotting, and navigating without launching a full browser instance.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes a live Chrome browser to any MCP client through a single local endpoint, enabling real-tab control, DOM interaction, cookies and session use, network/console capture, PDF export, and CDP-powered debugging.
    MIT