Connection
管理 Figma 插件连接。
Type reference
// Connection manages the WebSocket link between the MCP server and the Figma plugin.// Channels are named rooms — both the MCP server and Figma plugin must join the same channel to communicate.// Workflow: connection(method:"create") to join a channel → connection(method:"get") to verify Figma plugin is connected.// If get times out (5s), the Figma plugin is not running or not on the same channel.// list shows all active channels and their connected clients. delete factory-resets a channel.4 methods available.
create
Section titled “create”Join a relay channel (required first step before any other tool)
| Parameter | Type | Required | Description |
|---|---|---|---|
channel | string | ✗ | The channel name displayed in the Figma plugin panel. Defaults to 'vibma' if omitted. (default: "vibma") |
Response
Confirmation message with channel and port
| Field | Type | Description |
|---|---|---|
result | string | Confirmation message with channel and port |
Example response
"Joined channel \"vibma\" on port 3055. Call connection(method: \"get\") to verify the Figma plugin is connected."Verify end-to-end connection to Figma
No parameters.
Response
| Field | Type | Description |
|---|---|---|
status | "pong" | |
documentName | string | Active Figma document name |
currentPage | string | Current page name |
timestamp | number | Unix timestamp |
Example response
{ "status": "pong", "documentName": "Design System", "currentPage": "Components", "timestamp": 1709337600}Inspect which clients (MCP, plugin) are connected to each channel
No parameters.
delete
Section titled “delete”Disconnect all clients (MCP server and Figma plugin) from a channel and reset its state
| Parameter | Type | Required | Description |
|---|---|---|---|
channel | string | ✗ | Channel to reset. Defaults to 'vibma'. (default: "vibma") |
Response
Confirmation of tunnel reset
| Field | Type | Description |
|---|---|---|
result | string | Confirmation of tunnel reset |
Example response
"Channel vibma reset"