Design Analysis MCP Server
Reverse-engineers design videos and images into structured frontend implementation specifications using vision LLMs and FFMPEG for frame-level analysis.
README
Design Analysis MCP Server
An MCP server that reverse-engineers design videos and images into structured frontend implementation specifications. Uses vision LLMs (OpenAI, Anthropic, Gemini) and FFMPEG for frame-level analysis.
Features
11 MCP tools organized into three tiers:
| Tool | Purpose |
|---|---|
analyze_design |
Full orchestration — runs all layers + writes files |
analyze_layout |
Grid, spacing, composition, hierarchy (no colors/animations) |
analyze_typography |
Fonts, type scale, text animations (per-character, stagger) |
analyze_scroll |
Scroll segments, parallax, sticky detection (video only) |
reverse_engineer_animation |
Multi-pass: burst-frame capture → find animations → crop + deep-dive |
reverse_engineer_component |
Single component with layout hypotheses + alternatives |
design_uniqueness |
"30-second test" — what makes this distinctive? |
compare_designs |
Side-by-side across layout, typography, animation, accessibility |
critique_design |
Engineering-focused critique with actionable improvements |
generate_implementation_spec |
Complete spec: component tree, tokens, states, a11y |
extract_assets |
Catalog all visual assets (icons, gradients, palette) |
Architecture
┌─────────────┐
│ MCP Client │ (Claude Code, etc.)
└──────┬──────┘
│ stdio JSON-RPC
┌──────┴──────┐
│ index.ts │ Entry point, registers 11 tools
└──────┬──────┘
│
┌────────────┼────────────┐
│ │ │
┌─────┴─────┐ ┌───┴───┐ ┌─────┴─────┐
│ Tools │ │Vision │ │Analyzers │
│ │ │Client │ │ │
│ analyze_* │ │ │ │ │ video_to_ │
│ reverse_* │ │ ├──Anthropic │ frames │
│ compare_* │ │ ├──OpenAI │ detect_ │
│ critique_ │ │ └──Gemini │ scroll_ │
│ generate_ │ │ │ segments │
│ extract_ │ │ │ images_ │
│ design_ │ │ │ to_pdf │
│ uniqueness│ │ │ analyze_* │
└───────────┘ └────────┘ └───────────┘
Layered analysis
The orchestrator (analyze_design) runs layers independently to avoid mode confusion:
- Layout — grid system, spacing principles, visual hierarchy
- Typography — font categories, type scale, text animation details
- Scroll — PSNR-based pixel-shift detection between frames
- Motion — multi-pass: find animations → crop region → deep-dive
- Uniqueness — "30-second test": what would a designer remember?
Confidence scoring
Every estimate includes confidence: number (0–1) and alternatives: string[] so downstream LLMs can distinguish reliable findings from speculation. Estimates describing what the model can see (movement direction, opacity change) get higher confidence than inferred values (exact CSS properties, easing curves, font names).
Multi-pass animation analysis
- Burst capture — 15 FPS for first 3 seconds (captures fast discrete animations like slot-machine effects at 400–800ms)
- Pass 1 — find all animations + estimate screen regions
- Pass 2 — crop each region and deep-dive with a focused prompt
File-based output
analyze_design writes results to analysis/{name}/:
| File | Contents |
|---|---|
summary.md |
Most memorable elements, confidence report |
layout.md |
Grid, spacing, composition |
typography.md |
Fonts, type scale, text animations |
motion.md |
Animation details |
interaction.md |
Design uniqueness output |
implementation.md |
Design tokens, component specs |
Setup
Prerequisites
- Node.js 22+
- FFMPEG (for video frame extraction, scroll detection)
- At least one API key: OpenAI, Anthropic, or Gemini
Install
git clone <repo>
cd design-analysis-mcp-server
npm install
Configure
Copy .env.example to .env and set at least one API key:
cp .env.example .env
# Edit .env with your API keys
Optionally edit config.yaml to change model priority, frame extraction settings, or output directories.
Build
npm run build
Add to Claude Code
In your ~/.opencode.jsonc:
{
"mcpServers": {
"design-analysis": {
"command": "node",
"args": ["/path/to/design-analysis-mcp-server/build/index.js"],
"env": {
"OPENAI_API_KEY": "sk-...",
"ANTHROPIC_API_KEY": "sk-ant-...",
"GEMINI_API_KEY": "AIza..."
}
}
}
}
Usage Examples
# Full analysis of a design video
analyze_design path=/path/to/demo.mp4 name=demo-v1
# Analyze only layout
analyze_layout path=/path/to/screenshot.png
# Reverse-engineer a specific component
reverse_engineer_component path=/path/to/screen.mp4 element_description="hero section with CTA button"
# Multi-pass animation deep-dive
reverse_engineer_animation path=/path/to/demo.mp4 region={x:100,y:200,width:300,height:400}
# Compare two designs
compare_designs referenceA={path:/path/to/v1.mp4,type:video} referenceB={path:/path/to/v2.mp4,type:video}
# Generate implementation spec
generate_implementation_spec path=/path/to/demo.mp4
# 30-second test for design uniqueness
design_uniqueness path=/path/to/demo.mp4
Configuration Reference
| Config key | Default | Description |
|---|---|---|
models |
[{openai}, {anthropic}, {gemini}] |
Model priority list; fallback on error |
ffmpeg.frame_interval_sec |
1.0 |
Standard mode frame interval |
ffmpeg.frame_quality |
2 |
PNG quality (2–31, lower = better) |
ffmpeg.scene_threshold |
0.3 |
PSNR threshold for scene detection |
analysis.max_frames_per_video |
200 |
Max frames in any extraction mode |
analysis.max_pdf_pages |
50 |
Max pages in generated PDFs |
analysis.scroll_detection_window |
5 |
Frames to merge when detecting scroll |
Prompt Philosophy
All analyzer prompts follow a principle-first structure:
- What principle does this follow? (high confidence — directly observable)
- What mechanism could produce this? (medium confidence — alternatives listed)
- What are the estimated values? (low confidence — clearly labeled)
Prompts instruct models to say "uncertain" rather than guess wrong, and to list alternative mechanisms when confidence < 0.8.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。