Are you the author? Sign in to claim
๐ MCP server for real-time design collaboration in Figma. Push, pull, patch, export, inspect. Named after the pitch
MCP server for real-time design collaboration in Figma. Claude and humans work in the same canvas โ no export/import, no copy/paste.
"I've sold monorails to Brockway, Ogdenville, and North Haverbrook โ and by gum, it put them on the map!"
node --version)git clone https://github.com/anthropics/monorail-mcp.git
cd monorail-mcp
npm install && npm run build
cd figma-plugin
npm install && npm run build
cd ..
Add Monorail to your MCP client config. For Claude Desktop, edit claude_desktop_config.json:
{
"mcpServers": {
"monorail": {
"command": "node",
"args": ["/full/path/to/monorail-mcp/dist/src/index.js"]
}
}
}
Use the full absolute path. Restart your MCP client after adding the config.
monorail-mcp/figma-plugin/manifest.jsonThis is a one-time setup.
monorail_status to confirm# Create a deck from a brief
You: "Build a 6-slide deck for the Q1 review. Audience is the exec team."
Claude: [monorail_push โ slides appear in Figma]
# Edit in Figma, then sync
You: [move slides around, tweak text directly in Figma]
Claude: [monorail_pull โ sees your changes]
# Surgical updates
Claude: [monorail_patch โ updates specific text, preserves your formatting]
# Visual QA
Claude: [monorail_screenshot โ sees the rendered result, iterates]
The core loop: push > pull > patch > screenshot > repeat.
Monorail provides 14 tools organized into five categories.
| Tool | Description |
|---|---|
monorail_status | Check if the Figma plugin is connected via WebSocket |
The core collaboration loop. Push slides, pull state, patch elements.
| Tool | Description |
|---|---|
monorail_pull | Get deck state from Figma (full, summary, or single slide) |
monorail_push | Create or replace slides from IR specification |
monorail_patch | Edit, add, or delete elements by Figma node ID |
monorail_clone | Clone a slide and update text content (preserves styling) |
Inspect, export, and create visual content.
| Tool | Description |
|---|---|
monorail_screenshot | Export a slide as PNG (gives AI "eyes" to see renders) |
monorail_export | Export any node as SVG or PNG (vectors, components, icons) |
monorail_css | Extract CSS and raw paint data from a node |
monorail_primitives | Low-level design: frames, text, shapes, paths, arrows, gradients |
Explore the Figma document structure.
| Tool | Description |
|---|---|
monorail_find | Search for nodes by type and/or name |
monorail_component | Get component info, variant properties, siblings |
monorail_capture | Full node tree with design system tokens and template slots |
| Tool | Description |
|---|---|
monorail_delete | Delete slides by Figma node ID |
monorail_reorder | Reorder slides to match a specified order |
See docs/references/mcp-tools.md for parameters, examples, and workflow patterns.
Constrained slide templates. Constraints force clarity โ if content doesn't fit, edit the content.
| Archetype | Purpose | Key Constraints |
|---|---|---|
title | Opening, sections | Headline โค8 words |
section | Divider | Phrase โค5 words |
big-idea | Key insight, the turn | Headline โค12, subline โค20 |
bullets | Supporting points | 3 bullets max, โค10 words each |
two-column | Comparison, text+visual | 2 content blocks |
quote | Testimonial | Quote โค30 words + attribution |
chart | Data evidence | Headline + chart + takeaway |
timeline | Process, roadmap | 3-5 stages |
comparison | Options, before/after | 2-4 cols, 3-5 rows |
summary | Closing, next steps | 3 items max |
position-cards | 3-column cards with badges | Complex layout |
video | Video embed placeholder | Headline + URL + caption |
See docs/references/archetypes.md for full specifications.
Edit existing content (most common):
monorail_pull โ monorail_patch โ repeat
Bootstrap a new deck:
monorail_push (IR) โ monorail_pull (get IDs) โ monorail_patch (refine)
Clone with variations:
monorail_capture (structure + slots) โ monorail_clone (new content)
Visual QA:
monorail_push โ monorail_screenshot โ iterate
Design-to-code extraction:
monorail_find โ monorail_css โ monorail_export (SVG)
Custom slide layout (no archetypes):
monorail_primitives (frames, text, shapes, gradients)
Component exploration:
monorail_find (type: COMPONENT) โ monorail_component (variants)
Claude (MCP client) Figma Plugin
โ โ
โ monorail_push โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ Creates slides from IR
โ (WebSocket on port 9876) โ
โ โ
โ Human edits in Figma
โ โ
โ monorail_pull โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค Returns deck state + IDs
โ โ
โ monorail_patch โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ Surgical element updates
โ โ
โ monorail_screenshot โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโบโ Visual QA (AI "sees" it)
โ โ
โโโโโโโโโโโโโโ repeat โโโโโโโโโโโโโโโโโโโ
The MCP server communicates with Claude over stdio and with the Figma plugin over WebSocket. Both parties work in the same Figma document โ Claude proposes, human edits, Claude sees changes and adapts.
npm install
npm run build # Build once
npm run dev # Watch mode
npm run start # Run directly
cd figma-plugin
npm install
npm run build # Build once
npm run watch # Watch mode (hot reloads in Figma)
monorail-mcp/
โโโ src/index.ts # MCP server (WebSocket + 14 tools)
โโโ shared/types.ts # Shared TypeScript types
โโโ figma-plugin/
โ โโโ code.ts # Plugin logic (Figma API calls)
โ โโโ ui.html # Plugin UI (WebSocket client)
โ โโโ manifest.json # Figma plugin manifest
โ โโโ src/ # Extracted modules
โโโ docs/
โ โโโ ARCHITECTURE.md # System design
โ โโโ SKILL.md # Narrative thinking toolkit
โ โโโ PLUGIN-SPEC.md # IR format specification
โ โโโ HANDOFF.md # Team onboarding guide
โ โโโ failures.md # Learnings log (API quirks, gotchas)
โ โโโ decisions/ # Architecture Decision Records
โ โโโ references/ # Tool docs, archetypes, design system
โ โโโ discovery/ # Research and exploration notes
โโโ examples/ # Demo decks and test briefs
โโโ PLAN.md # Project roadmap and session logs
| Doc | Purpose |
|---|---|
| ARCHITECTURE.md | System design and component overview |
| SKILL.md | Narrative thinking toolkit for Claude |
| PLUGIN-SPEC.md | IR format for slides |
| HANDOFF.md | Team onboarding guide |
| mcp-tools.md | Full tool reference with parameters and examples |
| archetypes.md | Slide template specifications |
| failures.md | Learnings and gotchas |
Multiple MCP processes may be running โ only one can bind port 9876.
ps aux | grep monorail # Find rogue processes
kill <PID> # Kill the extra one
Your MCP client will restart its process automatically.
The plugin uses Auto Layout containers. If you see overlap:
monorail_push with mode: "replace" to recreateMonorail tries fonts in order: Supply > Inter > SF Pro > Helvetica > Arial. Missing fonts fall back gracefully but may look different.
Monorail uses port 9876.
lsof -i :9876 # See what's using it
MIT. See LICENSE.
Named after The Simpsons' "Marge vs. the Monorail" โ Lyle Lanley's pitch is a masterclass in narrative structure. The argument lands so hard it sells Springfield a monorail. The irony is intentional: we build a tool to make pitches land, named after a pitch that landed too well.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows