Skip to main content
Glama
FigJam MCP Server

FigJam MCP Server

FigJam MCP Server

An MCP server that enables AI agents to manipulate a live FigJam canvas in real time via a companion Figma plugin.

Architecture

AI Agent ↔ MCP Server (stdio) ↔ Bridge (Express + WS) ↔ FigJam Plugin (in Figma)

The system has two components:

  1. MCP Server + Bridge — A Node.js process that speaks MCP over stdio and runs an embedded WebSocket bridge server. The bridge relays commands to the FigJam plugin and returns results.

  2. FigJam Plugin — A Figma plugin that runs inside the FigJam editor, connects to the bridge via WebSocket, and executes Figma Plugin API calls to create/update/delete elements on the board.

Related MCP server: Miro MCP Server

Prerequisites

  • Node.js >= 18

  • Figma Desktop App (required for running development plugins)

  • A FigJam board open in Figma (or use connect_figjam to create one automatically)

Quick Start

1. Build the project

npm ci
npm run build

2. Import the FigJam plugin

  1. Open Figma Desktop

  2. Open a FigJam board

  3. Go to Menu → Plugins → Development → Import plugin from manifest...

  4. Select figma-plugin/manifest.json from this project

  5. The plugin will appear under Plugins → Development → FigJam MCP

3. Run the plugin

In your FigJam board, launch the plugin from Plugins → Development → FigJam MCP. It will auto-connect to the bridge server.

4. Configure your MCP client

See MCP Client Configuration below.

MCP Tools

Tool

Description

connect_figjam

Open a new FigJam board and wait for the plugin to connect

create_sticky

Create a sticky note (text, position, color)

create_shape

Create a shape with text (type, position, size, color)

create_text

Create a text node (text, position, font size)

create_connector

Connect two elements with an optional label

create_section

Create a section for grouping elements

update_element

Update element properties (position, size, text, color)

delete_element

Remove an element by ID

query_elements

List elements, optionally filtered by type

validate_layout

Check for truncation, overlaps, bleed, and tight connectors

batch_create

Create multiple elements in one call with cross-referencing

align_elements

Align elements (left/center/right/top/middle/bottom)

distribute_elements

Distribute elements with even spacing

clear_board

Remove all elements from the board

get_board_info

Get board metadata (page name, element counts)

export_board

Export the board as a PNG or SVG image

MCP Resources & Prompts

Type

Name

Description

Resource

figjam://schema

Element reference — shape types, color palette, sizes, layout rules

Prompt

draw_diagram

Step-by-step workflow for creating well-structured diagrams

Environment Variables

Variable

Description

Default

BRIDGE_PORT

Port for the WebSocket bridge server

3000

MCP Client Configuration

GitHub Copilot CLI

Config location: ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "figjam": {
      "command": "node",
      "args": ["/absolute/path/to/figjam-mcp/dist/index.js"],
      "env": {
        "BRIDGE_PORT": "3000"
      }
    }
  }
}

Claude Code

# Claude Code
claude mcp add figjam --scope user \
  -e BRIDGE_PORT=3000 \
  -- node /absolute/path/to/figjam-mcp/dist/index.js

Claude Desktop

Config location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "figjam": {
      "command": "node",
      "args": ["/absolute/path/to/figjam-mcp/dist/index.js"],
      "env": {
        "BRIDGE_PORT": "3000"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "figjam": {
      "command": "node",
      "args": ["/absolute/path/to/figjam-mcp/dist/index.js"],
      "env": {
        "BRIDGE_PORT": "3000"
      }
    }
  }
}

How It Works

  1. The MCP server starts and launches an embedded Express + WebSocket bridge on BRIDGE_PORT

  2. When you run the FigJam plugin in Figma, it connects to the bridge via WebSocket

  3. AI agent calls an MCP tool (e.g., create_sticky)

  4. The MCP server sends a command over WebSocket to the plugin

  5. The plugin executes the Figma Plugin API call and returns the result

  6. The MCP server returns the result to the agent

Troubleshooting

  • "FigJam plugin is not connected" — Make sure the FigJam MCP plugin is running in your Figma editor. Open it from Plugins → Development → FigJam MCP.

  • Plugin won't connect — Verify the bridge server is running (check the health endpoint: curl http://localhost:3000/health). Ensure the port matches.

  • Command timeout — Commands timeout after 15 seconds. This may happen if the plugin is busy or if font loading is slow (first text/shape creation).

  • Plugin not appearing in Figma — You need to use the Figma Desktop app. Import the plugin via Development → Import plugin from manifest, pointing to figma-plugin/manifest.json.

Development

npm run type-check    # Type-check without emitting
npm run dev           # Watch mode for server code
npm run build         # Build everything (server + plugin)
npm run build:server  # Build server only
npm run build:plugin  # Build plugin only

Testing

node test/integration.mjs   # Run integration tests

License

MIT

Available Tools

15 tools
align_elementsB

Align multiple elements along an axis. Also auto-resizes any parent sections to fit their children after alignment.

Inputs: alignment (required), elementIds (required).

batch_createA

Create multiple elements in a single call — ideal for building entire diagrams at once. Accepts an array of element specs. Use refId on elements and reference them in connector startElementId/endElementId to wire up connections within the same batch. Elements are created in order (create sections first, then shapes, then connectors). Returns all created element IDs mapped to their refIds.

Inputs: elements (required).

clear_boardA

Delete ALL elements from the FigJam board to start with a clean canvas. Use before creating a new diagram.

Inputs: no named parameters.

connect_figjamA

Create a new FigJam board and wait for the plugin to connect. On macOS with Figma Desktop installed, creates the board directly in the desktop app. If the plugin is already connected, returns immediately.

Inputs: name, timeoutSeconds.

create_connectorA

Create a connector (arrow) between two elements on the FigJam board. Both elements must already exist. Connectors auto-route between shapes. Use the label param to annotate the connection (e.g. "REST API", "publishes events", "reads from"). Prefer labels over stickies for describing relationships between elements.

Inputs: endElementId (required), startElementId (required), label, strokeColor.

create_sectionA

Create a section (container) on the FigJam board to visually group related elements. Sections are large labeled containers — use them to encapsulate subsystems, layers, or logical groupings in architecture diagrams. Create the section FIRST, then place child shapes INSIDE its bounds (i.e. shape x/y must be within section x/y to x+width/y+height). The section name appears as a header label above the contained area. Sections have no background color by default — keep them clean.

Inputs: name (required), x, y, width, +1 more.

create_shapeB

Create a shape with text — the PRIMARY building block for diagrams. Resizable to any size. See figjam://schema for shape types, colors, and sizing guide.

Inputs: shapeType (required), x, y, text, +3 more.

create_stickyA

Create a sticky note. USE SPARINGLY — only for annotations or callouts beside the diagram. Fixed size: 240×240 (or 440×240 if wide). Cannot be resized. See figjam://schema for color palette.

Inputs: text (required), x, y, wide, +1 more.

create_textA

Create a standalone text label on the FigJam board. Use for titles, section headers, or annotation labels that sit outside shapes. For text inside diagram elements, use create_shape with a text param instead.

Inputs: text (required), x, y, fontSize.

delete_elementC

Delete an element from the FigJam board

Inputs: id (required).

distribute_elementsA

Distribute elements evenly with equal spacing. Enforces a minimum gap (default 60px) so elements and connectors between them are never too tight. Also auto-resizes any parent sections to fit their children after distribution.

Inputs: direction (required), elementIds (required), spacing.

get_board_infoB

Get metadata about the current FigJam board (page name, element count, etc.)

Inputs: no named parameters.

query_elementsB

List elements on the FigJam board, optionally filtered by type

Inputs: type.

update_elementA

Update properties of an existing element on the FigJam board. Use to move, resize, recolor, or change text of shapes, sections, and text nodes. Shapes and sections CAN be resized by passing width/height. Stickies CANNOT be resized (fixed at 240×240).

Inputs: id (required), x, y, text, +3 more.

validate_layoutA

MANDATORY — call after creating a diagram. Checks for: text truncation, overlapping elements, section bleed (elements outside section bounds), and tight connectors (< 80px gap between connected shapes). Fix each issue with update_element, then re-validate until zero issues remain.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 15 tools

    Disambiguation5/5

    Each tool targets a distinct action or element type, and the descriptions explicitly disambiguate potential overlaps like create_sticky vs create_shape vs create_text and get_board_info vs query_elements. Clear workflow guidance (e.g., validate_layout mandatory, connectors between existing elements) further reduces ambiguity.

    Naming Consistency4/5

    Nearly all tools follow a consistent snake_case verb_noun pattern (create_shape, update_element, query_elements, validate_layout). The only minor deviation is batch_create, which uses a modifier+verb order, but it remains readable and predictable.

    Tool Count5/5

    Fifteen tools are well-scoped for a diagramming server, covering connection, creation, querying, mutation, validation, and layout helpers without redundancy. Each tool earns its place and supports a complete diagramming workflow.

    Completeness5/5

    The set covers the full lifecycle: connect, inspect board, query elements, create all core element types, update, delete, batch creation, validation, and layout alignment/distribution. No obvious dead ends for building and refining FigJam diagrams.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers