Ui Annotator
No description available
Ask AI about Ui Annotator
Powered by Claude Β· Grounded in docs
I know everything about Ui Annotator. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
UI Annotator for Claude Code
Drop numbered pins on your running dev site, capture an annotated screenshot, and let Claude Code read and fix your UI issues β without leaving the terminal.

What is UI Annotator?
UI Annotator is a local developer tool that bridges visual UI feedback and AI-assisted code changes. It consists of two parts:
- A Chrome extension β activates an annotation overlay on any
localhosttab, lets you click to place numbered pins, type comments, and capture an annotated screenshot. - An MCP server β receives the screenshot and annotations from the extension and exposes a
get_ui_feedback()tool that Claude Code can call directly.
The result: you point at a bug, describe it, press a button, and Claude Code sees exactly what you see β no copy-pasting, no context loss.
Why developers love it
- Zero friction β no cloud services, no auth, no uploads. Everything runs locally.
- Works with any stack β React, Vue, Next.js, plain HTML, anything served on localhost.
- Structured feedback β Claude receives a screenshot and structured JSON (
selector,coordinates,comment) for each pin, so it can target the exact element. - MCP-native β plugs directly into Claude Code via the Model Context Protocol. No custom glue code needed.
- No build step β the Chrome extension is vanilla JS loaded directly from source.
Demo
- Open your local dev site in Chrome.
- Click the UI Annotator icon β annotation overlay activates.
- Click any element, type a comment, repeat for every issue.
- Click Send to Claude in the floating toolbar.
- In your terminal: "Check my UI feedback"
- Claude calls
get_ui_feedback(), sees the annotated screenshot, and fixes the code.
Developer β pins UI bug β captures screenshot β sends to MCP server
β
Claude Code β calls get_ui_feedback() β reads screenshot + annotations
β
Claude describes and fixes the issue
Prerequisites
- Node.js 18+
- Chrome (or any Chromium-based browser)
- Claude Code with MCP support (
claude mcpcommand available)
Installation
1. Clone and install
git clone https://github.com/your-username/ui-annotator.git
cd ui-annotator
npm install
2. Vendor html2canvas (one-time)
curl -L https://html2canvas.hertzen.com/dist/html2canvas.min.js \
-o packages/chrome-extension/lib/html2canvas.min.js
3. Connect to Claude Code
claude mcp add ui-annotator node /absolute/path/to/ui-annotator/packages/mcp-server/src/index.js
Then restart Claude Code and verify:
/mcp
# β ui-annotator β get_ui_feedback
Claude Code auto-starts the MCP server β no need to run
npm startmanually.
4. Load the Chrome extension
- Open
chrome://extensions - Enable Developer mode (top-right toggle)
- Click Load unpacked
- Select the
packages/chrome-extension/folder
The UI Annotator icon appears in your toolbar. Done.
Usage
- Navigate to your dev site on
localhostin Chrome. - Click the UI Annotator toolbar icon.
- Click Enable Pin Mode and click on any element to annotate it.
- Click Capture & Send when you're done.
- Ask Claude Code: "Review my UI feedback" or "Check my UI annotations".
Claude calls get_ui_feedback() and receives:
- A full-page screenshot with pins overlaid
- Structured annotations:
{ id, comment, x, y, selector }per pin
How it works (architecture)
Chrome Extension
ββ content.js β renders pins, captures screenshot via html2canvas
ββ background.js β POSTs payload to MCP server
MCP Server (Node.js, port 3847)
ββ httpBridge.js β Express: POST /feedback, GET /health
ββ store.js β holds latest FeedbackBatch in memory
ββ index.js β registers get_ui_feedback() MCP tool via stdio
Claude Code
ββ calls get_ui_feedback() β receives screenshot + annotations
For a full architecture diagram and developer notes, see CLAUDE.md.
Project structure
ui-annotator/
βββ packages/
β βββ mcp-server/ # Node.js MCP server + Express HTTP bridge
β β βββ src/
β β β βββ index.js # MCP entry, get_ui_feedback tool
β β β βββ httpBridge.js # POST /feedback receiver (port 3847)
β β β βββ store.js # In-memory FeedbackBatch store
β β βββ tests/
β β βββ server.test.js # 12 integration + unit tests
β βββ chrome-extension/ # Manifest V3 extension (no build step)
β βββ src/
β β βββ content.js # Annotation overlay and capture engine
β β βββ background.js # Service worker, POST to MCP server
β β βββ popup/ # Popup UI (HTML/CSS/JS)
β βββ lib/
β βββ html2canvas.min.js
βββ mcp-config.json # Ready-to-use MCP config snippet
βββ CLAUDE.md # Full developer + agent documentation
Running tests
npm test
# 12/12 passing β HTTP bridge integration + store unit tests
Tests use Node's built-in test runner. No extra setup required.
Configuration
| Environment variable | Default | Description |
|---|---|---|
PORT_BRIDGE | 3847 | Port the HTTP bridge listens on |
Known limitations
- Localhost only β the extension only runs on
http://localhost/*andhttp://127.0.0.1/*. Editmanifest.jsonto support remote dev servers. - Cross-origin iframes β html2canvas cannot capture content inside cross-origin iframes.
- One batch at a time β a new capture overwrites the previous one. No queue yet.
- Pin scroll drift β pins placed before scrolling may appear slightly offset in the screenshot.
Roadmap
- Remote dev server support (configurable allowed origins)
- Multi-batch queue (FIFO)
- Auto-highlight DOM elements after Claude reads feedback
- VS Code extension variant
- Pre-built extension in the Chrome Web Store
Contributing
Contributions are welcome! The codebase is intentionally minimal β vanilla JS, no bundler, no framework.
- Fork and clone the repo
npm install- Make your change
npm testβ all 12 tests must pass- Open a pull request
Please read CLAUDE.md before contributing β it contains the full architecture, coding conventions, and rules the AI agent follows.
Related projects
- Model Context Protocol β the open standard this tool is built on
- Claude Code β the AI coding assistant this tool integrates with
- html2canvas β the screenshot library used in the extension
License
MIT Β© 2026
