UI Annotator MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**English** | 廣東話
**Bridge the gap between what you see and what AI can reference — in any browser, zero extensions.**
The only tool that puts visible labels on every web element. Hover any element, see its name. Tell your AI assistant "make the sidebar wider" — it knows exactly which element you mean. No screenshots, no CSS selectors, no miscommunication.
Why It Matters
Dramatically improves AI-driven UI design and iteration. The pain: telling AI "move that button next to the search bar" never works because the AI can't see your page. UI Annotator fixes this — hover over any element and its component name appears as a label. Now you say "move SearchButton below NavBar" and Claude edits the right component instantly. No browser extensions, works with any framework. The workflow becomes: open page → hover to identify elements → describe changes using real component names → Claude edits → refresh and repeat. Turns a frustrating back-and-forth into a fluid design loop.
The Problem
When reviewing a web UI with an AI coding assistant, the hardest part isn't the code change — it's **describing which element you want changed**.
> "That thing on the left... the second row... no, the one with the icon..."
You don't know what it's called. The AI doesn't know what you're pointing at. You waste time on miscommunication instead of shipping.
The Solution
Open your page through the annotator proxy. Hover any element — instantly see its name, CSS selector, and dimensions. Now you both speak the same language.
**That's it.** No browser extensions. No code changes. No setup. Works in Chrome, Firefox, Safari, Edge — any browser.
How It Works
The proxy fetches your page, injects a lightweight annotation script, and serves it back. The script scans the DOM, identifies named elements, and reports them to the MCP server. Your AI assistant queries the server to understand what's on the page.
Features
Hover Annotations
Hover any element to see:
- **Element name** (pink) — the human-readable identifier
- **CSS selector** (monospace) — the technical reference
- **Content preview** — what text the element contains
- **Dimensions** — width × height in pixels
Inspect Mode
Click the **Inspect** button in the toolbar (or let your AI toggle it). In inspect mode:
- Click any element → **copies its name to clipboard**
- All page interactions are paused (clicks don't trigger buttons/links)
- Click Inspect again to return to normal mode
Collapsible Toolbar
The toolbar sits at the top center of the page showing:
- Inspect toggle button
- Element count
- Helpful subtitle explaining what to do
- Collapse button (▲) to minimize when not needed
MCP Tools for AI
| Tool | What it does |
|---|---|
| annotate(url) | Returns proxy URL for user to open in any browser |
| get_elements() | Returns all detected UI elements with names, selectors, positions |
| highlight_element(name) | Flash-highlights a specific element so user can confirm |
| rescan_elements() | Force DOM rescan after page changes |
| inspect_mode(enabled) | Toggle inspect mode remotely |
Why Not Just Use DevTools?
| | Browser DevTools | UI Annotator |
|---|---|---|
| **Target user** | Frontend developers who know the DOM | Anyone — QA, PM, designer, junior dev |
| **Learning curve** | Need to understand DOM tree, CSS selectors, box model | Hover and read — zero learning |
| **Communication** | "The div.flex.gap-4 inside the second child of..." | "The sidebar" |