@neur0tx/fig-mcp-server
v0.0.5
Published
MCP server for reading local Figma .fig files from mockups/
Downloads
246
Readme
@neur0tx/fig-mcp-server
Local MCP server that reads Figma .fig archives from mockups/ and exposes them as MCP resources plus extraction tools.
Features
- Stdio MCP server (
node index.js) - Auto-discovers every
*.figfile inmockups/ - Exposes each file as a resource URI:
fig://<fileName>.fig - Resource reads return full structured JSON context:
- metadata, node tree, components/component sets, styles, variables, image manifest, indexes
Usage
Put your *.fig files into a local directory (for example mockups/) and configure Codex to run this MCP.
Codex Configuration
Add this MCP server to ~/.codex/config.toml (replace /path/to/mockups with your directory):
[mcp_servers.fig_mcp]
command = "npx"
args = [
"-y",
"@neur0tx/fig-mcp-server@latest",
"--mockups-dir",
"/path/to/mockups"
]Mockups directory
Can be anything that's accessible by MCP server (it's probably running inside sandbox). Put all .fig files under that directory:
mockups/Example:
mockups/mockup.fig
mockups/settings-screen.figServer should be pointed to the mockups directory just like in the Codex config above. The parameter itself works like this:
--mockups-dir <path>: explicit directory with.figfiles.- If set and invalid/unreadable, server exits immediately with an error.
- If set and valid/readable, server uses it even if empty.
- If not set, server resolves directory automatically:
<script_dir>/mockupsis used only when it is non-empty (ignoring.gitkeep).- Otherwise it tries
<cwd>/mockups.
It's not necessary to restart the server after adding a new file.
Notes and limitations
This is essentially a glorified .fig-file parser and it's mostly vibe-coded too. Information about some of the mockup
contents is best-effort and may be partially inaccurate or incomplete. Notable examples of that:
download_figma_imagesandget_screenshotprefer archiveimageRefbytes when available. If they're missing, the server performs a best-effort node render fallback via third-party renderer which may produce borked screenshots or use incorrect font typefaces.- For opaque binary payloads, this implementation returns metadata and warnings unless payload is JSON-compatible.
- Component libraries / UI Kits won't be available, only the data from source files will be.
In other words, your mileage may vary. My experience shows that this MCP provides enough data for the agent to construct something
that looks like the mockup itself but not quite the same. Don't hesitate to just screenshot things from Figma itself because
official Figma MCP does that too (they also have get_screenshot tool).
