Skip to main content
Glama
yk-lab

YetAnotherFigmaMCP

by yk-lab

YetAnotherFigmaMCP

CI codecov Maintainability Python 3.13+ License: MIT Ruff Checked with pyright CodeRabbit Pull Request Reviews DeepWiki

Figma ファイルをローカルキャッシュし、MCP (Model Context Protocol) サーバーとして提供する軽量ツール。

背景

Figma 無料プランでは API / MCP 呼び出し回数が月 6 回までに制限されています。本ツールは Figma のファイル・ノード JSON を事前取得しキャッシュすることで、この制限内で効率的にデザインデータを活用できるようにします。

Related MCP server: Figma MCP

特徴

  • 事前キャッシュ方式: Figma API を事前に叩いて JSON をローカル保存

  • 検索用インデックス: ノード名・フレーム名での高速検索

  • MCP サーバー: AI エージェントからキャッシュデータを参照可能

  • API 呼び出し最小化: キャッシュ生成時と明示的リフレッシュ時のみ API 使用

インストール

pip install yet-another-figma-mcp

または uvx / pipx でも利用可能:

uvx yet-another-figma-mcp --help
pipx install yet-another-figma-mcp

セットアップ

Figma API トークンの設定

環境変数に Figma API トークンを設定:

export FIGMA_API_TOKEN="your-figma-api-token"

トークンは Figma の設定画面 から取得できます。

使い方

キャッシュの生成

# 単一ファイルのキャッシュ生成
yet-another-figma-mcp cache --file-id <FILE_ID>

# 複数ファイル
yet-another-figma-mcp cache --file-id <ID1> --file-id <ID2>

# ファイル ID リストから一括生成
yet-another-figma-mcp cache --file-id-list path/to/file_ids.txt

# 強制リフレッシュ(API を再度呼び出し)
yet-another-figma-mcp cache --file-id <FILE_ID> --refresh

MCP サーバーの起動

# MCP サーバー起動
yet-another-figma-mcp serve

# 動作確認
yet-another-figma-mcp status

Claude Desktop での設定

claude_desktop_config.json に以下を追加:

{
  "mcpServers": {
    "figma-cache": {
      "command": "uvx",
      "args": ["yet-another-figma-mcp", "serve"]
    }
  }
}

MCP ツール一覧

MCP サーバーは以下のツールを提供します:

get_cached_figma_file

指定ファイルのノードツリーやメタデータを取得。

引数:
  - file_id: string (必須)

返り値:
  - ルートノードと主要フレーム一覧
  - ファイル全体のメタデータ

get_cached_figma_node

単一ノードの詳細情報を取得。

引数:
  - file_id: string (必須)
  - node_id: string (必須)

返り値:
  - ノードのプロパティ(type, name, layout, style, children など)

search_figma_nodes_by_name

ノード名でノードを検索。

引数:
  - file_id: string (必須)
  - name: string (必須)
  - match_mode: "exact" | "partial" (オプション、デフォルト: exact)
  - limit: number (オプション)

返り値:
  - マッチしたノードのリスト

search_figma_frames_by_title

フレーム名からフレームノードを検索。

引数:
  - file_id: string (必須)
  - title: string (必須)
  - match_mode: "exact" | "partial" (オプション)
  - limit: number (オプション)

返り値:
  - 対象フレームノードの一覧

list_figma_frames

ファイル直下の主要フレーム一覧を取得。

引数:
  - file_id: string (必須)

返り値:
  - フレーム名・node_id・パスのリスト

キャッシュファイルの構造

~/.yet_another_figma_mcp/
  index.json                     # 全ファイル共通のメタ情報
  <file_id>/
    file_raw.json                # Figma API /files の生 JSON
    nodes_index.json             # ノード検索用インデックス

ユースケース例

画面実装の参照

ユーザー: 「サインアップ画面を実装してください」
→ AI: search_figma_frames_by_title で「Sign Up」を検索
→ AI: get_cached_figma_node でフレーム構造を取得
→ AI: 取得したデザイン情報をもとにコード生成

コンポーネントの特定

ユーザー: 「Primary Button のスタイルを教えて」
→ AI: search_figma_nodes_by_name で検索
→ AI: get_cached_figma_node で詳細取得

制限事項

本ツールは PoC(Proof of Concept)として以下の機能はスコープ外としています:

  • スクリーンショット取得

  • Code Connect(ノード⇔コンポーネント対応)

  • 変数・デザイントークンの取得

  • FigJam 対応

開発

セットアップ

# 開発用依存関係をインストール
uv sync --group dev

Task コマンド(推奨)

Task がインストールされている場合、以下のコマンドが使えます:

# 利用可能なタスク一覧
task

# 依存関係インストール
task install

# リント
task lint

# リント(自動修正付き)
task lint:fix

# フォーマット
task format

# フォーマット確認(修正なし)
task format:check

# 型チェック
task typecheck

# テスト
task test

# テスト(詳細出力)
task test:verbose

# テスト(並列実行)
task test:parallel

# テスト(カバレッジ付き)
task test:cov

# 全チェック(lint + format:check + typecheck + test)
task check

# pre-commit フック実行
task pre-commit

# MCP サーバー起動
task serve

# MCP サーバー起動(詳細ログ付き)
task serve:verbose

# キャッシュ状態確認
task status

# Figma ファイルをキャッシュ
task cache -- -f <FILE_ID>

# 生成ファイルのクリーンアップ
task clean

手動実行

# リント
uv run ruff check .

# フォーマット
uv run ruff format .

# 型チェック
uv run pyright

# テスト
uv run pytest

Acknowledgments

  • Figma-Context-MCP - AI 向けノード簡略化のアプローチを参考にさせていただきました

ライセンス

MIT License - 詳細は LICENSE を参照してください。

Available Tools

5 tools
get_cached_figma_fileA

Get cached Figma file metadata and top-level frames. Returns file name, version, last modified date, and a list of main frames. Use this tool first to understand the structure of a Figma file.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_idYesThe Figma file ID. Found in URLs like figma.com/file/<file_id>/... or figma.com/design/<file_id>/...

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral burden. It correctly signals a read-only cached operation and enumerates return fields, but it does not disclose cache semantics such as freshness, what happens on a cache miss, or whether it ever fetches live data from Figma.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three concise sentences: what the tool does, what it returns, and when to use it. Every sentence earns its place, and the core purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool, the description covers purpose, return fields, and usage guidance. The lack of an output schema or annotations leaves exact return shape and cache behavior unspecified, but the provided information is sufficient for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already fully documents the only parameter, file_id, with URL format examples. The description adds file-level context but no additional parameter-level semantics, so the baseline score of 3 is appropriate given 100% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Get cached Figma file metadata and top-level frames') and lists the concrete return items: file name, version, last modified date, and main frames. This clearly distinguishes the tool from the sibling node/frame search tools by focusing on file-level overview.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use this tool first to understand the structure of a Figma file', giving clear when-to-use guidance. It does not explicitly name alternative tools or state when not to use it, but the file-level overview purpose is enough for an agent to route correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_cached_figma_nodeA

Get detailed information for a specific node including all properties (type, name, layout, style, children, etc.). Use this after finding a node ID via search or list_figma_frames. Use 'depth' to limit children depth, 'simplified' for AI-optimized output.

ParametersJSON Schema
NameRequiredDescriptionDefault
depthNoMaximum depth of children to include. 0 = no children, 1 = immediate children only, etc. Omit for unlimited depth. Use this to reduce response size.
file_idYesThe Figma file ID. Found in URLs like figma.com/file/<file_id>/... or figma.com/design/<file_id>/...
node_idYesThe node ID in format '1:234', '1234:5678', or '1-234' (URL format). Found in Figma URL as ?node-id=1-234 or from search results.
simplifiedNoIf true, return AI-optimized format with CSS-like properties (e.g., 'flex-row gap-8 p-16' for layout). Significantly reduces response size. Recommended for large nodes.

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose what the tool returns (all node properties) and the effect of the depth and simplified parameters. However, it never explains what 'cached' means behaviorally—e.g., whether results may be stale, whether a live fetch is avoided, or any side-effect/safety profile—which is notable given the tool name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, no filler. The purpose is front-loaded, followed immediately by workflow context and parameter tips. Every sentence earns its place and the description is compact for the amount of guidance it provides.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with no output schema, the description covers the key context: what is returned, how to obtain node IDs, and how to reduce output size. It does not address caching behavior, authentication, or error cases, but for a simple node-fetch operation these are minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by recommending when to use each parameter: depth to 'limit' and 'reduce response size', simplified for 'AI-optimized output' and 'large nodes'. This gives practical decision context not fully captured by the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Get detailed information for a specific node including all properties (type, name, layout, style, children, etc.)'. It clearly scopes the tool to node-level detail and differentiates it from sibling file-level or search tools by saying 'Use this after finding a node ID via search or list_figma_frames'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear sequencing: use after obtaining a node ID via search or list_figma_frames. It also gives pragmatic guidance for both parameters (depth to limit children, simplified for AI-optimized output). It stops short of explicitly naming which alternatives to use instead (e.g., get_cached_figma_file for file-level), so it misses full when-not coverage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_figma_framesA

List all top-level frames in the file (including frames inside sections). Useful for getting an overview of the design structure. Returns frame names, IDs, and their paths in the document hierarchy.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_idYesThe Figma file ID. Found in URLs like figma.com/file/<file_id>/... or figma.com/design/<file_id>/...

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral disclosure burden. It discloses the inclusion behavior ('including frames inside sections'), the return contents, and the top-level frame scope, which is sufficient for an apparently read-only listing operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, each earning its place: the action/scope, the use case, and the return format. The most decision-relevant information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter list operation with no output schema, the description tells an agent everything needed: what is listed, how sections are handled, and what the response contains. No critical behavioral or output information is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the only parameter (file_id) is already well documented in the schema. The description adds no extra parameter-specific meaning, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('List'), a precise resource scope ('all top-level frames in the file'), and adds clarifying scope details ('including frames inside sections'). It also names the return payload (names, IDs, paths), making the tool's purpose distinct from the sibling search tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear intended context: 'useful for getting an overview of the design structure.' It does not explicitly exclude alternatives or name sibling tools, but the all-frames vs. search framing makes the appropriate use case reasonably clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_figma_frames_by_titleA

Search frame nodes by title. Useful for finding specific screens, pages, or components. Returns matching frames with their IDs and paths.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return
titleYesThe frame title to search for (e.g., 'Login Screen', 'Dashboard', 'Settings')
file_idYesThe Figma file ID. Found in URLs like figma.com/file/<file_id>/... or figma.com/design/<file_id>/...
match_modeNoMatch mode: 'exact' for exact title match, 'partial' for substring match (always case-insensitive)exact
ignore_caseNoIf true, perform case-insensitive matching (only for exact mode)

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the full burden of behavioral disclosure. It does disclose that the tool returns matching frames with IDs and paths, which is helpful, but it does not mention match-mode behavior, case sensitivity defaults, result limiting, or the non-mutating nature of the operation. 'Search' implies read-only, but this is not explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with no wasted content. It front-loads the core purpose, then adds a brief use case and return-value summary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The schema covers all parameters, and the description mentions the output kind (IDs and paths), but with no output schema and no annotations, the description is still fairly thin. It does not clarify when to choose this tool over search_figma_nodes_by_name, nor does it describe result shape or matching semantics beyond 'by title.'

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters are already documented in the input schema. The description adds no extra parameter semantics, which is acceptable given the high schema coverage, but it does not go beyond the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action and resource: searching frame nodes by title. It also gives a sense of what kinds of frames are useful to find ('screens, pages, or components'). However, it does not differentiate it from the sibling tool search_figma_nodes_by_name, which may cover overlapping intent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage with 'Useful for finding specific screens, pages, or components,' but provides no explicit when-to-use guidance, exclusions, or comparisons with siblings like search_figma_nodes_by_name or list_figma_frames. The guidance is present only by implication.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_figma_nodes_by_nameA

Search nodes by name. Supports exact and partial matching. Returns matching nodes with their IDs, types, and paths. Useful for finding specific components, buttons, icons, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesThe node name to search for (e.g., 'Button', 'Header', 'Icon')
limitNoMaximum number of results to return
file_idYesThe Figma file ID. Found in URLs like figma.com/file/<file_id>/... or figma.com/design/<file_id>/...
match_modeNoMatch mode: 'exact' for exact name match, 'partial' for substring match (always case-insensitive)exact
ignore_caseNoIf true, perform case-insensitive matching (only for exact mode)

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses search behavior and result contents, but it omits details like whether search is recursive, default limit behavior, and interaction between match_mode and ignore_case. Basic behavior is transparent, but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core action and result format. The final sentence is somewhat redundant with the opening, but it adds practical context for choosing the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with five parameters and no output schema, the description explains what the tool returns and what kinds of nodes it targets. It leaves some invocation details (pagination/defaults) to the schema, but the core calling contract is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all five parameters. The description adds only example use cases and does not materially improve on what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Search nodes by name'), enumerates matching modes (exact/partial), and specifies the return fields (IDs, types, paths). This makes it easy to distinguish from the sibling search_figma_frames_by_title, which targets frames.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It offers a clear use case ('finding specific components, buttons, icons'), but it does not state when to prefer this over search_figma_frames_by_title or when exact vs partial mode should be selected. The guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedget_cached_figma_file
    • First observedget_cached_figma_node
    • First observedlist_figma_frames
    • First observedsearch_figma_frames_by_title
    • First observedsearch_figma_nodes_by_name

TDQS

A3.9/5.0

Scored across 5 tools

Disambiguation4/5

Tools are mostly distinct, but list_figma_frames and get_cached_figma_file both return frame lists, which could cause confusion. Search nodes by name and search frames by title also overlap, though descriptions clarify the scope difference.

Naming Consistency5/5

All tools follow a consistent <verb>_figma_<resource> pattern, using get for single resources, search/list for plural collections, and qualifiers like by_name or by_title for searches. This makes the set predictable and easy to navigate.

Tool Count5/5

Five tools is a well-scoped size for a read-only Figma caching server, covering file metadata, frame enumeration, node search, and node detail retrieval without unnecessary bloat.

Completeness4/5

The toolkit covers the core exploration workflow: get file → list frames → search nodes → get node details. Minor gaps exist, such as no direct asset export or style querying, but the stated purpose is served without dead ends.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers