designer-mcp
Utilizes @babel/plugin-transform-react-jsx-source to attach _debugSource properties to React components, enabling source file and line number resolution in development environments.
Supports React source resolution in Next.js development mode via the _debugSource fiber property, enabling direct source file and line number identification from visual elements in Next.js applications.
Resolves React component source information by walking the React fiber chain to access _debugSource properties, enabling direct editing of React components from visual selections.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@designer-mcp Open my dashboard and let me pick the login button"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
designer-mcp
Cursor-style designer pen for Claude Code. Click, marquee, or draw on any webpage in a headed Chromium and Claude gets back the exact source file, line number, CSS selector, and a screenshot — ready to edit and verify.
What it does
Three modes of visual-to-source:
Mode | Interaction | Claude gets back |
element | Hover + click one element |
|
area | Drag a marquee |
|
draw | Freeform red pen, Enter to finish |
|
All screenshots are saved as PNG files in /tmp and returned as paths — your MCP client never hits a context limit on base64.
React source resolution works in Next.js dev mode via the _debugSource fiber property (attached by @babel/plugin-transform-react-jsx-source). Production builds strip this; see Production source mapping below.
Related MCP server: Browser Feedback MCP
Demo
You: "Make this button rounder"
Claude: [designer_open http://localhost:3000/dashboard]
Claude: [designer_pick mode=element]
You: *click the button*
Claude: → source: Button.tsx:42
Claude: [Edit Button.tsx add rounded-full]
Claude: [designer_screenshot selector=#cta-btn] ← after screenshot for verificationInstall
Prereqs: Node 18+, Claude Code, a working macOS/Linux (Playwright Chromium).
git clone https://github.com/YOUR_USER/designer-mcp.git
cd designer-mcp
npm install
npx playwright install chromium # one-time browser downloadRegister the MCP with Claude Code (user-scope = available in every session):
claude mcp add --scope user designer-mcp node "$(pwd)/index.js"Install the Claude skill so future sessions know the workflow:
mkdir -p ~/.claude/skills/designer
cp SKILL.md ~/.claude/skills/designer/SKILL.mdRestart Claude Code. You should see designer_* tools and a designer: skill in your session.
Usage
Start your Next.js dev server (for source mapping):
cd your-nextjs-app && npm run devThen, in Claude Code:
"Open http://localhost:3000/settings in the designer and let me pick the header."
Claude will call designer_open(...), then designer_pick({ mode: "element" }). Chromium pops to the front, your cursor becomes crosshairs, you click the header. Claude gets source.fileName + lineNumber and can edit directly.
Modes cheat sheet
Single element — use
elementMultiple related elements in one region — use
area(drag a box; returns every element whose center falls inside)Annotate / explain visually — use
draw(red pen, Enter to finish, Esc to cancel)
Production source mapping
_debugSource is dev-only. To use the picker on a production build, enable source maps in next.config.js:
module.exports = {
productionBrowserSourceMaps: true,
// ...
};The picker currently returns source: null in prod; a future version will resolve the selector through the deployed sourcemap. PRs welcome.
Tool reference
All tools are exposed over MCP; Claude Code sees them as mcp__designer-mcp__*.
designer_open(url: string)
Launch or reuse the headed Chromium instance and navigate. Foregrounds the window on macOS via bringToFront() + an AppleScript nudge.
designer_pick({ mode?: "element" | "area" | "draw" })
Activate the picker overlay. Returns when the user completes the interaction (or Esc cancels, or 180s timeout).
designer_screenshot({ selector?: string })
PNG of the page or a specific element. Returns { path, bytes }.
designer_close()
Tear down the browser and release Playwright resources.
How it works
A Playwright-controlled Chromium is launched headed. Singleton per process.
designer_pickinjects a small vanilla-JS overlay (picker.js) into the page. The overlay:element mode — tracks
mousemove/click, outlines the hover target in blue, resolves a unique-ish CSS selector, walks the React fiber chain for_debugSource, returns to the MCP.area mode — rubber-band marquee; on mouseup, any element whose center falls inside the box is collected (dedup by selector).
draw mode — full-viewport canvas overlay; captures strokes as point arrays; Enter finishes.
The server polls
window.__designerResultevery 200ms for up to 180 seconds.On completion, an appropriate screenshot (element / area clip / full viewport) is saved to
/tmpand the path returned.
Contributing
PRs welcome, especially around:
Production sourcemap resolution
Kestrel/React Native picker (currently web only)
Multi-element accumulation in element mode (Cmd-click to add)
VS Code "reveal in editor" integration
License
MIT
Available Tools
4 toolsdesigner_closeA
Close the designer browser and release resources.
Inputs: no named parameters.
designer_openA
Open a URL in the designer's headed Chromium (launches it if not running). Use this before designer_pick.
Inputs: url (required).
designer_pickA
Activate the picker in the designer browser. Three modes: element — user clicks one element; returns { selector, tag, classes, text, html, rect, source, screenshot_path } area — user drags a marquee; returns { rect, elements: [{selector, source, rect, ...}], screenshot_path } draw — user ink-annotates with a red pen, Enter to finish; returns { strokes, viewport, screenshot_path (strokes only), viewport_screenshot_path (full view with drawings) } Esc cancels in any mode. screenshot_path / viewport_screenshot_path point to PNGs in /tmp; open with the Read tool.
Inputs: mode.
designer_screenshotA
Screenshot the current page or a specific element selector. Returns { path, bytes } — a filesystem path to a PNG in /tmp that you can Read with the Read tool.
Inputs: selector.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: open launches the browser, pick activates the picker with specific modes, screenshot captures images, and close terminates the session. The descriptions clearly differentiate their functions, eliminating any ambiguity in tool selection.
All tool names follow a consistent 'designer_' prefix with descriptive action suffixes (open, pick, screenshot, close), using snake_case uniformly. This predictable pattern makes the tool set easy to navigate and understand at a glance.
With 4 tools, this server is well-scoped for its purpose of browser-based design interactions. Each tool earns its place by covering essential operations: launching, picking elements, capturing screenshots, and cleaning up, without being overly sparse or bloated.
The tool set provides complete lifecycle coverage for the designer domain: it supports opening the browser, interactive element selection, screenshot capture, and proper resource closure. There are no obvious gaps, as all core workflows from initiation to termination are addressed effectively.
Maintenance
Related MCP Connectors
Compare Figma designs against live websites and get visual + content QA reports, from inside Claude.
AI website builder: build, publish and edit websites from Claude, ChatGPT or Claude Code.
Client feedback pinned on live sites, Figma frames, PDFs, images and video, for Claude and agents.
Captured web interfaces, screenshots, flows and structured evidence for AI coding agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables visual annotation on web pages for Claude Code, allowing element selection, comment addition, screenshot capture, and structured UI feedback for code fixes via an MCP server.MIT
- AlicenseAqualityCmaintenanceEnables visual browser feedback collection directly into Claude Code. Users can point at elements in their browser and send annotated feedback that Claude can act on immediately.121MIT
- AlicenseAqualityDmaintenanceEnables DOM-aware visual annotation of web pages with drawing tools and element selection, submitting structured annotations to Claude Code via MCP for automated feedback processing.2MIT
- AlicenseNot gradedqualityAmaintenanceIt gives Claude Code a real browser so it can navigate, interact with, screenshot, and test web applications from the terminal. It also supports assertions, session recording, visual regression checks, and network/console monitoring.106 npmMIT