figma-antigravity-mcp
Provides integration with Figma Remote MCP, enabling AI agents to read and write Figma designs, create frames, modify styles, build components, and run Figma Plugin API scripts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@figma-antigravity-mcp Create a new frame called 'Button' with a blue fill."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Antigravity x Figma Remote MCP
A lightweight, zero-dependency MCP adapter that bridges Google Antigravity IDE (and any MCP client) to Figma Remote MCP (https://mcp.figma.com/mcp) with native canvas write capabilities and 1-click browser OAuth.
What It Does
Bypasses Figma Client Whitelist: Enables Antigravity IDE to connect without the
OAuth app with client id ... doesn't existerror.Unlocks Full Canvas Write Access: Allows agents to create frames, modify styles, build components, and run Figma Plugin API scripts live via
use_figma.1-Click Browser Login: Launches your default browser for authorization; no manual terminal tokens needed.
Document Awareness: Automatically detects open Figma files to prevent accidental file creation.
Related MCP server: TalkToFigma
Requirements
Node.js >= 18.0.0
Installation & Setup
Option 1: One-Line Installer (Recommended)
Run in PowerShell:
irm https://raw.githubusercontent.com/Gawasna/figma-antigravity-mcp/main/install.ps1 | iexThe script downloads distribution files to ~/.antigravity-figma-mcp and automatically configures your Antigravity IDE mcp_config.json.
Option 2: Pre-built Release Asset
Download the latest
figma-antigravity-mcp-*.zipfrom GitHub Releases.Extract it to any preferred directory.
Add the server entry to your
mcp_config.json(~/.gemini/config/mcp_config.jsonon Antigravity IDE):
{
"mcpServers": {
"figma-remote": {
"command": "node",
"args": [
"C:/path/to/extracted/dist/index.js"
]
}
}
}Development: Customizing & Building from Source
If you want to modify the source code or extend tool behaviors:
Clone the repository:
git clone https://github.com/Gawasna/figma-antigravity-mcp.git cd figma-antigravity-mcpEdit source code under
src/.Package changes into
dist/:npm run buildRun automated test suite:
npm test
How to Authorize
Simply ask your agent in Antigravity IDE:
"Connect to my Figma account"
The agent will launch your default browser to approve access. Once approved, you are ready to read and write Figma designs directly from the IDE.
Alternatively, authenticate via CLI:
node dist/index.js --loginExposed Tools
This adapter exposes 39 tools to your AI agent:
1 Local Awareness Tool (
figma_get_current_context) to inspect open documents in Figma desktop.38 Upstream Figma Tools covering native canvas mutation (
use_figma), design inspection (get_design_context), Code Connect, FigJam diagrams, video export, shaders, and Weave workflows.
See TOOLS.md for full tool list and documentation.
Available Tools
13 toolscreate_new_fileA
Do what: Creates a new blank Figma design, FigJam, or Slides file in the user's drafts (or a specified project). Expected output: { fileKey (string), url (string) } — the new file's key and direct URL. IMPORTANT: Requires planKey from whoami. Do NOT call if the user already has a file open — use use_figma instead.
Inputs: planKey (required), fileName (required), editorType (required), projectId.
download_assetsA
Do what: Downloads rendered exports and raw source images/SVGs for a single node. Expected output: { export: { url, format }, rawImages: [{ url, format }], svgAssets: [{ url }] }. Use when: you need the rendered PNG/SVG/PDF of a node, or want to extract embedded raster fills for cross-file transfer.
Inputs: nodeId (required), fileKey (required), defaultScale, defaultFormat.
figma_auth_loginA
LOCAL TOOL — Starts interactive one-click OAuth authorization with Figma. Do what: Launches the user's default browser automatically to approve Figma Remote MCP connection, and returns a clickable Markdown URL directly in the chat interface. Expected output: JSON containing { auth_url, markdown_link, instructions } so the user can click directly or let the opened browser complete login. Use this whenever authentication is missing, expired, or when the user wants to connect their Figma account.
Inputs: no named parameters.
figma_auth_statusA
LOCAL TOOL — Checks current Figma authentication status. Do what: Inspects active access tokens, user seat, expiry time, and secure storage location. Expected output: JSON containing { authenticated, user, email, expires_at, is_expired, storage_path }.
Inputs: no named parameters.
figma_get_current_contextA
LOCAL TOOL — Call this FIRST before any other Figma tool when the user has not explicitly provided a Figma URL or fileKey. Do what: Detects which Figma file the user currently has open in Figma desktop app, returning fileKey, nodeId, and instructions. Expected output: JSON with { authentication, figma_desktop_open_file: { fileKey, fileName, nodeId, url }, instructions[] }.
Inputs: no named parameters.
generate_diagramB
Do what: Creates a flowchart, sequence diagram, state diagram, gantt chart, or ER diagram in FigJam from Mermaid.js syntax. Expected output: { url (string) } — direct URL to the created FigJam diagram. MUST show this URL as a markdown link.
Inputs: name (required), mermaidSyntax (required), fileKey, planKey, +1 more.
get_design_contextA
Do what: Primary READ tool for design-to-code. Returns layout, styles, component props, reference code snippet, screenshot, and asset URLs for a node. Expected output: { code (string), screenshot (URL), assets (map of download URLs), metadata }. Always prefer this over get_metadata for design inspection. Call figma_get_current_context first if you do not know the fileKey. IMPORTANT: nodeId is REQUIRED — extract from URL ?node-id=1-2 as "1:2". Never guess or pass empty.
Inputs: nodeId (required), fileKey (required), forceCode, clientLanguages, +3 more.
get_metadataA
Do what: Returns XML document outline for a Figma design file — node IDs, layer names, types, positions, sizes. Expected output: XML string of the document tree rooted at nodeId (or list of pages when nodeId is omitted). Use this to explore unfamiliar files before calling get_design_context. Prefer get_design_context for design-to-code. IMPORTANT: Only works on /design/ files. When nodeId is omitted, lists top-level pages only.
Inputs: fileKey (required), nodeId.
get_screenshotC
Do what: Renders a PNG screenshot of any node and returns a short-lived CDN URL + curl download command. Expected output: { url (string CDN URL), curl (string), metadata: { width, height, original_width, original_height } }. IMPORTANT: Both fileKey and nodeId are REQUIRED.
Inputs: nodeId (required), fileKey (required), contentsOnly, maxDimension, +1 more.
get_variable_defsA
Do what: Returns all design variables (tokens) referenced by a node — colors, spacing, typography values with their names and resolved values. Expected output: Map of variable names to resolved values e.g. { "p1-orange": "#ED9E4A" }. Use to extract the design system token palette before writing code or creating new nodes.
Inputs: nodeId (required), fileKey (required).
upload_assetsA
Do what: Uploads images (PNG, JPG, GIF, WebP) or SVGs into a Figma file. Returns single-use upload URLs. POST raw bytes to each returned URL. Expected output: { uploads: [{ uploadUrl, targetNodeId?, commitUrl? }] }.
Inputs: fileKey (required), count, nodeIds, scaleMode, +1 more.
use_figmaA
Do what: PRIMARY WRITE TOOL. Executes arbitrary JavaScript against the Figma Plugin API sandbox to create, edit, delete, or query any design element. Expected output: Return value of the executed code (JSON-serializable). Mutations are applied live to the Figma canvas. CRITICAL RULES:
Parameters: fileKey (required), code (required JS string), description (required human-readable intent).
code has access to the global
figmaobject (Figma Plugin API).MUST use
await figma.setCurrentPageAsync(page)to switch pages.NEVER use: loadAllPagesAsync, setPluginData, createImageAsync.
Font style for Inter: "Semi Bold" (not "SemiBold"), "Extra Bold" (not "ExtraBold").
Inputs: code (required), fileKey (required), description (required), skillNames.
whoamiA
Do what: Returns the authenticated user identity (handle, email), all plans/teams, and available seats. Expected output: { handle, email, plans: [{ name, key, role, seat }] }. MUST call this if experiencing permission errors or before calling create_new_file to resolve planKey.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools target clearly distinct actions—auth, context detection, reading, exporting, uploading, writing, and file/diagram creation—and the descriptions actively steer between get_metadata and get_design_context. However, get_screenshot and download_assets both render node exports, and figma_auth_status/whoami both surface user identity, creating mild ambiguity.
The majority of tools follow a clear verb_noun snake_case pattern like get_metadata, upload_assets, and create_new_file, with the figma_ auth/context cluster staying internally consistent. The bare whoami and the generic use_figma break the pattern slightly, but the overall convention remains predictable.
13 tools is within the healthy range for a Figma integration, covering auth, current-context, inspection, assets, writing, file creation, and diagrams. It is slightly heavier than necessary because get_screenshot overlaps with the export side of download_assets and whoami partially duplicates figma_auth_status.
The set covers the full design-to-code lifecycle: authentication, detecting the active file, reading metadata and variables, extracting screenshots/assets, uploading assets, and mutating designs via use_figma. Creating new files and generating diagrams round out the surface with no obvious dead ends.
Maintenance
Related MCP Connectors
Drive Google Antigravity from the Gemini app: remote MCP with OAuth 2.1 + PKCE.
Connect AI agents to Filepad workspaces through OAuth MCP.
Official Fibery MCP server: query and update your workspace from any AI client via OAuth.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables MCP clients to read design structure, take screenshots, create nodes, and edit UI directly on Figma canvas via a bridge between MCP and Figma Desktop.10MIT
- AlicenseBqualityCmaintenanceEnables writing to Figma from MCP clients like Claude Code without a Figma Dev seat, using a local WebSocket relay and a Figma dev plugin.44MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to read and modify the currently open Figma design file through a paired local Figma plugin, supporting operations like creating nodes, editing properties, and exporting PNG/SVG.2MIT
- AlicenseNot gradedqualityBmaintenanceConnects an MCP client such as Claude Code to the Figma file open in the desktop app, letting the agent create frames, write text, apply styles, import images and SVGs, take screenshots, and run arbitrary Figma Plugin API code. Commands travel through a local development plugin instead of Figma's web API, so there are no tokens, quotas, or rate limits.44 npm3MIT