Skip to main content
Glama
s9hn

figma-to-markdown-mcp

by s9hn

figma-compaction-mcp

Languages: English | Korean

Current version: 3.0.2

figma-compaction-mcp is an MCP server for Figma-link workflows. It fetches upstream Figma design context internally, prunes it into compact plain-text context, and returns that reduced result to the calling agent instead of the full upstream payload.

What It Is

This project is for teams that want agents to work from Figma node URLs without pushing raw upstream Figma MCP output into the caller model context whenever the bridge can safely handle the request.

The intended flow is simple:

  1. A user gives an agent a Figma node URL.

  2. The agent calls get_figma_compact_context.

  3. This server fetches upstream Figma context internally.

  4. The server compacts the upstream result into a small line-based DSL.

  5. The agent receives compact implementation context and works from that output.

Related MCP server: figma-mcp-server

Why Use It

The main reason to use this server is token reduction without losing implementation-critical facts.

Raw Figma MCP responses can be large enough to consume a meaningful part of the caller model context before implementation even begins. This bridge keeps that upstream payload inside the server whenever possible, compacts it first, and only returns the reduced result to the agent.

  • Lower token usage for Figma-link prompts

  • Smaller model-context footprint before implementation starts

  • Cleaner implementation input for agents

  • Less raw upstream noise in caller context

  • Traceable output with node ids, typography tokens, asset refs, warnings, and fallback hints

  • A built-in fallback path when the bridge cannot safely complete

How It Works

This server sits between your agent and the local Figma Desktop MCP server.

User prompt with Figma link
  -> Agent calls get_figma_compact_context
  -> figma-compaction-mcp connects to local Figma Desktop MCP
  -> get_design_context / get_metadata
  -> internal compaction
  -> compact plain-text context returned to the agent

The public entrypoint is get_figma_compact_context.

  • figma_url: required full Figma node URL

  • mode: optional compaction mode, one of minimal, balanced, debug

  • task: optional intent hint, one of implement, inspect, summarize

  • include_assets: optional, default true

  • include_text_specs: optional, default true

  • include_trace_ids: optional, default true

  • include_metadata: optional, default true

  • max_output_chars: optional explicit output budget

When the bridge succeeds, it returns compact plain-text context plus structured fields for stats, traceability, warnings, and diagnostics. When the bridge cannot safely fetch or compact the node, it returns a fallback handoff so the agent can continue with standard Figma MCP tools directly.

Example compact output:

src|figma|get_design_context|4:5100|FILE_KEY
sum|Example screen|frame|375x876|535,258
el|4:5107|field_card|w343;layout:column;r20;p:16,20,20,20;bg:#ffffff
tx|4:5106|Section title|t1
ty|t1|Inter|600|20|24|#333333
as|imgAsset|asset|4:5107|asset_slot|/assets/example-image.png

Example URL shape:

https://www.figma.com/design/FILE_KEY/FILE_NAME?node-id=NODE_ID&m=dev

Requirements

To use the Figma-link bridge flow, you need:

  • Figma Desktop

  • Dev Mode enabled in Figma Desktop

  • Desktop MCP server enabled in Figma Desktop

  • Node.js 18+

Default upstream Figma MCP endpoint:

http://127.0.0.1:3845/mcp

Override with:

FIGMA_MCP_URL

Installation

Install globally:

npm install -g figma-compaction-mcp

Or run with npx:

npx figma-compaction-mcp

MCP Client Registration

Register this server in your MCP client.

Example using npx:

{
  "mcpServers": {
    "figma-compaction": {
      "command": "npx",
      "args": ["-y", "figma-compaction-mcp"]
    }
  }
}

Example using a global install:

{
  "mcpServers": {
    "figma-compaction": {
      "command": "figma-compaction-mcp",
      "args": []
    }
  }
}

Your client may use JSON, TOML, or another config format, but the command registration model is the same.

How To Use It

  1. Open Figma Desktop and enable Dev Mode and the desktop MCP server.

  2. Register figma-compaction-mcp in your MCP client.

  3. Give your agent a Figma node URL.

  4. Have the agent call get_figma_compact_context first.

  5. Use the returned compact context for implementation, inspection, or summarization.

  6. If the server returns a fallback handoff, continue with the standard Figma MCP tools for the same node.

In practice:

  • Small and medium components usually return compact context directly.

  • Large screens can still return larger output when the retained structure, text, and assets matter.

  • balanced mode is the default for normal implementation work.

  • Only set max_output_chars when you intentionally want a hard output budget.

Limitations

  • Final tool routing still depends on the MCP host or agent. This server can strongly guide usage, but it cannot forcibly override host-side routing.

  • When the bridge cannot safely complete a request, it returns a compact fallback handoff instead of passing raw upstream payloads through this server response.

  • Compaction is optimized for implementation relevance, so purely decorative wrappers and chrome-like nodes may be pruned outside inspect-oriented flows.

Other Information

Available Tools

1 tool
get_design_context_compactA

Call this first for a Figma node URL. It fetches upstream Figma get_design_context internally, removes raw React/Tailwind passthrough, and returns compact markdown with layout, text, asset, and implementation notes.

ParametersJSON Schema
NameRequiredDescriptionDefault
figma_urlYesFull Figma design URL including node-id query parameter, e.g. https://www.figma.com/design/FILE_KEY/Name?node-id=123-456
include_statsNoAppend markdown size statistics to the output

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It explains that the tool internally calls get_design_context and removes raw React/Tailwind passthrough, providing relevant behavioral context. However, it does not disclose potential side effects, permissions needed, or rate limits, which are not critical for a read-only like operation but could be improved.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that conveys purpose, behavior, and output format without extraneous words. It could be slightly more structured, but it is efficient and front-loaded with the key action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of output schema, the description does a good job summarizing the output as 'compact markdown' with specific content types. With 2 parameters and no nested objects, the description is sufficiently complete for this low-complexity tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description does not add extra meaning to the parameters beyond what the schema provides, but the schema descriptions are detailed enough. The description briefly mentions 'layout, text, asset, and implementation notes' which hints at output structure, but does not explain parameters specifically.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to be called first for a Figma node URL, fetching design context and returning compact markdown. It specifies the verb 'fetch' and resource 'Figma node URL', and distinguishes itself with a clear role as the initial call in a workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Call this first for a Figma node URL', establishing a clear usage precedence. However, it does not mention when not to use it or alternatives, which is acceptable given no sibling tools exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observedget_design_context_compact

TDQS

B3.3/5.0
Disambiguation1/5

Only one tool exists, so no disambiguation is needed, but the lack of additional tools means any other functionality would be ambiguous.

Naming Consistency3/5

Single tool name is descriptive and follows verb_noun pattern, scoring neutrally due to no other names to compare.

Tool Count2/5

One tool for a domain like Figma design is far too few; users would need many more operations (e.g., list files, get components).

Completeness1/5

The single tool only fetches design context; no tools for creating, updating, or managing Figma resources, leaving major gaps.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables developers to extract and organize Figma design files, including complete node data (tree structure and images) for AI understanding and code generation.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Transforms Figma design data into a compact, LLM-friendly format for code generation, reducing size by 99.5% while preserving UI-critical information.
    130
    5
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Converts Figma designs into structured code context with token-aware styling, enabling AI agents to generate production-level frontend code.
    1
    14
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/s9hn/figma-compaction-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server