Claude Code with preset AI
Use Claude Code with preset AI as a governed design-system runtime.
Setup
One command:
claude mcp add --transport http preset https://mcp.presetai.dev/mcp
OAuth runs on first request. Verify the connection:
claude mcp list
You should see preset with status connected. The full per-tool install matrix lives in Connect an AI coding tool.
Recommended operating loop
The four-step loop that keeps Claude Code aligned with the system:
- Read context first: inspect relevant presets, patterns, and tokens; fetch active constraints for the target file or intent
- Generate with constraints: request code by preset name and semantic intent; avoid hardcoded values and unapproved primitives
- Validate before and after: run pre-generation checks when available; run generated-code validation and drift checks
- Propose before apply (for system-level changes): for new or changed presets or rules, use the proposal lifecycle; apply only after validation and required approvals
Prompting pattern
Structure your prompts like this:
- Intent: what you are building
- Context: target route or component, and constraints
- Required artifacts: preset names, token categories, patterns
- Validation ask: request drift and compliance checks before finalizing
Example:
Build a destructive confirmation flow for account deletion. Use approved destructive presets, token-based colors, and the interaction rules from the design system. Validate generated code and report drift and compliance findings before final output.
Read, generate, apply
Read
- at the start of a task
- when uncertain about naming or policy
- when working in unfamiliar domains or components
Generate
- only after retrieving required constraints or artifacts
- for implementation and refactor suggestions
Apply
- direct apply for low-risk local code changes with passing validation
- proposal + approval path for canonical system artifacts
Common failure patterns
- generating from generic UI patterns without querying preset AI first
- hardcoding style values where tokens exist
- skipping post-generation validation
- applying system-level changes without the proposal workflow
Team policy
Adopt a simple policy:
- No merge without passing drift and compliance checks
- No canonical model writes from AI without a proposal trail
- Require explicit approval in stricter compliance modes
Last reviewed by @jschuyler