
Cssprobe Cli
io.github.mack-pengPublished by GitHub account mack-pengv0.3.0Updated Oct 24, 2026
Runtime CSS probe — inspect layout, overflow, scroll chains in a real browser. For AI agents.
Overview
Local MCP server that opens a real Chromium browser so an assistant can inspect rendered CSS layout, overflow and scroll behavior.
- What you can do
- Open, close and check a browser session, including headed mode, viewport size and saved login state
- Inspect a selector's computed and declared styles, DOM tree, ASCII layout diagram and findings with confidence levels
- Run JavaScript in the page, inject CSS, resize the viewport and take screenshots
- Click, hover, type and wait for selectors, JS predicates or network idle
- Run multi-step flow scripts and JSON regression suites with assertions and artifacts
- When to use it
- Useful when an assistant must debug CSS that only shows up at runtime — why an element overflows, what the actual rendered layout is, or whether a container scrolls — instead of guessing from source code. Also handy for verifying a page after a style change or for repeatable browser regression checks.
- Requirements
- Runs as a local npm package (cssprobe-cli) started with the mcp subcommand; needs Node.js and a Playwright-managed Chromium browser installed on the machine. Desktop only, with macOS, Linux or Windows on x64 or arm64. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open Cssprobe Cli in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
cssprobe-cli
Runtime CSS probe — inspect layout, scroll, colors, backgrounds, fonts and more in a live browser. Built for both humans and AI agents.
[License: MIT] [Node.js] [npm version] [npm downloads] [GitHub stars]
Static + runtime CSS diagnosis for AI agents — pair with cssgraph (the CSS knowledge graph) for the full picture.
Why cssprobe-cli?
When an AI agent needs to debug CSS — why is this element overflowing, what's the actual rendered layout, is this container scrollable — it can't see the browser. It guesses from static code, missing runtime-only issues like overflow, scroll chains, and containing block hijacks.
cssprobe-cli gives the agent eyes. It opens a real browser, collects computed styles and metrics via injected JavaScript, analyzes them with a confidence model, and returns structured findings — all in one command. The agent asks a question about any selector and gets back the DOM tree, ASCII layout diagram, overflow warnings, and scroll diagnosis without leaving the terminal.
Installation
For Humans
Copy and paste this prompt to your LLM agent (Claude Code, Cursor, Codex, etc.):
Or read the Installation Guide, but seriously, let an agent do it. Humans fat-finger configs.
For LLM Agents
Fetch the installation guide and follow it:
Or install directly:
How It Works
- Session —
openspawns a daemon process managing a browser. Commands connect via Unix socket. - Collector — Injected as IIFE into the page. Walks the DOM, reads computed styles, declared values, and element metrics.
- Analyzer — Pure Node.js functions. Classifies findings with confidence levels (DEFINITE / INDEFINITE / UNVERIFIABLE).
- Renderer — Outputs Markdown (default) or JSON. Includes ASCII layout diagram, DOM tree, and findings.
Quick Start
1. Inspect a Page
2. Login-Protected Pages
3. JSON Output
4. Use as an MCP Server (AI clients)
cssprobe-cli ships an MCP server (stdio), so AI clients call it as a native tool — no shell needed:
Manual configuration for any MCP client:
Exposes 10 tools: cssprobe_open, cssprobe_inspect, cssprobe_tree, cssprobe_layout,
cssprobe_findings, cssprobe_eval, cssprobe_screenshot, cssprobe_inject_css,
cssprobe_close, cssprobe_status. Remove with cssprobe-cli mcp-uninstall.
Commands
Session Management
CSS Inspection
Inspection commands accept --frame <index|name|url-substring> to target an iframe; the default is the main frame.
CSS Injection
Browser
Interaction
click / hover support --nth N (1-based, default first match), --force (skip actionability checks) and --timeout ms. Without --nth, multiple matches fail (strict) to prevent wrong-target clicks.
State
Configuration
Multi-step Flows
The interaction commands drive a page step by step; run turns a sequence into a versionable script:
For repeatable flows, write a script and run it with one command. The script runs inside the daemon session (full Playwright page access):
Scripts must default-export an async function receiving the API object: page, context, frames(), newPage(), click, hover, type, waitFor, inspect, screenshot, expect, log. waitFor accepts { state, timeout, frame }. Uncaught page errors are collected into the result envelope as pageErrors. screenshot relative paths resolve against the script's directory; logs (log() and console.*) are collected and returned with the result. On failure the command exits 1, prints the collected logs, and keeps the session alive.
Scripts are executed by the local daemon with full Node privileges — only run trusted scripts.
Scenario Suites (Regression)
Run repeatable regression cases from a JSON suite: each case opens a fresh browser, executes steps, asserts on saved values, and writes artifacts + an optional JUnit report.
Steps: goto, reload, wait, eval, sample, waitStable, click, waitFor, screenshot, assert. wait takes a fixed ms; waitFor supports frame for in-iframe selector/js waits. sample and eval save values with save: "<name>"; assertions read them with on: "<name>" + path, or check live state (url, title, frames), url, globals, absent. sample supports key, tailFrom, ignoreErrors; every run writes summary.json, per-case case.json, sample series and failure screenshots.
Iframe and preview pages. A page can contain hidden helper iframes (about:blank); use frames to pick the real one, and state: "attached" when waiting for a frame element that is not visible. Preview frames can take 6–8s to render and analytics requests keep networkIdle busy — prefer a fixed wait step followed by a waitFor inside the frame (frame: "i/preview") instead of networkIdle.
Confidence Model
Every finding carries a confidence level:
The report header shows: confidence: DEFINITE 8 | INDEFINITE 0 | UNVERIFIABLE 1
Complementary Tool: cssgraph
cssprobe-cli is a runtime CSS probe — it opens a real browser and reads what is actually rendered. For static questions about the source code — where is .btn-primary defined, what cascades over it, which components reference it, what would change if I edited it — use cssgraph, a local SQLite knowledge graph of every className, property, variable, and at-rule in your stylesheets. The two tools complement each other:
Recommended workflow for a style problem — go static first, then verify at runtime:
Install: npm install -g cssgraph (requires Node.js >= 22.5.0). It exposes 12 MCP tools (cssgraph_explore, cssgraph_rule, cssgraph_impact, …) plus CLI commands. See npm / GitHub.
Configuration
Priority: CLI flags > Environment variables > Config file
Config file: ~/.cssprobe-clirc
Supported Platforms
Development
If cssprobe-cli is useful
A ⭐ star helps other developers discover it — and tells us to keep shipping.
License
MIT
Source: README.md at commit 80057ad
Tools
0Version history
1- v0.3.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts