Screenshot Analyzer MCP
Analyzes app screenshots to identify UI/UX issues, compare designs with implementations, and provide actionable fixes using GPT-4o/GPT-5.2 vision capabilities. Supports single/batch analysis, design comparison, and automated report generation for iOS, Android, web, and desktop platforms.
README
Screenshot Analyzer MCP
AI-powered screenshot analysis for UI/UX issues using GPT-5.2
A Model Context Protocol (MCP) server that acts as "eyes" for AI coding assistants, analyzing app screenshots to identify UI/UX problems, compare designs with implementations, and provide actionable fixes.
Features
- Single/Multi Screenshot Analysis - Analyze 1-10 screenshots at once
- Batch Analysis - Process entire folders with automatic batching
- Design Comparison - Compare design mockups vs actual screenshots
- Fast Mode - Quick scans with gpt-4o-mini at lower cost
- Report History - Store and retrieve past analysis reports
- Concurrent Loading - Parallel URL fetching (10x faster)
- Auto Retry - Exponential backoff for rate limits
Requirements
- Python 3.10+
- OpenAI API key (with GPT-5.2 or GPT-4o access)
- Claude Code CLI (for MCP integration)
Installation
1. Clone the Repository
git clone https://github.com/YOUR_USERNAME/screenshot-mcp.git
cd screenshot-mcp
2. Install Dependencies
pip install mcp httpx pillow
Or with requirements.txt:
pip install -r requirements.txt
3. Add to Claude Code
Add to your global settings (~/.claude/settings.json):
{
"mcpServers": {
"screenshot-analyzer": {
"command": "python3",
"args": ["/path/to/screenshot-mcp/server.py"]
}
}
}
Or use Claude CLI:
claude mcp add screenshot-analyzer python3 /path/to/screenshot-mcp/server.py
4. Set Your API Key
In Claude Code, run:
Use set_api_key tool with your OpenAI API key
Or create config.json in the same directory:
{
"api_key": "sk-proj-your-api-key-here",
"default_reasoning_effort": "high"
}
Available Tools
| Tool | Description |
|---|---|
analyze_screenshots |
Analyze screenshots for UI/UX issues |
batch_analyze |
Batch analyze folder or multiple files |
compare_designs |
Compare design mockup vs implementation |
set_fast_mode |
Toggle fast/precise mode |
get_report_history |
List recent analysis reports |
get_report_by_id |
Retrieve a specific report |
get_last_report |
Get the most recent report |
set_api_key |
Configure OpenAI API key |
set_reasoning_effort |
Set reasoning level (none/low/medium/high/xhigh) |
get_config |
View current configuration |
Usage Examples
Basic Analysis
analyze_screenshots(
platform="ios",
image_paths=["/path/to/screenshot.png"],
app_description="E-commerce app for fashion retail"
)
Batch Analysis
batch_analyze(
platform="android",
folder_path="/path/to/screenshots",
batch_size=5,
generate_summary=True
)
Design Comparison
compare_designs(
design_path="/path/to/figma-export.png",
screenshot_path="/path/to/actual-screenshot.png",
platform="ios",
tolerance="normal" # strict | normal | relaxed
)
Fast Mode (Lower Cost)
# Enable fast mode (uses gpt-4o-mini)
set_fast_mode(enabled=True)
# Run analysis at ~80% lower cost
analyze_screenshots(platform="web", image_paths=[...])
# Disable for detailed analysis
set_fast_mode(enabled=False)
Output Format
Analysis Report
## Summary
[X critical, Y major, Z minor issues found]
## Critical Issues (Must Fix)
- [Location]: [Problem] → [Fix]
## Major Issues
- [Location]: [Problem] → [Fix]
## Minor Issues
- [Location]: [Problem] → [Fix]
## Suggestions
- [Enhancement idea]
Comparison Report
## Consistency Score: XX/100
## Critical Differences (Design Intent Broken)
- [Element]: Design [value] → Actual [value]
## Major Differences (Noticeable)
- [Element]: Design [value] → Actual [value]
## Minor Differences (Acceptable)
- [Element]: Design [value] → Actual [value]
Configuration Options
| Option | Default | Description |
|---|---|---|
api_key |
(required) | OpenAI API key |
default_model |
gpt-5.2 |
Model for analysis |
default_reasoning_effort |
high |
Reasoning level |
max_image_size |
1024 |
Max dimension in pixels |
jpeg_quality |
85 |
Compression quality |
fast_mode |
false |
Use faster/cheaper model |
fast_mode_model |
gpt-4o-mini |
Model for fast mode |
fast_mode_reasoning |
low |
Reasoning in fast mode |
Tolerance Levels (Design Comparison)
| Level | Description |
|---|---|
strict |
Flag all differences, even 1px variations |
normal |
Flag noticeable differences (2-4px, visible color mismatches) |
relaxed |
Only flag significant differences affecting UX |
Technical Details
- Uses OpenAI GPT-5.2 Responses API (
/v1/responses) - Automatic image compression (max 1024px, JPEG 85%)
- Concurrent URL loading with
asyncio.gather() - Exponential backoff retry (429/5xx errors)
- Report history cache (last 20 reports)
- Supports PNG, JPEG, GIF, WebP, BMP formats
- Auto-repair corrupted images (e.g., Android screencap with text header)
Platform Support
| Platform | Guidelines |
|---|---|
ios |
Human Interface Guidelines (HIG) |
android |
Material Design |
web |
WCAG, modern web standards |
desktop |
Platform-specific guidelines |
Troubleshooting
"API key not configured"
Run set_api_key tool or create config.json with your key.
"Request timed out"
- Reduce number of images per request
- Enable fast mode for quicker responses
- Use
batch_analyzefor many images
"429 Rate Limit"
The server automatically retries with exponential backoff. If persistent, wait a few minutes or upgrade your OpenAI plan.
Corrupted Images (Android screencap)
If your screenshots have text/warnings embedded at the beginning (common with Android adb exec-out screencap), the MCP will automatically repair them by finding the actual image data.
To prevent this in your capture scripts:
# Redirect stderr to suppress warnings
adb exec-out screencap -p 2>/dev/null > screenshot.png
# Or specify display ID explicitly
adb exec-out screencap -d 0 -p > screenshot.png
License
MIT License - see LICENSE file for details.
Contributing
Pull requests welcome! Please ensure:
- Code follows existing style
- Add tests for new features
- Update README for new tools
Made with Claude Code
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。