Integration
Codex does the task. Windcraft fixes the design language.
The Codex CLI is an agentic coder that runs tasks in your repo. Across tasks the visual language drifts, because each run reasons locally. Windcraft gives Codex a local MCP server to read tokens and contracts from before it writes UI.
Why task-by-task agents drift
Codex executes a task, commits, and moves on. The next task is a fresh context that reasons about its own change, not the card radius or brand hue an earlier task chose. Prose guidance in AGENTS.md helps with conventions, but the model still re-interprets "use our spacing" each run. Without machine-readable values in the loop, each task fills the design gaps with plausible guesses, and they accumulate.
How Windcraft plugs into Codex
The Codex CLI reads MCP servers from its config file. Declare Windcraft there and Codex can call the design tools as part of any task, pulling the exact tokens, contract, and pattern before it generates UI.
- Run npx windcraft init in your repo to generate the config.
- Add a [mcp_servers.windcraft] block to ~/.codex/config.toml.
- Codex calls get_design_tokens / get_component_contract / get_page_pattern during a task.
- Run npx windcraft check to catch any drift before you commit.
Codex CLI MCP config (~/.codex/config.toml)
[mcp_servers.windcraft]
command = "npx"
args = ["windcraft", "mcp"]FAQ
- How is this different from an AGENTS.md file?
- AGENTS.md is prose Codex re-reads and re-interprets per task. Windcraft serves machine-readable values over MCP, so Codex reads the actual radius and hex rather than an adjective. Keep AGENTS.md for conventions; let Windcraft own the measurable design language.
- Does it work in CI / headless runs?
- Yes. The MCP server is launched on demand via npx, so it works wherever Codex runs. For non-interactive runs, npx windcraft check --json gives you a machine-readable drift report you can gate a build on.
- Does my source code leave my machine?
- No. The server and analyzer run locally. Only metadata — tokens, contracts, rule violations — is synced to the cloud.