browser-devtools-mcp
БесплатноБез исполняемых скриптовНе проверенChrome DevTools and browser automation through MCP for live UI work: screenshots, DOM and computed-style inspection, screenshot-to-code, design token…
от Ormus-Solutions★ 128 звёзд на GitHubОб этом скилле
Browser DevTools MCP Integration
Leverage browser automation and DevTools through MCP (Model Context Protocol) for live UI inspection, screenshot-to-code workflows, and visual debugging. This skill enables direct observation and manipulation of running interfaces.
When to Use This Skill
- Capturing screenshots of live UIs for analysis
- Inspecting CSS and computed styles programmatically
- Implementing screenshot-to-code workflows
- Debugging layout issues with visual feedback
- Extracting design tokens from existing sites
- Automating visual regression testing
- Building live preview workflows
MCP Architecture Overview
What is MCP?
Model Context Protocol (MCP) is Anthropic's standard for connecting LLMs to external tools. It provides:
- Standardized tool interface - Consistent way to expose capabilities
- Bidirectional communication - Tools can query the model
- Stateful sessions - Maintain context across interactions
- Permission boundaries - Control what tools can do
Browser MCP Landscape
+-------------------+ +-------------------+ +-------------------+
| Playwright MCP | | Puppeteer MCP | | Chrome DevTools |
| (Full browser) | | (Headless) | | Protocol (CDP) |
+-------------------+ +-------------------+ +-------------------+
| | |
+-----------+-------------+-----------+-------------+
| |
+------v------+ +------v------+
| Screenshot | | Element |
| Capture | | Inspection |
+-------------+ +-------------+
| |
+------v------+ +------v------+
| Visual | | Style |
| Comparison | | Extraction |
+-------------+ +-------------+
Core MCP Tools for UI Work
Available Browser MCP Tools
When using Playwright MCP (common in Claude Code):
// Navigation and page control
mcp__playwright__browser_navigate({ url: string })
mcp__playwright__browser_navigate_back()
mcp__playwright__browser_close()
mcp__playwright__browser_resize({ width: number, height: number })
// Screenshots and visual capture
mcp__playwright__browser_take_screenshot({
filename?: string,
fullPage?: boolean,
type?: "png" | "jpeg",
element?: string, // Human-readable description
ref?: string // Element reference from snapshot
})
// Accessibility snapshots (better than screenshots for structure)
mcp__playwright__browser_snapshot({
filename?: string // Optional: save to file
})
// Interactions
mcp__playwright__browser_click({ element: string, ref: string })
mcp__playwright__browser_type({ element: string, ref: string, text: string })
mcp__playwright__browser_hover({ element: string, ref: string })
// Form handling
mcp__playwright__browser_fill_form({ fields: FormField[] })
// Evaluation
mcp__playwright__browser_evaluate({ function: string, element?: string, ref?: string })
// Tab management
mcp__playwright__browser_tabs({ action: "list" | "new" | "close" | "select" })
Screenshot-to-Code Workflows
Workflow 1: Direct Screenshot Analysis
Capture and analyze a live UI for recreation:
class ScreenshotToCodeWorkflow:
"""
Convert a screenshot of a UI into working code.
"""
async def capture_and_analyze(self, url: str) -> CodeOutput:
# Step 1: Navigate to target
await mcp.browser_navigate(url=url)
# Step 2: Wait for full render
await mcp.browser_wait_for(time=2)
# Step 3: Take high-quality screenshot
screenshot = await mcp.browser_take_screenshot(
filename="capture.png",
fullPage=False,
type="png"
)
# Step 4: Get accessibility snapshot for structure
snapshot = await mcp.browser_snapshot()
# Step 5: Analyze with vision + structure
analysis = await self.analyze_screenshot(screenshot, snapshot)
# Step 6: Generate code
code = await self.generate_code(analysis)
return code
async def analyze_screenshot(self, screenshot: str, snapshot: str) -> UIAnalysis:
"""
Combine visual and structural analysis.
"""
prompt = f"""
Analyze this UI screenshot and accessibility snapshot.
## Accessibility Snapshot (Structure)
{snapshot}
## Analysis Tasks
1. **Layout Structure**
- Identify major sections (header, sidebar, main, footer)
- Determine grid/flexbox patterns
- Note responsive breakpoint hints
2. **Visual Elements**
- Extract color palette (background, text, accent)
- Identify typography (font family, sizes, weight
Установить browser-devtools-mcp в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл browser-devtools-mcp?
Chrome DevTools and browser automation through MCP for live UI work: screenshots, DOM and computed-style inspection, screenshot-to-code, design token extraction, Lighthouse and accessibility audits, and visual regression checks. Use when Claude should look at a running interface instead of guessing from code.
Как установить скилл browser-devtools-mcp?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл browser-devtools-mcp запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic