
ui-ticket-mcp
io.github.0ics-srls由 GitHub 账号 0ics-srls 发布v1.6.2更新于 Nov 7, 2026
Human-to-AI code review bridge. Review UI in the browser, AI agents fix code via MCP.
概览
本地桥接服务,让 AI 编程代理读取浏览器中的 UI 评审意见并修复对应源代码。
- 可以做什么
- 读取评审汇总、评审列表以及带元素标注的评审,含元素名称、CSS 选择器、DOM 路径和计算样式
- 获取按页面分组的待处理评审清单
- 创建评审与嵌套回复,解决、重新打开或批量解决评审
- 在项目中查找与页面 ID 匹配的源文件
- 返回将评审系统接入项目的安装指南
- 适用场景
- 当你在浏览器中评审网页界面,并希望 AI 编程代理接手你点选元素写下的意见、带着完整元素上下文去改代码时使用。适合评审者与代理共用同一份本地代码库的前端项目。
- 运行要求
- 以 Python 包形式通过 stdio 在本地运行(uvx 或 pip install)。需要设置 PROJECT_ROOT 指向被评审项目;REVIEW_PORT 可选,用于设置 REST API 端口(默认 3200)。浏览器面板来自 ui-ticket-panel npm 包或 CDN 脚本,并指向本地 API 地址。
安装
在 SourceWeft 中
- 打开 控制台中的 ui-ticket-mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ui-ticket-mcp
Human-to-AI code review bridge. Review UI prototypes directly in the browser, then let AI agents read your feedback and fix the code automatically.
You click on elements, write review comments like "This button should be blue" or "The spacing is wrong here", and your AI coding agent (Claude Code, Codex, Cursor, etc.) picks them up via MCP and resolves them - with full context about which element you pointed at, its CSS, position, and surrounding DOM.
How it works
One Python process handles everything - MCP protocol for the agent (stdio) and REST API for the browser UI (HTTP). Reviews are stored in a SQLite database inside your project.
Quick Start
1. Connect to your AI agent
Add to your project's .mcp.json (Claude Code, Codex, Cursor, etc.):
Restart the agent. uvx downloads and runs the package automatically - no manual install needed.
Alternative:
pip install ui-ticket-mcp, then use"command": "ui-ticket-mcp"instead ofuvx.
When the MCP server starts, it also launches a REST API on http://localhost:3200 (or your custom REVIEW_PORT) for the browser UI.
Important: The API always runs locally (
localhost). The websitehttps://uiticket.0ics.ai/is the landing page only — it is NOT an API endpoint. Always usehttp://localhost:{PORT}/apias theapi-url.
2. Add the browser UI to your app
In your app's entry file (e.g. main.ts, index.tsx):
Then in your root template:
That's it. Works in any framework - Angular, React, Vue, Svelte, or plain HTML. It's a standard Web Component. For SSR frameworks (Next.js, Nuxt, SvelteKit) see the Framework Examples section — you need a dynamic import on the client side.
No bundler? Use CDN
The bundle auto-registers the <review-panel> element. No npm install, no build step needed.
3. Start reviewing
Open your app in the browser. You'll see a floating chat button in the bottom-right corner. Click it to open the review panel, or press Alt+A to enter annotation mode and click directly on elements.
Browser UI Features
Review Panel
The floating panel lets you browse, filter, and manage all reviews:
- Filter tabs - Switch between Open, Resolved, and All reviews
- Search - Full-text search across all review comments
- Tag filter - Filter by category: general, bug, suggestion, question
- Per-review actions - Resolve, Reopen, Delete, Reply, Highlight element
- Threaded replies - Reply to reviews for back-and-forth discussion
- Manual review form - Write reviews without annotation (Ctrl+Enter to submit)
- Badge counter - Floating button shows count of open reviews
Annotation System
The annotation system lets you point at specific elements and attach reviews to them:
- Click-to-annotate - Press Alt+A (or the target button), then click any element
- Multi-select drag - Click and drag to select a region of multiple elements
- Hover preview - See element identification in real-time as you move the mouse
- Smart popup - Appears above or below the element depending on available space
When you annotate an element, the system captures rich metadata that helps the AI agent understand exactly what you're pointing at:
Marker Badges
Reviews with annotations show numbered badges on the page next to the annotated element:
- Single review - Circular badge with the review ID, colored red (open) or green (resolved)
- Stacked reviews (3+ on the same element) - Pill badge showing count, with a gradient showing open/resolved ratio
- Click badge - Opens the review in the panel
- Delete badge - Remove via the X button on hover
- Tooltip - Hover to see author, element name, and comment preview
Tags
Every review can be tagged with a category:
Keyboard Shortcuts
Architecture
- MCP (stdio) - Your agent framework starts it automatically. 10 tools for AI agents to read, resolve, and manage reviews.
- REST API (HTTP :3200) - Starts in background, serves the browser review UI. CORS enabled for all origins.
- SQLite (WAL mode) - Concurrent readers + 1 writer, 5s busy timeout. Database lives inside your project at
.reviews/reviews.db.
MCP Tools
10 tools available to AI agents:
get_review_summary()
Overview of all pages with review counts.
get_reviews(page_id?: str)
List review comments. Optionally filtered by page. Shows status, tag, element context, and reply chains.
get_annotated_reviews(page_id?: str)
Returns only reviews that have element annotation metadata. Includes element name, CSS selector, full DOM path, selected text, accessibility info - everything the agent needs to locate and understand the annotated element.
get_pending_work()
All open reviews grouped by page - the agent's "todo list".
add_review(page_id, author, text, tag?, metadata?, parent_id?)
Create a new review. Supports tags, annotation metadata (JSON), and threading via parent_id.
resolve_review(review_id, resolved_by?)
Mark a review as resolved. Sets resolved_at timestamp and resolved_by (defaults to "agent").
reopen_review(review_id)
Reopen a previously resolved review. Clears resolution info.
batch_resolve(page_id, resolved_by?)
Resolve all open reviews on a page at once. Returns Resolved 3 review(s) on user-profile.
find_source_file_tool(page_id)
Find source files in PROJECT_ROOT matching a page ID. Searches by kebab-case, CamelCase, and glob patterns. Skips node_modules, dist, .git.
get_setup_guide()
Returns the full setup guide (MCP config, REST API, browser UI). Useful when the agent needs to help set up the review system in a new project.
Typical agent workflow
REST API
All endpoints under /api. CORS enabled for all origins.
Reviews
Replies
POST body
PATCH body
Database
Reviews are stored in SQLite inside your project at {PROJECT_ROOT}/.reviews/reviews.db. The database is auto-created on first run.
The .reviews/ directory includes:
Path resolution:
REVIEW_DB_PATHenv var (explicit override)PROJECT_ROOT/.reviews/reviews.db(default)./reviews.db(fallback)
Schema
Annotation metadata (JSON)
When a review is created via annotation, the metadata field contains:
This metadata gives the AI agent precise context about what you annotated - which element, where it is, what it looks like, and how to find it in the DOM.
Web Component Attributes
Page identification
The panel needs to know which page the user is on, so it can show and file reviews for that specific page. There are two modes:
Automatic detection (recommended)
When no page-id attribute is set, the panel derives the page identifier from the URL pathname:
The panel also listens for SPA navigation events (pushState, replaceState, popstate) and automatically reloads reviews when the route changes. This means it works out of the box with client-side routing in React Router, Vue Router, Angular Router, Next.js, etc.
Explicit page ID
If you need to control the page ID yourself (e.g. your pages don't map cleanly to URL paths), set the page-id attribute:
Important: These two modes are mutually exclusive. When
page-idis set, auto-detection is completely disabled — the panel will NOT react to route changes. Do not combine both.
Programmatic API
Packages
Environment Variables
Framework Examples
With a bundler
In your entry file (e.g. main.ts, main.js):
Then in your HTML:
Plain HTML (no bundler / CDN)
React
Vue
Angular
Svelte
Next.js (SSR)
Web Components use window and HTMLElement which don't exist during server-side rendering. You must load the panel dynamically on the client side:
Then use it in your root layout:
Nuxt (SSR)
SvelteKit (SSR)
Issues & Feedback
Found a bug or have a feature request? Open an issue on this repository.
License
CC BY-NC 4.0 — free for study, research, and non-commercial use. See LICENSE for details.
Built by Šimon Cmar, Ladislav Sopko & Lorenzo Leoni
来源:README.md,提交 8492858
工具
0版本历史
3- v1.6.2最新Nov 7, 2026
- v1.6.1Sep 28, 2026
- v1.6.0Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。