Local Figma MCP Server

Local Figma MCP Server

Bridges MCP clients to Figma, enabling live canvas manipulation via a plugin WebSocket and file metadata access through the Figma REST API.

Category
访问服务器

README

Local Figma MCP Server

This project is a local bridge between an MCP client and Figma.

Mental Model

There are three local pieces:

  1. Your MCP client starts node src/server.js.
  2. src/server.js speaks MCP over stdin/stdout.
  3. The Figma plugin connects back to the server over ws://localhost:3055.

There is also one optional cloud piece:

  1. Figma REST API calls go from src/server.js to https://api.figma.com using FIGMA_ACCESS_TOKEN.

The MCP server cannot directly inspect a live Figma canvas. For live canvas actions, it sends commands to the plugin, and the plugin uses the Figma Plugin API. For file metadata, comments, projects, versions, components, styles, dev resources, and webhooks, the server uses the Figma REST API.

Why Node

Node is used because the two local edges are JavaScript-native:

  • The MCP TypeScript/JavaScript SDK supports local stdio servers cleanly.
  • Figma plugins are written in JavaScript.

FastAPI can work for an HTTP service, but this project is primarily a local MCP stdio server plus a WebSocket bridge to a Figma plugin. Using FastAPI would add a Python HTTP layer without removing the need for JavaScript in the plugin.

Run The Server

npm start

If you want to use Figma REST API tools, set your token before starting the server:

$env:FIGMA_ACCESS_TOKEN="your-token-here"
npm start

By default the server sends the token as X-Figma-Token, which is the usual mode for Figma personal access tokens. For OAuth bearer tokens, also set:

$env:FIGMA_AUTH_MODE="bearer"

For an MCP client config, use this command:

{
  "mcpServers": {
    "figma-local": {
      "command": "node",
      "args": ["C:\\Users\\Nived\\Local-Figma-MCP-server\\src\\server.js"],
      "env": {
        "FIGMA_ACCESS_TOKEN": "your-token-here"
      }
    }
  }
}

Do not commit a real token into this repo. Use your MCP client's private config or your shell environment.

Load The Figma Plugin

  1. Open Figma Desktop.
  2. Go to Plugins > Development > Import plugin from manifest....
  3. Select plugin/manifest.json.
  4. Run Local Figma MCP Bridge.
  5. Click Connect.

Current Tools

Dev-focused MVP tools:

  • get_file: loads summarized Figma file metadata and structure.

  • find_frame: finds a screen/frame by exact name and returns its node ID.

  • get_node: reads details for one node.

  • export_image: renders a frame or node as an image URL.

  • get_styles: reads published styles for the file.

  • get_components: reads reusable components and component sets for the file.

  • analyze_screen: finds a frame and returns an AI-friendly dev summary with components, nested frames, text layers, colors, and counts. Plugin-backed tools:

  • figma_status: checks whether the plugin is connected.

  • figma_get_selection: returns selected node summaries.

  • figma_create_rectangle: creates a rectangle.

  • figma_create_text: creates a text layer.

REST API-backed tools:

  • figma_api_status: checks token configuration without exposing the token.
  • figma_me: reads the current Figma user.
  • figma_get_file: reads file JSON.
  • figma_get_file_metadata: reads file metadata.
  • figma_get_file_nodes: reads specific nodes.
  • figma_render_images: renders image URLs for nodes.
  • figma_get_comments: reads file comments.
  • figma_add_comment: creates a file comment.
  • figma_delete_comment: deletes one of your comments.
  • figma_get_file_versions: reads file version history.
  • figma_get_team_projects: lists team projects.
  • figma_get_project_files: lists project files.
  • figma_get_file_components: reads published file components.
  • figma_get_file_component_sets: reads published file component sets.
  • figma_get_file_styles: reads published file styles.
  • figma_get_dev_resources: reads Dev Mode resources.
  • figma_list_webhooks: lists accessible webhooks.
  • figma_get_team_webhooks: lists team webhooks.

How To Add A Plugin Tool

  1. Register an MCP tool in src/server.js.
  2. Make that tool call bridge.sendCommand("your-command", params).
  3. Add a matching branch in plugin/code.js inside runCommand.
  4. Use the Figma Plugin API in that branch.

That pattern is the whole plugin bridge: MCP tool -> WebSocket command -> Figma Plugin API -> WebSocket result -> MCP response.

How To Add A REST Tool

  1. Register an MCP tool in src/server.js.
  2. Validate inputs with Zod.
  3. Call a method in src/figma-api.js.
  4. src/figma-api.js sends an authenticated request to https://api.figma.com.
  5. The JSON response is returned to the MCP client.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选