Figma Context MCP
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
作者提供的说明(英文原文)
MCP server that provides design-pattern selection expertise to AI coding agents
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
DESIGN_PATTERN_GENERATOR_API_KEY, DESIGN_PATTERN_GENERATOR_PROVIDER, DESIGN_PATTERN_GENERATOR_MODEL, DESIGN_PATTERN_GENERATOR_BASE_URL, DESIGN_PATTERN_PATTERN_DIRECTORY, DESIGN_PATTERN_EMBEDDER_BASE_URL, DESIGN_PATTERN_EMBEDDER_API_KEY, DESIGN_PATTERN_RERANKER_BASE_URL标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"design-pattern": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DESIGN_PATTERN_GENERATOR_API_KEY",
"-e",
"DESIGN_PATTERN_GENERATOR_PROVIDER",
"-e",
"DESIGN_PATTERN_GENERATOR_MODEL",
"-e",
"DESIGN_PATTERN_GENERATOR_BASE_URL",
"-e",
"DESIGN_PATTERN_PATTERN_DIRECTORY",
"-e",
"DESIGN_PATTERN_EMBEDDER_BASE_URL",
"-e",
"DESIGN_PATTERN_EMBEDDER_API_KEY",
"-e",
"DESIGN_PATTERN_RERANKER_BASE_URL",
"docker.io/olkowa/design-pattern-mcp:1.0.1",
"--transport",
"stdio"
],
"env": {
"DESIGN_PATTERN_GENERATOR_API_KEY": "your-value",
"DESIGN_PATTERN_GENERATOR_PROVIDER": "your-value",
"DESIGN_PATTERN_GENERATOR_MODEL": "your-value",
"DESIGN_PATTERN_GENERATOR_BASE_URL": "your-value",
"DESIGN_PATTERN_PATTERN_DIRECTORY": "your-value",
"DESIGN_PATTERN_EMBEDDER_BASE_URL": "your-value",
"DESIGN_PATTERN_EMBEDDER_API_KEY": "your-value",
"DESIGN_PATTERN_RERANKER_BASE_URL": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add design-pattern --env DESIGN_PATTERN_GENERATOR_API_KEY=your-value --env DESIGN_PATTERN_GENERATOR_PROVIDER=your-value --env DESIGN_PATTERN_GENERATOR_MODEL=your-value --env DESIGN_PATTERN_GENERATOR_BASE_URL=your-value --env DESIGN_PATTERN_PATTERN_DIRECTORY=your-value --env DESIGN_PATTERN_EMBEDDER_BASE_URL=your-value --env DESIGN_PATTERN_EMBEDDER_API_KEY=your-value --env DESIGN_PATTERN_RERANKER_BASE_URL=your-value -- docker run -i --rm -e DESIGN_PATTERN_GENERATOR_API_KEY -e DESIGN_PATTERN_GENERATOR_PROVIDER -e DESIGN_PATTERN_GENERATOR_MODEL -e DESIGN_PATTERN_GENERATOR_BASE_URL -e DESIGN_PATTERN_PATTERN_DIRECTORY -e DESIGN_PATTERN_EMBEDDER_BASE_URL -e DESIGN_PATTERN_EMBEDDER_API_KEY -e DESIGN_PATTERN_RERANKER_BASE_URL docker.io/olkowa/design-pattern-mcp:1.0.1 --transport stdio运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"design-pattern": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DESIGN_PATTERN_GENERATOR_API_KEY",
"-e",
"DESIGN_PATTERN_GENERATOR_PROVIDER",
"-e",
"DESIGN_PATTERN_GENERATOR_MODEL",
"-e",
"DESIGN_PATTERN_GENERATOR_BASE_URL",
"-e",
"DESIGN_PATTERN_PATTERN_DIRECTORY",
"-e",
"DESIGN_PATTERN_EMBEDDER_BASE_URL",
"-e",
"DESIGN_PATTERN_EMBEDDER_API_KEY",
"-e",
"DESIGN_PATTERN_RERANKER_BASE_URL",
"docker.io/olkowa/design-pattern-mcp:1.0.1",
"--transport",
"stdio"
],
"env": {
"DESIGN_PATTERN_GENERATOR_API_KEY": "your-value",
"DESIGN_PATTERN_GENERATOR_PROVIDER": "your-value",
"DESIGN_PATTERN_GENERATOR_MODEL": "your-value",
"DESIGN_PATTERN_GENERATOR_BASE_URL": "your-value",
"DESIGN_PATTERN_PATTERN_DIRECTORY": "your-value",
"DESIGN_PATTERN_EMBEDDER_BASE_URL": "your-value",
"DESIGN_PATTERN_EMBEDDER_API_KEY": "your-value",
"DESIGN_PATTERN_RERANKER_BASE_URL": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"design-pattern": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DESIGN_PATTERN_GENERATOR_API_KEY",
"-e",
"DESIGN_PATTERN_GENERATOR_PROVIDER",
"-e",
"DESIGN_PATTERN_GENERATOR_MODEL",
"-e",
"DESIGN_PATTERN_GENERATOR_BASE_URL",
"-e",
"DESIGN_PATTERN_PATTERN_DIRECTORY",
"-e",
"DESIGN_PATTERN_EMBEDDER_BASE_URL",
"-e",
"DESIGN_PATTERN_EMBEDDER_API_KEY",
"-e",
"DESIGN_PATTERN_RERANKER_BASE_URL",
"docker.io/olkowa/design-pattern-mcp:1.0.1",
"--transport",
"stdio"
],
"env": {
"DESIGN_PATTERN_GENERATOR_API_KEY": "your-value",
"DESIGN_PATTERN_GENERATOR_PROVIDER": "your-value",
"DESIGN_PATTERN_GENERATOR_MODEL": "your-value",
"DESIGN_PATTERN_GENERATOR_BASE_URL": "your-value",
"DESIGN_PATTERN_PATTERN_DIRECTORY": "your-value",
"DESIGN_PATTERN_EMBEDDER_BASE_URL": "your-value",
"DESIGN_PATTERN_EMBEDDER_API_KEY": "your-value",
"DESIGN_PATTERN_RERANKER_BASE_URL": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
DESIGN_PATTERN_GENERATOR_PROVIDER envDESIGN_PATTERN_GENERATOR_MODEL envDESIGN_PATTERN_GENERATOR_BASE_URL envDESIGN_PATTERN_PATTERN_DIRECTORY env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 olk 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:DESIGN_PATTERN_GENERATOR_API_KEY, DESIGN_PATTERN_EMBEDDER_BASE_URL, DESIGN_PATTERN_EMBEDDER_API_KEY, DESIGN_PATTERN_RERANKER_BASE_URL
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(1.0.1)于27天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Docker。
同一分类中有:Figma Context MCP, Claude Real Video, Figma MCP Server
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
Let any LLM watch a video locally — and search everything it has ever watched.
The Figma MCP server brings Figma design context directly into your AI workflow.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
An MCP (Model Context Protocol) server that provides design-pattern selection expertise to AI coding agents. Given a free-text description of a system, it analyses the problem, retrieves matching design patterns (from 486 built-in patterns, each realized in 13 concrete languages plus a generic binding), generates a concrete design with a primary pattern, supporting patterns, participants, interactions, implementation steps, and language-bound variants, and evaluates it against eight design-level quality axes (testability, extensibility, maintainability, simplicity, performance, reliability, security, scalability). The pipeline (analyze → weights ∥ retrieval → generate → evaluate → bounded refine) and its wire contract are specified in docs/implementation-guide.md.
# 1. Clone
git clone https://git.odvlh.xyz/olli/design-pattern-mcp.git && cd design-pattern-mcp
export MINIMAXAI_API_KEY=your_key_here
make docker-build-all make docker-up
make client-analyze make client-async # full design via the background job trio
Server starts on streamable-http at http://localhost:8822/mcp (dev compose maps host 8822 → container 8050). make client-analyze / make client-design target http://localhost:8822/mcp; override with CLIENT_URL.
To have an AI coding agent install the Docker stack from prebuilt images (no local build), point it at [INSTALL.md](INSTALL.md) — the non-interactive agent runbook (copy-paste commands, expected outputs, verification probes).
Clone this repo, then follow INSTALL.md Path A (compose stack, port 8822).
My generator API key is: sk-...
Pick one path in INSTALL.md:
:8822): evaluating / developing, no sudo needed. Own TEI sidecar copies.:8812): persistent host service, starts at boot, needs sudo. Uses the shared pattern-tei-infra TEI stack.The agent needs a repo clone, Docker ≥ v2.20 with group membership, ~8 GB free, a MINIMAXAI_API_KEY (or another provider per INSTALL.md#switching-the-generator-llm), and linux/amd64 (on arm64 it builds locally via make docker-build-all). Dev and systemd stacks run concurrently on their default host ports (8822 vs 8812). After install, continue with Connect Your Agent below.
# Install (one-time)
uv pip install -e .
claude mcp add design-patterns \ -e GENERATOR_PROVIDER=minimax \ -e GENERATOR_MODEL=minimax/MiniMax-M2.7 \ -e GENERATOR_BASE_URL=https://api.minimax.io/v1 \ -e GENERATOR_API_KEY=your_key \ -- design-pattern-mcp --transport stdio
Stdio mode needs the TEI endpoints reachable (default http://design-pattern-tei-embed:8080 and the reranker URL from config/config.json) — either run the compose stack's sidecars or set EMBEDDER_BASE_URL / RERANKER_BASE_URL to your own. For a no-network smoke run, start with --offline (deterministic lexical-only retrieval instead of TEI).
OpenCode uses HTTP transport. Start the server first, then configure opencode:
# Terminal 1: start the server
make docker-up
uv run design-pattern-mcp --transport streamable-http --port 8050
{
"$schema": "https://opencode.ai/config.json", "mcp": { "design-patterns": { "type": "remote", "url": "http://localhost:8822/mcp" } } }
Note: the generator API key is read by the server from its config file (
config/config.json,{env:...}placeholders), not from opencode's environment.
# Install (one-time)
uv pip install -e .
Add to ~/.codex/config.toml:
[mcp_servers.design-patterns]
command = "design-pattern-mcp" args = ["--transport", "stdio"]
[mcp_servers.design-patterns.env] GENERATOR_PROVIDER = "minimax" GENERATOR_MODEL = "minimax/MiniMax-M2.7" GENERATOR_BASE_URL = "https://api.minimax.io/v1" GENERATOR_API_KEY = "your_key"
Or via CLI:
codex mcp add design-patterns \
-e GENERATOR_API_KEY=your_key \ -- design-pattern-mcp --transport stdio
The SKILL in skills/design-pattern-mcp/ is written for Oh My Pi (OMP), where this server's tools are reached as xd://mcp__design_pattern_local_* devices and every MCP request is bounded by a deadline (OMP_MCP_TIMEOUT_MS → per-server timeout → 30 s). It teaches the agent which entry point fits that deadline, how to read the results, and the full workflow recipes.
skills/design-pattern-mcp/
├── SKILL.md # OMP constraints, entry-point decision guide, device quick reference └── references/ ├── tools.md # 9 tool signatures, arg shapes, status codes └── workflows.md # workflow recipes, result interpretation, troubleshooting
Install for OMP — copy the skill directory into OMP's user skills root:
cp -r skills/design-pattern-mcp ~/.omp/agent/skills/
The skill then tells the agent:
select_design_patterns (full pipeline) takes 2–10 minanalyze_design when the agent writes the code itself (decisions and rationale, no generated design), the full pipeline when the caller wants the designjob_id is the only durable handle — persist it (SQLite job store, JOBS_DB)description (component names + responsibilities + constraints), and language, paradigm, focus as separate structured argumentsoverview.score (0–100), findings[], and per-part selectionsThe tool schemas in references/ are client-agnostic; only the deadline/device guidance is OMP-specific.
All pipeline tools take a free-text description as the primary argument. The examples below show the exact tool call shape so you can use them in any MCP client or API consumer.
In Claude Code (or any MCP client), paste the natural-language instruction:
We're building the ingestion path of an IoT platform: a Kafka consumer
service parses 10k events/sec, an enricher adds geolocation from Redis, and a writer persists to InfluxDB and S3. Components: consumer, parser, enricher, sink. Constraints: at-least-once delivery, backpressure, Python.
Your agent calls select_design_patterns internally. The server returns the DesignResult: overview (primary pattern, supporting patterns, principles, score, reasoning), applications[] (participants, interactions, implementation_steps, code_sketch, language_binding with the bound variant), interactions[], quality_attributes, test_strategy, and risks[].
Coding agents that write the code themselves should call `analyze_design` instead. It runs the same ANALYZE phase (§1–§8: brief repair → decision parts → per-part retrieval → quality weights → selection) and stops there: you get the repaired brief, the decision parts and one selection per part (primary, supporting patterns, ranked alternatives, veto ledger, weights) with no generated applications and no evaluation. The selection names *what* to apply per part, not *how* — participants, implementation steps, code sketches and language bindings are materialized by generate_design from that payload (or read via get_design_pattern per pattern); implement from the applications, never from the bare pattern names. select_design_patterns remains the design path — it continues through GENERATE → EVALUATE, where the bulk of a full run's wall clock goes. Either way, the decisions come from the same ANALYZE stage — a fresh LLM analysis per call, so neither path is idempotent; pass the analyze_design payload to generate_design if you later want the materialized applications.
Or call tools directly from your agent:
Call select_design_patterns with:
description: "IoT ingestion path: Kafka consumer (10k events/sec) → JSON parse → Redis geo-enrich → InfluxDB + S3 sink. At-least-once, backpressure." language: "python"
Call list_design_patterns() # all 486 patterns Call list_design_patterns(category="workflow-messaging") Call get_design_pattern(name="process-manager")
submit_design_job + get_design_statusFor clients with short request timeouts. submit_design_job returns a job_id immediately; poll get_design_status until done:
# Step 1: start the job
Call submit_design_job with: description: "IoT ingestion path: Kafka consumer → parse → Redis enrich → InfluxDB + S3"
Call get_design_status with: job_id: " "
In Python (via the MCP client API — see examples/design_pattern_client_async.py):
import asyncio
from fastmcp import Client
SERVER = "http://localhost:8822/mcp" POLL_EVERY = 15 # seconds
async def main(): client = Client(SERVER) async with client:
result = await client.call_tool( "submit_design_job", {"description": "IoT ingestion: Kafka → parse → enrich → sink"}, ) job_id = result.data["job_id"] print(f"Job started: {job_id}")
while True: await asyncio.sleep(POLL_EVERY) status = await client.call_tool("get_design_status", {"job_id": job_id}) data = status.data print(f" status={data['status']}") if data["status"] in ("completed", "failed", "cancelled"): break
print(data.get("result", data)) # full DesignResult when completed
asyncio.run(main())
See examples/design_pattern_client_async.py for the complete runnable example. Run it with:
make docker-up # Termina只显示了开头部分;其余内容请在仓库中阅读