Figma CLI for AI Agents

CLIs are eating MCPs. The industry is converging on the very same idea. MCPs for all their merit can be token hungry, slow, and unreliable for complex tool chaining. However, coding agents have become incredibly good at working with CLIs, and in fact they are far more comfortable working with CLI tools than MCP. With Composio's Universal CLI, your coding agents can talk to over 1000+ SaaS applications. With Figma, agents can add a comment to this figma file, convert design tokens to tailwind css, delete a reaction from a comment, and more — all without worrying about authentication. This guide walks you through Composio Universal CLI and explains how you can connect it with coding agents like Claude Code, Codex, OpenCode, etc, for end-to-end Figma automation.

Figma logoFigma
Oauth2Api Key

Figma is a collaborative interface design tool for teams and individuals. It streamlines design workflows with real-time collaboration and easy sharing.

52 Tools

Introduction

CLIs are eating MCPs. The industry is converging on the very same idea. MCPs for all their merit can be token hungry, slow, and unreliable for complex tool chaining. However, coding agents have become incredibly good at working with CLIs, and in fact they are far more comfortable working with CLI tools than MCP.

With Composio's Universal CLI, your coding agents can talk to over 1000+ SaaS applications. With Figma, agents can add a comment to this figma file, convert design tokens to tailwind css, delete a reaction from a comment, and more — all without worrying about authentication.

This guide walks you through Composio Universal CLI and explains how you can connect it with coding agents like Claude Code, Codex, OpenCode, etc, for end-to-end Figma automation.

Also integrate Figma with

What is Universal CLI and why use it?

The idea behind building the universal CLI is to give agents a single command interface to interact with all your external applications. Here's what you'll get with it:

  • Agent-friendly: Coding agents like Claude Code, Codex, and OpenCode can use CLI tools natively — no MCP setup required.
  • Authentication handled: Connect once via OAuth or API Key, and all CLI commands work with your credentials automatically.
  • Tool discovery: Search, inspect, and execute 20,000+ tools across 1000+ apps from one interface.
  • Trigger support: Use triggers to listen for events across your apps, powered by real-time webhooks or polling under the hood.
  • Type generation: Generate typed schemas for autocomplete and type safety in your projects.

Prerequisites

Install the Composio CLI, authenticate, and initialize your project:

bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login

During login you'll be redirected to sign in page, finish the complete flow and you're all set.

Composio CLI authentication flow

Connecting Figma to Coding Agents via Universal CLI

Once it is installed, it's essentially done. Claude Code, Codex, OpenCode, OpenClaw, or any other agent will be able to access the CLI. A few steps to give agents access to your apps.

  1. Launch your Coding Agent — Claude Code, Codex, OpenCode, anything you prefer.
  2. Prompt it to "Authenticate with Figma"
  3. Complete the authentication and authorization flow and your Figma integration is all set.
  4. Start asking anything you want.

Universal CLI Commands for Figma

You can also manually execute CLI commands to interact with your Figma.

Connect your Figma account

Link your Figma account and verify the connection:

bash
# Connect your Figma account (opens OAuth flow)
composio connected-accounts link figma

# Verify the connection
composio connected-accounts list --toolkits figma

Discover Figma tools

Search and inspect available Figma tools:

bash
# List all available Figma tools
composio tools list --toolkit figma

# Search for Figma tools by action
composio tools search "figma"

# Inspect a tool's input schema
composio tools info FIGMA_ADD_A_COMMENT_TO_A_FILE

Common Figma Actions

Add a comment to a filePosts a new comment to a figma file or branch, optionally replying to an existing root comment (replies cannot be nested); `region height` and `region width` in `client meta` must be positive if defining a comment region

bash
composio tools execute FIGMA_ADD_A_COMMENT_TO_A_FILE \
  --message "Great work on this design!" \
  --file_key "your_file_key_here"

Add a reaction to a commentPosts a specified emoji reaction to an existing comment in a figma file or branch, requiring valid file key and comment id

bash
composio tools execute FIGMA_ADD_A_REACTION_TO_A_COMMENT \
  --emoji ":heart:" \
  --file_key "figma_file_key_123" \
  --comment_id "1234567890"

Create a webhookCreates a figma webhook for a `team id` to send post notifications for an `event type` to a publicly accessible https `endpoint`; an initial ping is sent unless `status` is `paused`

bash
composio tools execute FIGMA_CREATE_A_WEBHOOK \
  --team_id "YOUR_TEAM_ID_HERE" \
  --endpoint "https://example.com/api/figma-webhooks" \
  --passcode "s3cr3tPa$$c0de" \
  --event_type "VAL_FILE_COMMENT"

Create dev resourcesCreates and attaches multiple uniquely-urled development resources to specified figma nodes, up to 10 per node

bash
composio tools execute FIGMA_CREATE_DEV_RESOURCES \
  --dev_resources "<array>"

Generate Type Definitions

Generate typed schemas for Figma tools to get autocomplete and type safety in your project:

bash
# Auto-detect language
composio generate --toolkits figma

# TypeScript
composio ts generate --toolkits figma

# Python
composio py generate --toolkits figma

Tips & Tricks

  • Always inspect a tool's input schema before executing: composio tools info <TOOL_NAME>
  • Pipe output with jq for better readability: composio tools execute TOOL_NAME -d '{}' | jq
  • Set COMPOSIO_API_KEY as an environment variable for CI/CD pipelines
  • Use composio dev logs tools to inspect execution logs and debug issues

Next Steps

  • Try asking your coding agent to perform various Figma operations
  • Explore cross-app workflows by connecting more toolkits
  • Set up triggers for real-time automation
  • Use composio generate for typed schemas in your projects
TOOLS

Supported Tools

Every Figma action and event your agent gets out of the box.

Add a comment to a file

Posts a new comment to a Figma file or branch, optionally replying to an existing root comment (replies cannot be nested); `region_height` and `region_width` in `client_meta` must be positive if defining a comment region.

Add a reaction to a comment

Posts a specified emoji reaction to an existing comment in a Figma file or branch, requiring valid file_key and comment_id.

Create a webhook

Creates a Figma webhook to receive POST notifications when specific events occur.

Create dev resources

Creates and attaches multiple uniquely-URLed development resources to specified Figma nodes, up to 10 per node.

Create, modify, or delete variables

Manages variables, collections, modes, and their values in a Figma file via batch create/update/delete operations; use temporary IDs to link new related items in one request and ensure `variableModeValues` match the target variable's `resolvedType`.

Delete a comment

Deletes a specific comment from a Figma file or branch, provided the authenticated user is the original author of the comment.

Delete a reaction

Deletes a specific emoji reaction from a comment in a Figma file; the user must have originally created the reaction.

Delete a webhook

Permanently deletes an existing webhook, identified by its unique `webhook_id`; this operation is irreversible.

Delete dev resource

Deletes a development resource (used to link Figma design elements to external developer information like code or tasks) from a specified Figma file.

Design tokens to tailwind

Convert design tokens to Tailwind CSS configuration.

Detect Background Layers

Detect background layers for selected nodes in a Figma file.

Discover Figma Resources

Smart Figma resource discovery - extract IDs from any Figma URL.

Download Figma Images

Download images from Figma file nodes.

Extract design tokens

Extract design tokens from Figma files by combining styles, variables, and node-extracted values.

Extract Prototype Interactions

Extract prototype interactions and animations from Figma files.

Get activity logs

Retrieves activity log events from Figma, allowing filtering by event types, time range, and pagination.

Get a webhook

Retrieves detailed information about a specific webhook by its ID, provided the webhook exists and is accessible to the user.

Get comments in a file

Retrieves all comments from an existing Figma file, identified by a valid `file_key`, returning details like content, author, position, and reactions, with an option for Markdown formatted content.

Get component

Fetches metadata for a specific component using its unique identifier.

Get component set

Retrieves detailed metadata for a specific published Figma component set using its unique `key`.

Get current user

Retrieves detailed information for the currently authenticated Figma user.

Get dev resources

Retrieves development resources (e.

Get file components

Retrieves published components from a Figma file, which must be a main file (not a branch) acting as a library.

Get file component sets

Retrieves all published component sets from the specified Figma main file (file_key must not be for a branch).

Get file json

Get Figma Design file data with automatic simplification.

Get file metadata

Get Figma file metadata including name, creator, last modification details, thumbnail, and access information.

Get file nodes

Fetch JSON for specific node IDs from a Figma file to avoid full-file payload limits.

Get files in a project

Fetches a list of files in a Figma project, optionally including branch metadata.

Get file styles

Retrieves a list of published styles (like colors, text attributes, effects, and layout grids) from a specified main Figma file (not a branch).

Get image fills

Retrieves temporary (14-day expiry) download URLs for all image fills in a Figma file; requires `imageRef` from `Paint` objects to map URLs.

Get library analytics component action data

Retrieves component insertion and detachment analytics for a specified Figma library, groupable by 'component' or 'team' and filterable by a date range (YYYY-MM-DD).

Get library analytics component usage data

Retrieves component usage analytics for a specified Figma library file (identified by `file_key`), with data groupable by 'component' or 'file'.

Get library analytics style action data

Retrieves style usage analytics (insertions, detachments) for a Figma library, grouped by 'style' or 'team'; if providing a date range, ensure end_date is not before start_date.

Get library analytics style usage data

Retrieves style usage analytics for a published Figma library.

Get library analytics variable action data

Retrieves weekly, paginated analytics data on variable insertions and detachments for a specified Figma library (identified by `file_key`), groupable by 'variable' or 'team', and filterable by an optional date range.

Get library analytics variable usage data

Retrieves paginated analytics data on variable usage from a specified Figma library, grouped by 'file' or 'variable', for libraries with enabled analytics.

Get local variables

Retrieves all local/remote variables for a Figma file/branch; crucial for obtaining mode-specific values which `/v1/files/{file_key}/variables/published` omits.

Get payments

Retrieves a user's payment information for a Figma plugin, widget, or Community file; the authenticated identity must own the resource.

Get projects in a team

Retrieves projects within a specified Figma team that are visible to the authenticated user.

Get published variables

Retrieves variables published from a specified Figma file; this API is available only to full members of Enterprise organizations.

Get reactions for a comment

Retrieves reactions for a specific comment in a Figma file.

Get SCIM service provider config

Get Figma's SCIM service provider configuration.

Get style

Retrieves detailed metadata for a specific style in Figma using its unique style key.

Get team components

Retrieves components published in a specific Figma team's library; the team must have published components, otherwise an empty list is returned.

Get team component sets

Retrieves a paginated list of published component sets (collections of reusable UI elements) from a specified Figma team's library.

Get team styles

Retrieves a paginated list of published styles (fill colors, text styles, effects, grids) from a specified Figma team's library.

Get webhooks

Retrieves all webhooks registered for a specified Figma context (team, project, or file).

Get versions of a file

Retrieves the version history for a Figma file or branch, as specified by its `file_key`.

Get webhook requests

Retrieves a history of webhook requests for a specific Figma webhook subscription; data is available for requests sent within the last seven days.

Render images of file nodes

Render Figma nodes as images (PNG, JPG, SVG, PDF).

Update a webhook

Updates an existing Figma webhook, identified by `webhook_id`, allowing modification of its event type, endpoint, passcode, status, or description.

Update dev resources

Updates the name and/or URL of one or more existing Figma Dev Resources, each identified by its unique `id`.

FAQ

Frequently asked questions

The Composio Universal CLI is a single command-line interface that lets coding agents and developers interact with 1000+ SaaS applications. It handles authentication, tool discovery, action execution, and trigger setup — all from the terminal, without needing to configure MCP servers.

Any coding agent that can run shell commands works with the Composio CLI — including Claude Code, Codex, OpenCode, OpenClaw, and others. Once the CLI is installed, agents automatically discover and use the composio commands to interact with Figma and other connected apps.

MCP servers require configuration and can be token-heavy for complex workflows. The CLI gives agents a direct, lightweight interface — no server setup needed. Agents simply call composio commands like any other shell tool. It's faster to set up, more reliable for multi-step tool chaining, and works natively with how coding agents already operate.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Figma data and credentials are handled as safely as possible. You can also bring your own OAuth credentials for full control.

Start with Figma.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Figma tool your agent needs.Free to start.

Start building