Fidelity-first Figma MCP server for design context extraction and verification.
This branch resets the public MCP surface around the core job:
- extract design context from Figma
- inspect large selections safely
- fetch variable definitions and screenshots
- resolve Code Connect mappings
- verify semantic and visual parity
It does not expose agent queue, planning, category routers, or gRPC transport from the MCP surface.
dune build --root .passesdune build --root . @runtestpasses- startup scripts are worktree-safe and use
--root "$SCRIPT_DIR"when building
The server exposes exactly 8 tools:
figma_get_design_contextfigma_get_metadatafigma_get_variable_defsfigma_get_screenshotfigma_get_code_connect_mapfigma_whoamifigma_verify_semanticfigma_verify_visual
- Figma REST-backed context extraction
- optional desktop plugin bridge backend at
/plugin/connect,/plugin/poll,/plugin/result,/plugin/event,/plugin/status - semantic verification
- visual verification
- Code Connect lookup through local mapping files
- in-process agent queue
- planning/orchestration tools
- gRPC transport
- plugin-hosted code generation and mutation endpoints
If agent orchestration is needed, it should live outside this server and consume these MCP tools or the underlying OCaml libraries.
Figma Studio is a deferred design idea. The experimental MASC-specific relay and Studio Plugin have been withdrawn. The existing eight-tool MCP surface and general Plugin bridge remain available.
eval "$(opam env)"
opam install . --deps-only
dune build --root .
export FIGMA_TOKEN="YOUR_TOKEN"
export FIGMA_MCP_API_KEY="dev-only-key"
./start-figma-mcp.sh
./start-figma-mcp-http.sh --port 8940Example MCP client config:
{
"mcpServers": {
"figma": {
"type": "http",
"url": "http://127.0.0.1:8940/mcp",
"headers": {
"x-api-key": "dev-only-key"
}
}
}
}Build:
dune build --root .Run tests:
dune build --root . @runtestThe current environment may return Error: RPC server not running. for dune runtest --root .. Use the @runtest alias through dune build instead.
FIGMA_TOKENstill takes precedence over request-suppliedtokenvalues.- HTTP mode requires
FIGMA_MCP_API_KEYorMCP_API_KEY, unless--allow-no-authis set. - The
docs/directory still contains historical material from pre-v2 branches. TreatREADME.mdand thefigma://docs/*MCP resources as the authoritative surface for this branch.