Primitiv
БесплатноПоддерживаетсяDesign contract layer for AI agents. Scans Figma, code, Storybook, and token files, reconciles conflicts, and serves a single machine-readable source of truth s
Описание
Design contract layer for AI agents. Scans Figma, code, Storybook, and token files, reconciles conflicts, and serves a single machine-readable source of truth so every agent gets the same authoritative design rules before it builds. Local-first.
README
The design system contract keeping teams and agents in sync.
Retrieval gives you data. Reconciliation gives you truth.
The problem
Design-system knowledge is spread across code, Figma, Storybook, and documentation. When those sources drift, people reconcile the differences through experience; AI coding agents often fall back to generic patterns that work but do not belong in the product.
Primitiv gives every agent the same current design context through a machine-readable contract and a read-only MCP interface. It helps agents reuse what exists, follow established decisions, and surface inconsistencies before they ship.
Primitiv runs locally. Your code never leaves your machine.
Quick start
Run these commands from your project root:
npx @ai-by-design/primitiv init
npx @ai-by-design/primitiv build
npx @ai-by-design/primitiv serve
init sets up Primitiv for the current project, build creates its design contract, and serve makes that contract available to MCP-compatible agents.
See the Primitiv documentation for installation, configuration, commands, and integration guides.
[!IMPORTANT] Keep Primitiv configured at project level. A global MCP configuration can serve the wrong project's contract when you switch repositories.
Capabilities
- Bring design context from your codebase, Figma, and Storybook together
- Make existing tokens, components, rules, and rationale available to agents
- Surface conflicts, drift, and hardcoded token misuse
- Provide read-only access from MCP-compatible agents and editors
- Verify that the contract stays current in CI
Primitiv also checks local JSX usage against each codebase component's complete finite prop domains. Known out-of-domain values produce a pending within-source conflict, even under auto-resolve. Align the JSX usage or widen the declared domain to resolve it. warn reports these conflicts without blocking; error and verify --strict exit with code 2. Dynamic values and incomplete domains remain unknown.
When component evidence cannot be compared, primitiv verify reports a short diagnostic summary. Use primitiv verify --verbose for the reasons, or --json for a structured report. Diagnostics explain uncertainty and do not count as conflicts or directly fail verification; changes to them can still make the saved contract stale. --fast reports saved diagnostics instead of rebuilding them.
Agents can read diagnostic counts in the MCP summary and paginated details through get_design_context with category: "diagnostics".
Component drift in CI
Run primitiv verify against your saved contract to check declared prop facts, finite variant values, observed JSX values, and component relationships. Verification also compares Storybook default args, story args, and control choices, including mapped values. Story labels and other presentation metadata do not count as API drift. Observations and examples describe static source evidence, not runtime frequency or breaking-change severity.
For example, changing a Button usage from size="sm" to size="lg" is detected even when the number of JSX sites stays the same. Drift messages identify the component ID and field path, such as components/Button and usage.props.size.
Normal verification scans current sources in memory and uses their current conflicts for reporting and governance. Introducing or fixing an out-of-domain JSX value takes effect in verification immediately. The saved contract remains the drift baseline and is never rewritten by verification: run primitiv build to refresh it, then verify again. MCP continues serving the saved contract until it is rebuilt and reloaded.
Failed sources and incomplete or truncated evidence cannot prove that an unavailable fact was removed or that a conflict was resolved. Verification reports available changes and comparison uncertainty. Older contracts remain readable; newly available evidence makes them stale until rebuilt.
Stale evidence exits with code 1, or 2 under --strict. Pending conflicts exit with code 2 under error governance or --strict; warn-only conflicts do not independently fail verification. --fast uses saved findings and file modification times instead of scanning current API evidence, so use normal verification in CI. Use --json for the verification result and --verbose for comparison diagnostic details.
Project links
Установить Primitiv в Claude Desktop, Claude Code, Cursor
unyly install primitivСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add primitiv --env FIGMA_ACCESS_TOKEN="" -- npx -y @ai-by-design/primitivПошаговые гайды: как установить Primitiv
FAQ
Primitiv MCP бесплатный?
Да, Primitiv MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Primitiv?
Да, требуются переменные окружения: FIGMA_ACCESS_TOKEN. Unyly подставит их в конфиг при установке.
Primitiv — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Primitiv в Claude Desktop, Claude Code или Cursor?
Открой Primitiv на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Изменения
Версии и запрашиваемые доступы со временем.
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
- Новая версия опубликована
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiSupabase
Database, auth and storage
автор: SupabaseEverything
Reference / test server with prompts, resources, and tools.
Git
Tools to read, search, and manipulate Git repositories.
Sequential Thinking
Dynamic and reflective problem-solving through thought sequences.
Time
Time and timezone conversion capabilities.
Compare Primitiv with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
