Skip to content
TrademarkTrademark
Docs
Docs

AI Coding (MCP)

Updated: October 11, 2026
View on GitHub

About

Once UI is an agent-first design system that empowers indie creators to build high-quality, responsive apps — without wrestling with complexity. Designed for AI-native workflows, it turns abstract intent into concrete interfaces with minimal syntax.

For writing UI code, use the harness — not full doc pages. Bootstrap plus one task bundle is about 45–50KB, read in two or three steps.

Artifact
URL
When to load
Manifest/ai/manifest.jsonEntry point — lists all harness files, and in imports every entry point (/data, /code, /media, /mdx, /next, /config) with its exports
Compact rules/ai/rules.compact.mdAlways, before any UI task (~7KB)
Component catalog/ai/catalog.jsonPick components by purpose; also lists the icon names
Task index/ai/tasks/index.jsonMatch user intent → a task id (pricing, dashboard…)
Task bundle/ai/bundles/pricing.jsonOne file per task: the task, every component slice it names, their types, mixins and gotchas
Component slice/ai/components/Grid.jsonOnly for a component the bundle doesn't have — one file per component, with its types and importFrom when it is not on the package root
Tokens/ai/tokens.jsonDesign tokens, mixins and layout shorthands
Functions/ai/functions.jsonThe hooks and helpers (useHotkeys, defineConfig, createMdxComponents, the OG route handlers) with their signatures and types
Spec/ai/spec.jsonEverything above in one 131KB file, for tooling. Agents don't need it
Gold example/ai/examples/*.tsxMimic structure for the task type
Pro blocks/ai/examples/blocks/manifest.jsonProduction-quality composition references
Gotchas/ai/gotchas.jsonWhen using Background, Card, RevealFx, Fade, and for the behaviour fixed in 2.1 (Toast, NumberInput, Select, ContextMenu)

npm imports (version-pinned):

Machine-readable discovery: onceUi field in @once-ui-system/core package.json.

Workflow:

  1. Load rules.compact.md and catalog.json
  2. Resolve intent → pick a task from tasks/index.json and read its bundle (e.g. bundles/pricing.json). Read everything you need in one step: an agent re-sends every file it has read on each later turn
  3. Fetch a component slice only for a component the bundle doesn't have
  4. Read the gold example for structure; for production fidelity, read matching Pro blocks from examples/blocks/manifest.json
  5. Generate code
  6. Validate: npx once-ui-validate-ai-code path/to/file.tsx (in a Next.js app it also checks that LayoutProvider comes from @once-ui-system/core/next)

MCP Server (exploratory docs)

For how does X work? questions, agents can pull docs through Context7's MCP server.

To configure it:

  1. Open mcp_config.json in File / Preferences / Settings / Plugins

  2. Add the following configuration:

  1. Restart your IDE
  2. Run: get-library-docs /once-ui-system/core

Use Context7 for exploration. Use the harness for codegen.

Syntax advantage

Compared to Tailwind + shadcn, Once UI yields more compact output, with cleaner, more natural syntax — semantic Row/Column, token props, and purpose-built components.

That compactness only pays off when agents load the harness and follow the rules — especially layout shorthands (fill, center), surface recipes, and component appropriateness (Card is interactive-only).

Edit this page on GitHub