design
Figma MCP Integration for Vercel AI SDK
Connect Figma to Vercel AI SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Figma to Vercel AI SDK
Use KosmoKrator as a local integration gateway for Vercel AI SDK agents and scripts.
Create an MCP client that starts or connects to the KosmoKrator gateway for the selected integration. The gateway is local, scoped to this integration, and starts with
--write=deny so Vercel AI SDK can inspect read-capable tools without receiving write access by default.
Figma MCP Config for Vercel AI SDK
Prefer CLI JSON calls when a workflow only needs one deterministic integration operation.
{
"mcpServers": {
"kosmokrator-figma": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=figma",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=figma --write=deny Why Use KosmoKrator Here
Expose only Figma instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Figma Tools Visible to Vercel AI SDK
Vercel AI SDK sees stable MCP tool names generated from the Figma integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__figma__figma_delete_comment | figma.figma_delete_comment | Write | Delete a comment from a Figma file. |
integration__figma__figma_get_comments | figma.figma_get_comments | Read | List all comments on a Figma file. |
integration__figma__figma_get_component | figma.figma_get_component | Read | Get a Figma component by its key. |
integration__figma__figma_get_components | figma.figma_get_components | Read | List all components in a Figma file. |
integration__figma__figma_get_current_user | figma.figma_get_current_user | Read | Get the authenticated Figma user profile. Returns name, email, and account details. |
integration__figma__figma_get_file | figma.figma_get_file | Read | Get a Figma file by key. Returns the document tree with pages and nodes. |
integration__figma__figma_get_file_images | figma.figma_get_file_images | Read | Export images from Figma nodes in a file. Returns image download URLs. |
integration__figma__figma_get_file_nodes | figma.figma_get_file_nodes | Read | Get specific nodes from a Figma file by node IDs. |
integration__figma__figma_get_image_fills | figma.figma_get_image_fills | Read | Get image fill metadata for a Figma file. Returns image URLs for all image fills. |
integration__figma__figma_get_me | figma.figma_get_me | Read | Get the authenticated Figma user profile. |
integration__figma__figma_get_project_files | figma.figma_get_project_files | Read | List all files in a Figma project. |
integration__figma__figma_get_style | figma.figma_get_style | Read | Get a Figma style by its key. |
integration__figma__figma_get_styles | figma.figma_get_styles | Read | List all styles in a Figma file. |
integration__figma__figma_get_team_projects | figma.figma_get_team_projects | Read | List all projects in a Figma team. |
integration__figma__figma_list_comments | figma.figma_list_comments | Read | List all comments on a Figma file. Includes authors, positions, and reply threads. |
integration__figma__figma_list_components | figma.figma_list_components | Read | List all components in a Figma file. Returns component names, keys, and descriptions. |
integration__figma__figma_list_files | figma.figma_list_files | Read | List Figma files accessible to the authenticated user. Returns file names, keys, and thumbnails with pagination support. |
integration__figma__figma_list_projects | figma.figma_list_projects | Read | List all projects in a Figma team. Returns project names and IDs. |
integration__figma__figma_list_team_components | figma.figma_list_team_components | Read | List published components in a Figma team. |
integration__figma__figma_post_comment | figma.figma_post_comment | Read | Post a comment on a Figma file. Can be a top-level comment or a reply. |