· 5 min read · Alican

Design tokens for Cursor, without the copy-paste.

Cursor writes great code fast, then drifts on design. Here is how to give it your design tokens so the values it writes are the values you decided.

Cursor is fast. Ask it for a settings page and you get a settings page in seconds. Look closely and the spacing is 14px in one card and 16px in the next, the radius drifts from 8 to 12, and the 'primary' button is a slightly different blue than the one three files over. None of it is wrong. None of it matches.

The reason is simple: Cursor has no idea what your design tokens are. It is guessing reasonable defaults, file by file, with no memory of the decisions you already made.

Pasting tokens into the prompt does not scale

The first instinct is to paste your token list into .cursorrules or the chat. It works for one generation. By the next session it has scrolled out of context, and prose like 'use rounded corners' is open to interpretation every single time. Rules written as sentences decay; values do not.

Give Cursor the values, not a description of them

Windcraft holds your tokens — color, spacing, typography, radius, shadow, z-index — as values, and exposes them to Cursor over MCP. You point Cursor at the windcraft MCP server, and it can call get_design_tokens to read the real numbers before it writes a line.

  • Edit tokens once in the dashboard.
  • windcraft sync writes them out as a Tailwind config, CSS variables, a React Native theme, TypeScript types, and a tokens JSON.
  • Cursor reads the tokens through MCP and writes against them — not against a guess.

Then check that it actually used them

Reading tokens is half the loop; the other half is enforcement. windcraft check statically analyzes your .ts, .tsx, .js, and .jsx files and flags hardcoded values that should have been a token — a raw rgba(0,0,0,0.06) where a shadow token belongs, a rounded-[8px] where radius.md belongs. Run it with --fix and the safe ones are rewritten for you.

A prompt tells Cursor what you want this time. Tokens tell it what you decided every time.

The setup is three commands: windcraft init, windcraft sync, windcraft mcp. After that, the consistency is structural — it does not depend on remembering to say 'make it match' in the next prompt.