KosmoKrator

design

Figma MCP Integration for OpenAI Agents SDK

Connect Figma to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

20 functions 19 read 1 write Bearer token auth

Connect Figma to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

Figma MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "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

Scoped tools

Expose only Figma instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Figma Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the Figma integration catalog.

MCP toolSource functionTypeDescription
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.

Related Figma Pages