Ui Annotator Mcp

io.github.mcpware由 GitHub 账号 mcpware 发布v0.1.6更新于 Oct 24, 2026

Annotates any web page with hover labels for AI assistants — zero extensions, any browser

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

本地 MCP 服务器,通过反向代理为网页元素加上可见标签,让助手和用户用同一套元素名称沟通。

可以做什么
  • 通过标注代理打开页面,获得可在任意浏览器中访问的代理地址
  • 列出检测到的界面元素及其名称、选择器和位置,并在页面变化后强制重新扫描
  • 闪烁高亮指定名称的元素,便于用户确认所指对象
  • 远程切换检查模式,开启后暂停页面交互并在点击时复制元素名称
  • 悬停时显示元素名称、CSS 选择器、内容预览和尺寸
适用场景
适合在与 AI 编程助手一起评审或迭代本地网页界面、难以说清要改哪个元素时使用。它让双方以组件名称沟通,而不是靠模糊描述或截图。
运行要求
以 Node.js 包形式通过 npx 在本地以 stdio 运行。被评审的网页需在本地端口可访问;代理默认监听 7077 端口,可用 UI_ANNOTATOR_PORT 修改。无需账号、密钥或浏览器扩展。
安装前请注意
代理会抓取并改写目标页面、注入脚本、重写链接与资源路径,并移除 Content-Security-Policy 响应头,因此只应对自己掌控的页面使用。页面元素数据会上报到本地服务器。检查模式开启期间页面交互会被暂停。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Ui Annotator Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

UI Annotator MCP

[npm version] [npm downloads] [license] [GitHub stars] [GitHub forks]

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.

[Demo]

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.

# Start the MCP servernpx @mcpware/ui-annotator
# Open in ANY browserhttp://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?

None of these do what UI Annotator does — live visual labels on every element via reverse proxy:

ToolApproachWhy we're different
browser-use (82K⭐)AI automation frameworkAutomates browsers, doesn't label elements for humans. Different use case entirely.
Chrome DevTools MCP (31K⭐)DOM snapshot + element UIDsAI can inspect, but humans don't see visual annotations. No shared vocabulary.
Playwright MCP (29K⭐)Accessibility tree snapshotReturns structured text, no visual overlay. Truncates important context.
OmniParserScreenshot + CV detectionScreenshot-based, not live DOM. ~40% accuracy on hard benchmarks.
MCP Pointer (526 users)Chrome extension + MCPRequires Chrome extension. Human clicks to select — no hover overlay.
Agentationnpm embedded in your appRequires code changes. React 18+ dependency. Not zero-config.
Vibe AnnotationsChrome extensionExtension-based, developer-only annotation workflow.

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

bash
# Add as MCP serverclaude 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

bash
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
Instagram MCP23 Instagram Graph API tools — posts, comments, DMs, stories, analyticsnpx @mcpware/instagram-mcp
Claude Code OrganizerVisual dashboard for Claude Code memories, skills, MCP servers, hooksnpx @mcpware/claude-code-organizer
PagecastRecord browser sessions as GIF or video via MCPnpx @mcpware/pagecast
LogoLoomAI logo design → SVG → full brand kit exportnpx @mcpware/logoloom

License

MIT

来源:README.md,提交 6b89c1c

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分