eyedom
Inspects React fiber internals on captured elements to report the component name and ancestor component tree.
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., "@eyedom fix the latest captured DOM bug"
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.
EyeDOM is a local browser DOM/CSS bug inspector and universal MCP (Model Context Protocol) + CLI bridge for AI coding agents.
Open any local dev server or live website with eyedom open <url>, click the broken element, and stream a clean, token-efficient Markdown report directly into Claude Code, Antigravity, Cursor, Windsurf, VS Code, Gemini CLI, Codex CLI, OpenCode, Zed, Aider, or any shell workflow. Works across Chrome, Firefox, Safari, Edge, and Brave.
Demo
Full-resolution MP4:
assets/demo.mp4
Related MCP server: ui-ticket-mcp
Quick Start
Install globally from GitHub (recommended)
npm install -g github:cosmicrouter/eyedom
# 1. Auto-connect EyeDOM MCP to every installed AI CLI & IDE
eyedom setup
# 2. Open any local or live URL with the inspector auto-injected
eyedom open http://localhost:3000Or run directly without installing
npx github:cosmicrouter/eyedom setup
npx github:cosmicrouter/eyedom open http://localhost:30003-Step Workflow
Run
eyedom open <url>(e.g.http://localhost:3000,localhost:5173, orhttps://your-staging-app.com).Click the bottom-right Inspect button (or press
Alt + Shift + D) and click the broken element.Ask your AI coding agent: "Fix the latest captured DOM bug."
Features
Same-Origin Local Reverse Proxy + HMR WebSocket Tunnel (
eyedom open <url>): Strips strictContent-Security-Policyheaders, followshttp -> httpsandwwwredirects, tunnels WebSocketUpgradeconnections so Vite / Next.js Hot Module Replacement (HMR) stays live, and serves/__eyedom/eyedom.js+/__eyedom/captureon the exact same origin.Shadow DOM Isolated Inspector: The hover highlight frame, dimension/selector badge, and floating controls live inside an isolated Shadow DOM (
z-index: 2147483647), completely immune to broken host-page CSS.Token-Optimized Layout Extraction: Filters computed styles down to layout-critical CSS (
display,position, box model,flex*,grid*,gap,overflow*,transform,z-index,opacity) and capsouterHTMLat 1,500 characters so your agent gets signal instead of noise.Overflow & Geometry Diagnostics: Computes exact
getBoundingClientRect()coordinates alongsidescrollWidth/clientWidthand viewport bounds to flagHORIZONTAL OVERFLOW (X),VERTICAL OVERFLOW (Y), andEXCEEDS VIEWPORTautomatically.Framework Component Trace: Inspects React (
__reactFiber$/__reactInternalInstance$) and Vue 2/3 (__vueParentComponent/__vue__) internals to report the exact component name and ancestor tree (PricingCard -> DashboardPage).Parent Layout Context: Captures the immediate 2 ancestor elements (
L1,L2) with their layout styles (display,position,overflow,width,height) — critical for debugging flex/grid shrinking and clipping issues.Live Console & Runtime Errors: Hooks
console.error,window.onerror, andunhandledrejectionto attach the last 5 runtime errors to every capture.Multi-Agent Port Safety (
EADDRINUSE): Run Claude Code, Antigravity, Cursor, and OpenCode simultaneously without port4789collisions. Secondary MCP processes seamlessly fall back to file-backed reads from~/.eyedom/.Offline Clipboard Fallback: If the local server is stopped, EyeDOM automatically formats the captured element as Markdown and copies it to your clipboard.
Minimal Local Workspace (
http://127.0.0.1:4789): Monochrome split-view workspace to launch any URL, browse the last 10 captures, preview/copy Markdown reports, and connect local agents in one click.
Real-World Workflows
1. Local Dev Server (Vite, Next.js, Remix, SvelteKit, Astro)
eyedom open http://localhost:3000Click the overflowing card or misaligned navbar item → switch to Claude Code / Cursor / Antigravity → "Fix the latest captured DOM bug."
2. Live Staging or Production HTTPS Site (Strict CSP)
eyedom open https://staging.example.com/checkoutEyeDOM proxies the site locally, removes CSP blocks, injects the inspector, and reports the original https://staging.example.com/checkout URL in the bug report.
3. Pipe Directly into Any CLI Agent (Aider, Claude, Custom Scripts)
eyedom latest | claude
eyedom latest | aider --message-file -
eyedom latest --json | jq '.geometry'4. Direct Script Tag (Optional, No Proxy Needed)
If you only debug your own local HTML and prefer not to use the proxy, start eyedom start and drop one line into your dev HTML:
<script src="http://127.0.0.1:4789/eyedom.js"></script>Supported AI Agents
eyedom setup auto-detects installed agents across Linux, macOS, and Windows and safely merges the eyedom MCP entry without touching your existing configuration:
Agent | Config Path | Schema | Auto-Setup |
Claude Code |
|
|
|
Claude Desktop |
|
|
|
Antigravity |
|
|
|
Cursor |
|
|
|
Windsurf |
|
|
|
VS Code (Copilot MCP) |
|
|
|
Gemini CLI |
|
|
|
Codex CLI |
|
|
|
OpenCode |
|
|
|
Zed |
|
|
|
Aider / Any Pipe CLI |
| Pipe ( |
|
Claude Code:
claude mcp add eyedom -- eyedom mcpAntigravity / Cursor / Windsurf / Claude Desktop:
{
"mcpServers": {
"eyedom": {
"command": "eyedom",
"args": ["mcp"]
}
}
}VS Code (mcp.json):
{
"servers": {
"eyedom": {
"type": "stdio",
"command": "eyedom",
"args": ["mcp"]
}
}
}Codex CLI (~/.codex/config.toml):
[mcp_servers.eyedom]
command = "eyedom"
args = ["mcp"]OpenCode (~/.config/opencode/opencode.json):
{
"mcp": {
"eyedom": {
"type": "local",
"command": ["eyedom", "mcp"],
"enabled": true
}
}
}What Gets Captured
Every click writes an atomic Markdown report to ~/.eyedom/latest.md, full JSON to ~/.eyedom/latest.json, and updates the rolling 10-capture log in ~/.eyedom/history.json:
# EyeDOM Element Bug Report
- **Capture ID:** `cap_m9x4k2_a1f0`
- **Captured At:** 2026-11-28T20:33:11.885Z
- **Page URL:** http://localhost:3000/dashboard
- **Viewport:** 1440x900px (DPR: 2)
- **Framework:** React `<PricingCard />` (tree: `PricingCard` -> `DashboardPage`)
## 1. Element Identity
- **Tag:** `<div>`
- **ID:** `#pro`
- **Classes:** `pricing-card`, `overflow-bug`
- **Unique Selector:** `#pro`
### outerHTML
```html
<div id="pro" class="pricing-card overflow-bug">...</div>2. Geometry & Overflow
Bounding Rect: x=348px, y=160px, width=260px, height=190px
Scroll vs Client: scroll=320x190px, client=260x190px
Overflow Status: HORIZONTAL OVERFLOW (X)
3. Computed Layout Styles
display: flex;
position: relative;
box-sizing: border-box;
width: 260px;
height: 190px;
overflow-x: visible;4. Parent Context
Direct Parent (L1):
section#grid-wrap.cards-gridLayout:
display: grid; position: relative; overflow: hidden; width: 960px; height: 400px
5. Recent Console & Runtime Errors (Last 5)
(console.error) Warning: Each child in a list should have a unique key prop.
---
## Architecture
```mermaid
flowchart LR
Browser["Browser (Any Site via eyedom open)"] -->|"Same-origin POST /__eyedom/capture"| Proxy["EyeDOM Reverse Proxy + Receiver (127.0.0.1:4789)"]
Proxy -->|"Atomic write (last 10)"| Store["~/.eyedom/ (latest.md, latest.json, history.json)"]
Store -->|"MCP stdio (EADDRINUSE-safe)"| Agents["Claude Code · Antigravity · Cursor · Windsurf · VS Code · Codex · OpenCode · Zed"]
Store -->|"eyedom latest | ..."| CLI["Aider & Shell Pipelines"]CLI Reference
Command | Description |
| Auto-detect and connect EyeDOM MCP to all installed AI CLIs & IDEs. Pass |
| Launch a same-origin local reverse proxy with EyeDOM auto-injected and open it in your default browser. |
| Start the minimal local workspace and HTTP receiver at |
| Run the standard stdio MCP server (automatically falls back to file-backed mode if port |
| Print the latest captured DOM bug to |
| Print a Markdown summary table of the last 10 captures. |
| Check if the local EyeDOM server is running. |
| Clear all captures from memory and |
MCP Tools
Tool | Parameters | Description |
| none | Returns the full Markdown report for the most recently captured element. |
| none | Lists a summary table (ID, timestamp, URL, selector, overflow flags) of the last 10 captures. |
|
| Returns the full Markdown report for a specific capture ID. |
| none | Clears all stored capture history from memory and |
HTTP API (127.0.0.1:4789)
GET /— Minimal local EyeDOM workspace (URL launcher, live captures, Markdown viewer, one-clickConnect Agents)POST /api/proxy— Launches a same-origin reverse proxy for{ "url": "..." }POST /api/setup— Runs auto-setup for all detected local AI agentsGET /eyedom.js— Standalone Shadow DOM inspector bundlePOST /capture— Receives and persists a DOM capture payloadGET /api/captures/DELETE /api/captures— List or clear stored capturesGET /health— Server status JSON
Environment Variables
Variable | Default | Description |
|
| Bind host for the local HTTP server and proxies |
|
| Port for the main EyeDOM workspace and receiver |
|
| Storage directory for |
Privacy & Security
100% Local: EyeDOM binds exclusively to
127.0.0.1by default.Zero Telemetry: No analytics, no cloud relay, no external API calls.
Atomic Local Storage: Captures are written only to
~/.eyedom/on your machine and cleared anytime witheyedom clear.
FAQ
My AI agent doesn't see EyeDOM tools right after eyedom setup.
Restart your AI CLI or IDE session once so it reloads its MCP server configuration.
Can I run Claude Code, Antigravity, and Cursor at the same time?
Yes. The first process binds to 127.0.0.1:4789; every additional eyedom mcp instance detects EADDRINUSE and silently reads the shared atomic store in ~/.eyedom/.
Does it work on websites with strict CSP or HTTPS?
Yes. eyedom open <url> proxies the target site on 127.0.0.1, strips CSP headers, and serves both the inspector script and capture endpoint on the same origin.
Development & Contributing
git clone https://github.com/cosmicrouter/eyedom.git
cd eyedom
npm install
npm testPull requests and issues are welcome. Please run npm test before submitting changes.
License
MIT © 2026 cosmicrouter
Available Tools
4 toolsclear_dom_capturesA
Clears all stored EyeDOM capture history from memory and ~/.eyedom/.
Inputs: no named parameters.
get_dom_capture_by_idA
Returns the full Markdown DOM/CSS/layout bug report for a specific capture ID from list_dom_captures.
Inputs: id (required).
get_latest_dom_bugA
Returns the most recently captured broken DOM element from EyeDOM (HTML, computed CSS, bounding box, overflow flags, parent layout context, React/Vue component name, and last 5 console errors) in clean Markdown.
Inputs: no named parameters.
list_dom_capturesA
Lists a concise summary (ID, timestamp, URL, selector, overflow flags) of the last 10 captured DOM elements.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct role: fetch the newest capture, enumerate recent captures, fetch one capture by ID, and wipe history. The only near-overlap (get_latest_dom_bug vs get_dom_capture_by_id) is made explicit by the names and descriptions, so selection is unambiguous.
All four names follow a snake_case verb_noun pattern (get_/list_/clear_ + dom resource). The only wrinkle is vocabulary drift between 'dom_bug', 'dom_capture', and 'dom_captures' for what is effectively the same object, but the pattern itself is predictable.
Four tools is a tight, well-scoped surface for a passive capture-inspection server where the browser extension does the capturing. It is slightly lean — no per-capture deletion or filtering — but nothing feels redundant or padded.
The read lifecycle (latest, list, get-by-ID) plus a bulk clear covers the core workflow with no dead ends. Minor gaps exist: no delete of an individual capture, no search/filter by URL or selector, and no way to distinguish 'clear history' from 'reset state' beyond the single bulk operation.
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
Snag gives your own coding agent (Claude Code, Cursor, Codex, Gemini CLI, VS Code) the evidence behind a bug report: the reporter's console log, network requests, session replay and annotated screenshots, plus repro steps and page context. Your agent reads the report, writes the fix and opens a pull request for a human to review, then links the PR back to the ticket. Snag never touches your code and never auto-merges. Sign in with OAuth in the browser; no token to copy. A free capture-only workspace is enough to try it.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server and Chrome extension that allows users to select browser DOM elements via a keyboard shortcut to provide detailed technical context to AI coding tools. It captures HTML attributes, CSS styles, and React component metadata, enabling agents to analyze and modify web elements directly.599MIT
- FlicenseNot gradedqualityCmaintenanceHuman-to-AI code review bridge. Annotate UI elements in the browser with review comments, and AI agents read the feedback via MCP to fix code automatically — with full element context (CSS selector, styles, DOM path, accessibility info). 10 MCP tools, framework-agnostic Web Component, zero-config install via uvx.9-
- AlicenseAqualityCmaintenanceEnables AI agents to monitor and debug browser runtime errors, console logs, and page diagnostics in real time via a Chrome extension and local MCP server.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables visual annotation on web pages for Claude Code, allowing element selection, comment addition, screenshot capture, and structured UI feedback for code fixes via an MCP server.MIT