figma-to-markdown-mcp
Converts Figma to Markdown. Strips out visual noise to drastically reduce LLM token consumption.
README
figma-to-markdown-mcp
A compact markdown layer in front of Figma MCP for AI implementation workflows.
This MCP server accepts a Figma node URL, calls Figma Desktop MCP get_design_context internally, and returns compact markdown — stripping out raw React/Tailwind passthrough that inflates token cost without adding implementation value.
~45% token reduction on typical design context payloads (sample: 1,053 → 582 tokens).
How It Works
User → implementation request + Figma node URL
→ figma-to-markdown MCP
→ Figma Desktop MCP (get_design_context + get_metadata)
→ compact markdown
→ implementation agent
The compact output keeps what matters for implementation:
| Kept | Removed |
|---|---|
| Source metadata | Raw React/Tailwind passthrough |
| Node name, type, frame | Repetitive wrapper boilerplate |
| Layout and spacing spec | Verbose class attribute dumps |
| Text and typography facts | |
| Asset references | |
| Implementation notes |
Requirements
- Figma Desktop app running
- Dev Mode MCP enabled in Figma Desktop settings
- The document containing the requested node must be the active tab
- Node.js 18 or later
Installation
No install step required. Use npx and it runs on demand:
npx figma-to-markdown-mcp
Or install globally if you prefer:
npm install -g figma-to-markdown-mcp
Registration
Register the server in your MCP client's config file. The JSON format is the same across clients — only the file location differs.
Claude Desktop
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"figma-to-markdown": {
"command": "npx",
"args": ["-y", "figma-to-markdown-mcp"]
}
}
}
Claude Code
Config file: .claude/settings.json (project) or ~/.claude/settings.json (global)
{
"mcpServers": {
"figma-to-markdown": {
"command": "npx",
"args": ["-y", "figma-to-markdown-mcp"]
}
}
}
Cursor
Config file: .cursor/mcp.json
{
"mcpServers": {
"figma-to-markdown": {
"command": "npx",
"args": ["-y", "figma-to-markdown-mcp"]
}
}
}
Codex CLI
Config file: ~/.codex/config.toml (global) or .codex/config.toml (project)
[mcp_servers.figma-to-markdown]
command = "npx"
args = ["-y", "figma-to-markdown-mcp"]
Usage
Once registered, give your agent a Figma node URL and ask for an implementation.
Agent flow:
- User sends a Figma node URL with an implementation request.
- Agent calls
get_design_context_compactwith the URL. - This server fetches design context from Figma Desktop MCP internally.
- Raw output is compacted into markdown and returned.
- Agent implements from the compact markdown.
- Only if facts are missing should the agent fall back to raw Figma MCP tools.
Tool: get_design_context_compact
{
"figma_url": "https://www.figma.com/design/FILE_KEY/Name?node-id=123-456",
"include_stats": false
}
| Parameter | Type | Required | Description |
|---|---|---|---|
figma_url |
string | yes | Full Figma URL including node-id query parameter |
include_stats |
boolean | no | Append token size statistics to the output |
Example output:
# Figma Design Context
## Source
- provider: `figma-mcp`
- transformed-by: `figma-to-markdown`
- node-id: `123:456`
- file-key: `ExampleFileKey123`
- mode: compact implementation handoff
## Node Summary
- component: `BasicNavi`
- type: `instance`
- frame: `375 x 48`
## Compact Element Spec
- `basic navi` → flex, items center; bg `#f6f6f6 (neutral/100)`
- inner content row → flex, flex `1 0 0`, gap `8px`; px `10px`, py `4px`
## Text Spec
- text "Label" → font `Pretendard Regular`, size `19px`, line `24px`, color `neutral/900`
Notes
file-keyis extracted from the input URL for traceability.get_metadatais fetched in parallel as a supplement and will not fail the main request if unavailable.- When compaction confidence is low, the output includes a
## QA Flagssection. - Raw upstream code is omitted by default. Set
include_stats: trueto see payload size.
Version & License
- Current version: 1.0.2
- License: MIT
- Changelog
- Contributing
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.