Skip to main content
Glama
AysllaGomes

Figma Context Cache MCP

by AysllaGomes

🎨 Figma Context Cache MCP

πŸ‡§πŸ‡· Leia em portuguΓͺs: README.pt-BR.md

Persistent design context for AI coding agents.

Build once. Cache locally. Reuse everywhere.

An MCP (Model Context Protocol) server that provides cached, refreshable and structured Figma context for AI coding assistants such as Codex, Claude Code, and other MCP-compatible clients.

Instead of querying the Figma API on every request, this server stores node responses locally and exposes tools to retrieve, inspect, synchronize and manage cached design context.


Why?

AI coding assistants frequently need information from Figma while implementing or maintaining frontend applications.

Without a cache layer, every request:

  • calls the Figma API

  • consumes rate limits

  • increases latency

  • downloads the same information repeatedly

This project introduces a persistent cache with explicit synchronization capabilities, making Figma context:

  • ⚑ Faster

  • ♻️ Reusable

  • πŸ“¦ Persistent

  • πŸ€– AI-friendly


Architecture

                 AI Agent
        (Codex / Claude Code)

                     β”‚
                     β–Ό

               MCP Server

                     β”‚

         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚                       β”‚

         β–Ό                       β–Ό

 Local JSON Cache        Figma REST API

         β”‚

         β–Ό

  Persistent Design Context

Features

  • βœ… Persistent local cache

  • βœ… Configurable cache TTL

  • βœ… Explicit cache synchronization

  • βœ… Cache inspection

  • βœ… Selective cache clearing

  • βœ… Strongly typed

  • βœ… Automated tests with Vitest

  • βœ… MCP compatible


MCP Tools

Tool

Description

health_check

Verifies that the MCP server is running

get_figma_node

Retrieves a node from cache or directly from Figma

sync_figma_node

Forces a fresh request to Figma and updates the cache

list_cached_figma_nodes

Lists cached nodes and their current status

clear_figma_cache

Removes cache entries selectively


Cache Lifecycle

get_figma_node

        β”‚

        β–Ό

Cache Hit?
   β”‚
   β”œβ”€β”€ Yes ───────────────► Return cached node
   β”‚
   └── No
        β”‚
        β–Ό

Query Figma API

        β”‚

        β–Ό

Store locally

        β”‚

        β–Ό

Return response


sync_figma_node

        β”‚

        β–Ό

Always query Figma

        β”‚

        β–Ό

Update cache

        β”‚

        β–Ό

Return fresh response

Example

Synchronize a node:

Use sync_figma_node with:

fileKey: wdva3WcsFmz54Sg5e6OWJl
nodeId: 4510-5941
depth: 1

Example response:

{
  "message": "Node synchronized successfully.",
  "metadata": {
    "source": "figma",
    "cacheUpdated": true
  }
}

Subsequent requests:

Use get_figma_node...

Response:

{
  "metadata": {
    "source": "cache"
  }
}

Project Structure

src/
β”œβ”€β”€ cache/
β”œβ”€β”€ figma/
β”œβ”€β”€ server/
β”œβ”€β”€ tools/
└── sync/

tests/
β”œβ”€β”€ cache/
└── figma/

Testing

This project uses Vitest.

Current test coverage:

Component

Coverage

CacheService

90%+

FigmaContextService

100%

FigmaClient

In progress

Run the test suite:

npm test

Generate coverage:

npm run test:coverage

Installation

git clone https://github.com/AysllaGomes/figma-context-cache-mcp.git

cd figma-context-cache-mcp

npm install

Configure your environment:

FIGMA_API_KEY=your-token
CACHE_TTL_SECONDS=3600
STORAGE_PATH=./storage

Start the server:

npm run dev

Roadmap

  • Persistent cache

  • Cache inspection

  • Cache synchronization

  • Automated unit tests

  • Structured node metadata

  • Component relationship graph

  • Storybook integration

  • Angular component mapping

  • Design token indexing

  • Semantic search


Vision

This project started as a cache for the Figma API.

Its long-term goal is to evolve into a Frontend Context Engine, capable of providing AI coding agents with rich, structured knowledge about design systems, frontend components and software architecture.

Instead of simply retrieving JSON from Figma, the server aims to understand relationships between components, design tokens, Storybook stories and frontend implementations, enabling AI agents to make better architectural and implementation decisions.


License

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    A Model Context Protocol (MCP) server that enhances Figma design integration by adding element position information to API responses, enabling AI assistants to better understand spatial relationships and convert designs to code more accurately.
    210
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • Cloud-hosted MCP server for durable AI memory

  • MCP server connecting AI agents to non-custodial staking data across 130+ networks.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AysllaGomes/figma-context-cache-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server