Sponsored by Deepsite.site

Ui Annotator Mcp

Created By
mcpware2 days ago
MCP server that annotates any web page with hover labels for AI assistants. Reverse proxy injection — zero browser extensions, works in any browser. 5 tools: annotate, get_elements, highlight_element, rescan_elements, inspect_mode.
Overview

UI Annotator MCP

npm version license GitHub stars GitHub forks

English | 廣東話

See what every UI element is called — in any browser, zero extensions.

An MCP server that adds interactive hover annotations to any web page. Open a proxied URL, hover any element, see its name. Tell your AI assistant "make the sidebar wider" — it knows exactly what you mean.

Demo

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.

# Start the MCP server
npx @mcpware/ui-annotator

# Open in ANY browser
http://localhost:7077/localhost:3847

That's it. No browser extensions. No code changes. No setup. Works in Chrome, Firefox, Safari, Edge — any browser.

How It Works

Your app (localhost:3847)
┌─────────────────────┐
│  UI Annotator Proxy  │ ← Reverse proxy on port 7077
│  (MCP Server)        │
└─────────────────────┘
Proxied page with hover annotations injected
        ├──► User sees: hover overlay + tooltip with element names
        └──► AI sees: structured element data via MCP tools

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

ToolWhat 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 DevToolsUI Annotator
Target userFrontend developers who know the DOMAnyone — QA, PM, designer, junior dev
Learning curveNeed to understand DOM tree, CSS selectors, box modelHover and read — zero learning
Communication"The div.flex.gap-4 inside the second child of...""The sidebar"
LanguageCSS/HTML technical termsHuman-readable names
SetupTeach people to open DevTools + navigate the DOMOpen a URL
AI integrationNone — AI can't see what you're inspectingMCP — AI sees the same element names you do

DevTools is for debugging. UI Annotator is for communication — giving humans and AI a shared vocabulary for UI elements.

Why Not Use Existing Tools?

ToolApproachWhy we're different
MCP PointerChrome extension + MCP serverRequires Chrome extension. Click-to-inspect, no hover overlay.
Agentationnpm package embedded in your appRequires code changes. React 18+ dependency. Not zero-config.
Cursor Visual EditorBuilt-in IDE browserOnly works inside Cursor IDE.
Windsurf PreviewsBuilt-in IDE browserOnly works inside Windsurf IDE.
Chrome DevTools MCPProgrammatic DOM access for AIAI can inspect, but humans don't see visual annotations.
VisBugChrome extension for visual editingNo MCP integration. No AI connection. Chrome only.
Marker.io / BugHerdSaaS visual feedback widgetsNot MCP. Paid. For bug reporting, not AI-assisted development.

Feature Comparison

FeatureUI AnnotatorMCP PointerAgentationCursorChrome DevTools MCP
Visual hover annotationYesNoPartialYes (IDE only)No
Shows element namesYesYesYesNo (high-level)Programmatic
Shows dimensionsYesYesYes (Detailed)YesProgrammatic
MCP serverYesYesYesNoYes
Zero browser extensionsYesNoYesN/ANo
Zero code changesYesYesNoN/AYes
Any browserYesChrome onlyDesktop onlyCursor onlyChrome only
Zero dependenciesYesChrome extReact 18+CursorChrome
Click to copy element nameYesNoNoNoNo

Architecture

Zero external dependencies

  • Reverse proxy: Node.js built-in http module
  • MCP server: @modelcontextprotocol/sdk (stdio transport)
  • Communication: HTTP POST (browser → server) + GET polling (server → browser)
  • No WebSocket, no Express, no browser extension

How the proxy works

  1. User requests localhost:7077/localhost:3847
  2. Proxy fetches http://localhost:3847
  3. For HTML responses:
    • Injects fetch() / XMLHttpRequest interceptor (rewrites API paths through proxy)
    • Rewrites href="/..." and src="/..." attributes to route through proxy
    • Injects annotation script before </body>
  4. For non-HTML (CSS, JS, images): passes through directly
  5. Strips Content-Security-Policy headers to allow injected script

How annotation works

  1. Script scans DOM for elements with id, class, semantic roles, or interactive roles
  2. On hover: positions overlay border (follows border-radius) + positions tooltip (always within viewport)
  3. Reports all detected elements to server via POST /__annotator/elements
  4. Polls GET /__annotator/commands every second for server instructions (highlight, rescan, inspect toggle)
  5. MutationObserver auto-rescans when DOM changes

Quick Start

With Claude Code

# Add as MCP server
claude mcp add ui-annotator -- npx @mcpware/ui-annotator

# Then in conversation:
# "Annotate my app at localhost:3847"
# → AI returns proxy URL, you open it, hover elements, discuss changes by name

Manual

npx @mcpware/ui-annotator
# Proxy starts on http://localhost:7077
# Open http://localhost:7077/localhost:YOUR_PORT

Environment Variables

VariableDefaultDescription
UI_ANNOTATOR_PORT7077Port for the proxy server

More from @mcpware

ProjectWhat it doesInstall
PagecastRecord any browser page as GIF or video via MCPnpx @mcpware/pagecast
Claude Code OrganizerVisual dashboard for memories, skills, MCP servers, hooksnpx @mcpware/claude-code-organizer
Instagram MCP23 tools for the Instagram Graph APInpx @mcpware/instagram-mcp

License

MIT

Server Config

{
  "mcpServers": {
    "ui-annotator": {
      "command": "npx",
      "args": [
        "-y",
        "@mcpware/ui-annotator"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Playwright McpPlaywright MCP server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
CursorThe AI Code Editor
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.