Skip to content

API · MCP

Your design system, Agentic.

Grails is built from the ground up to make your Design System support agentic workflows.
Our MCP tools are specifically designed to provide design and coding agents with the right context of your Design System, to avoid context saturation and minimizing token spending.

Connect to any MCP client

The same API key opens MCP and REST. Add Grails to your agent as an MCP server with the URL and an Authorization header.

  • Any MCP client that supports Streamable HTTP and lets you set an Authorization header can connect: Claude Code, Cursor, Claude Desktop, VS Code and Gemini CLI, among others.
Claude Code
claude mcp add --transport http grails https://api.grails.design/mcp/v1 \
  --header "Authorization: Bearer grails_sk_XXXXXXXX"
Cursor · Claude Desktop · Antigravity
{
  "mcpServers": {
    "grails": {
      "type": "http",
      "url": "https://api.grails.design/mcp/v1",
      "headers": { "Authorization": "Bearer grails_sk_XXXXXXXX" }
    }
  }
}

The key grails_sk_XXXXXXXX: can be created from your Team settings

MCP Tools

10+ Tools for agents to use your Design System

Every tool is designed to give your agents the right information, context or action.

  • Find and read

    Find by a phrase or by an id, list the catalogue with filters, and read an entity at the depth you need.

    • findEntities
    • listEntities
    • getEntities
  • Build

    The spec of a variant, and the order to build a composed component in.

    • getComponentSpec
    • getComponentBuildOrder
  • Tokens and styles

    A map of the collections and their modes and of the style types, and a check of what a DTCG export would carry. Names and values come from listing the catalogue.

    • describeTokens
    • describeTokenExport
    • describeStyles
  • Graph and health

    What depends on what, and which components are out of sync.

    • getEntityGraph
    • checkHealth
  • Documentation

    Read pages and blocks. With a write scope, create, update and delete pages, write blocks, upload images and organize folders.

    • getEntityDocumentation
    • getDocumentationPage
    • listDocumentationPages
    • writeDocumentationBlocks
    • createDocumentationPage
    • describeDocumentationBlockTypes
    • + 7 more
  • REST, too

    Prefer a URL? REST serves the same data at api.grails.design/v1, described by an OpenAPI 3.1 document. Build scripts and CI checks can use it.

    API reference

Keys and scopes

A key per person, three scopes.

A key carries a set of scopes, and scope checks are exact. A key that reads your design system and can’t touch your documentation is read:library plus read:docs.

  • read:library

    Components and their specs, build order, tokens and their values per mode, styles, the graph, health and drift, and the fragment of documentation that matched a search.

  • read:docs

    The documentation itself: blocks, with their mentions resolved. Also validates a write, with a dry run that writes nothing.

  • write:docs

    Create, update and delete documentation. The only scope that can change or destroy anything: everything else is read-only.

About keys

  • Any admin or editor creates their own key, under Team settings → Integrations → Manage API keys.
  • The secret is shown once and never stored: Grails keeps only a hash.
  • A key expires after 90 days by default, and you get an email before it does.
  • Removing a member from the team deletes their keys.
Figma and Figma Agent are trademarks of Figma, Inc.

Give your agents the real design system.

Request access, create a key and connect your agent. Grails answers from your own library.

While in Alpha, we are working 1:1 with teams to improve the product. Access during this period is per-request only.