cssprobe-cli
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cssprobe-cliinspect .sidebar on https://example.com and list overflow issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cssprobe-cli
Runtime CSS probe — inspect layout, scroll, colors, backgrounds, fonts and more in a live browser. Built for both humans and AI agents.
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.
Related MCP server: mcp-browser-lens
Installation
For Humans
Copy and paste this prompt to your LLM agent (Claude Code, Cursor, Codex, etc.):
Install and configure cssprobe-cli by following the instructions here:
https://raw.githubusercontent.com/mack-peng/cssprobe-cli/main/docs/guide/installation.mdOr 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:
curl -s https://raw.githubusercontent.com/mack-peng/cssprobe-cli/main/docs/guide/installation.mdOr install directly:
npm install -g cssprobe-cli
cssprobe-cli skill-installHow It Works
┌───────────────────────────────────────────────────────────┐
│ AI Agent │
│ │
│ "Is .sidebar overflowing?" │
│ calls: cssprobe-cli inspect .sidebar │
│ │ │
└─────────────────────────────┬─────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────┐
│ cssprobe-cli daemon │
│ │
│ collector (IIFE) → analyzer (pure) → renderer (md/json) │
│ │ │
│ ▼ │
│ Playwright browser (Chromium) │
│ getBoundingClientRect · getComputedStyle · DOM walk │
└───────────────────────────────────────────────────────────┘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
# Open browser (non-blocking, starts daemon session)
cssprobe-cli open https://getbootstrap.com/docs/5.3/examples/checkout
# Inspect with CSS selector
cssprobe-cli inspect .container
# Show ASCII layout diagram
cssprobe-cli layout .container
# Show only issues/warnings
cssprobe-cli findings .container
# Close browser when done
cssprobe-cli close2. Login-Protected Pages
# Open browser in headed mode
cssprobe-cli open https://mysite.com --headed
# User manually logs in...
# Save session state for future use
cssprobe-cli state-save --name mysite
# Reopen with saved state (no login needed)
cssprobe-cli open https://mysite.com --state state.json --headed3. JSON Output
cssprobe-cli inspect body --json
cssprobe-cli inspect body --json | jq '.findings[] | {id, confidence, message}'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:
cssprobe-cli mcp-install # auto-detect and configure installed clients
cssprobe-cli mcp-install --target=claude,cursor,codex
cssprobe-cli mcp-install --local # write project-scoped configManual configuration for any MCP client:
{
"mcpServers": {
"cssprobe-cli": { "command": "cssprobe-cli", "args": ["mcp"] }
}
}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
Command | Description |
| Open browser in session mode (non-blocking) |
| Show browser window |
| Open with saved cookies + localStorage |
| Custom viewport size |
| Close browser session |
| Close all sessions across all workspaces |
| Show session status |
CSS Inspection
Command | Description |
| Full CSS diagnosis (computed values, declared values, findings) |
| Include ASCII layout diagram |
| Compact: tree sketch + warnings/errors only |
| Structured JSON output |
| DOM tree structure |
| ASCII layout diagram |
| Only issues/warnings/errors |
CSS Injection
Command | Description |
| Inject CSS into current page |
Browser
Command | Description |
| Resize browser viewport |
| Evaluate JavaScript (browser context) |
| Execute Playwright API (Node.js context) |
| Take screenshot (saves to ~/.cssprobe-cli/screenshots/, --out to override) |
State
Command | Description |
| Import cookies from Netscape format |
| Save current browser session state (cookies + localStorage) |
Configuration
Command | Description |
| Show current config |
| Set config value |
| List all profiles |
| Switch active profile |
| Create new profile |
| Show config file path |
Confidence Model
Every finding carries a confidence level:
Level | Meaning |
DEFINITE | Based on computed values (facts from getComputedStyle) or accessible declared values |
INDEFINITE | Declared value uses |
UNVERIFIABLE | Declared value missing or from blocked cross-origin stylesheet |
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:
cssgraph (static) | cssprobe-cli (runtime) | |
Analyzes | source code (CSS/SCSS/Less + JSX/TSX + templates) | live browser (computed styles + DOM) |
Answers | where a class is defined, cascade, impact, unused CSS | actual rendered layout, overflow, scroll, height chains |
When | before/without a browser | after static analysis, to verify at runtime |
Usage |
|
|
Recommended workflow for a style problem — go static first, then verify at runtime:
# 1. Static: find the definitions, cascade, and blast radius (cssgraph)
cssgraph explore .btn-primary
cssgraph cascade .btn-primary
# 2. Runtime: confirm what actually renders (cssprobe-cli)
cssprobe-cli open https://example.com
cssprobe-cli inspect .btn-primary
cssprobe-cli findings .btn-primaryInstall: 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
# Set values
cssprobe-cli config-set browser chromium
cssprobe-cli config-set depth 8
cssprobe-cli config-set viewport 375x812
# Profile management
cssprobe-cli config-new staging
cssprobe-cli -p staging config-set browser firefox
cssprobe-cli config-use stagingPriority: CLI flags > Environment variables > Config file
--browser CSSPROBE_BROWSER
--depth CSSPROBE_DEPTH
--headed CSSPROBE_HEADED
--viewport CSSPROBE_VIEWPORT
-p, --profile CSSPROBE_PROFILEConfig file: ~/.cssprobe-clirc
Supported Platforms
Platform | Architectures |
macOS | x64, arm64 |
Linux | x64, arm64 |
Windows | x64, arm64 |
Development
npm install
npm run build # tsc + esbuild collector + daemon entry + generate help.json
npm test # Run unit tests (58 tests)
npx tsc --noEmit # Type check onlyIf cssprobe-cli is useful
A ⭐ star helps other developers discover it — and tells us to keep shipping.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
- TabfleetOAuthcom.tabfleet
Launch, inspect, control, and share isolated cloud browsers for your agents.
Validate HTML/CSS, audit SEO and JSON-LD, check links, and capture responsive screenshots.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables comprehensive web frontend debugging and analysis through DOM inspection, JavaScript execution, network monitoring, console log capture, and automated browser interactions. Supports complete web development workflows including testing, data extraction, and performance analysis.15-
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with deep visibility into a running web page's UI by capturing DOM, styles, and screenshots through a lightweight bookmarklet. It facilitates design-to-code comparisons, accessibility audits, and automated CSS debugging directly within an IDE.34 npm3MIT
- AlicenseAqualityDmaintenanceLets AI agents visually inspect web elements, test CSS edits in real-time, and iterate until pixel-perfect, functioning like browser DevTools for debugging UI issues.16 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables CSS layout verification and debugging by extracting deterministic, diffable rendered layout from a browser, allowing agents to inspect, explain, and diff CSS changes.46 npm2MIT