
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
概览
本地 MCP 服务器,通过反向代理为网页元素加上可见标签,让助手和用户用同一套元素名称沟通。
- 可以做什么
- 通过标注代理打开页面,获得可在任意浏览器中访问的代理地址
- 列出检测到的界面元素及其名称、选择器和位置,并在页面变化后强制重新扫描
- 闪烁高亮指定名称的元素,便于用户确认所指对象
- 远程切换检查模式,开启后暂停页面交互并在点击时复制元素名称
- 悬停时显示元素名称、CSS 选择器、内容预览和尺寸
- 适用场景
- 适合在与 AI 编程助手一起评审或迭代本地网页界面、难以说清要改哪个元素时使用。它让双方以组件名称沟通,而不是靠模糊描述或截图。
- 运行要求
- 以 Node.js 包形式通过 npx 在本地以 stdio 运行。被评审的网页需在本地端口可访问;代理默认监听 7077 端口,可用 UI_ANNOTATOR_PORT 修改。无需账号、密钥或浏览器扩展。
安装
在 SourceWeft 中
- 打开 控制台中的 Ui Annotator Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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.
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
Why Not Just Use DevTools?
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:
Feature Comparison
Architecture
Zero external dependencies
- Reverse proxy: Node.js built-in
httpmodule - 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
- User requests
localhost:7077/localhost:3847 - Proxy fetches
http://localhost:3847 - For HTML responses:
- Injects
fetch()/XMLHttpRequestinterceptor (rewrites API paths through proxy) - Rewrites
href="/..."andsrc="/..."attributes to route through proxy - Injects annotation script before
</body>
- Injects
- For non-HTML (CSS, JS, images): passes through directly
- Strips
Content-Security-Policyheaders to allow injected script
How annotation works
- Script scans DOM for elements with
id,class, semantic roles, or interactive roles - On hover: positions overlay border (follows
border-radius) + positions tooltip (always within viewport) - Reports all detected elements to server via
POST /__annotator/elements - Polls
GET /__annotator/commandsevery second for server instructions (highlight, rescan, inspect toggle) MutationObserverauto-rescans when DOM changes
Quick Start
With Claude Code
Manual
Environment Variables
More from @mcpware
License
MIT
来源:README.md,提交 6b89c1c
工具
0版本历史
1- v0.1.6最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分