Contracts
face.json turns component rules into something an agent can actually obey.
The workbench is visual. The engine is the boundary that turns component rules into validated output instead of hopeful JSX.
npx userface connect
npx userface-engine mcp-serve{
"pattern": "dashboard",
"root": {
"type": "Page",
"children": [
{ "type": "Card", "props": { "title": "Current plan" } },
{ "type": "Table", "props": { "columns": ["invoice", "amount", "status"] } }
]
}
}Use the engine when AI needs a machine-readable UI surface instead of component docs, screenshots, and vibes.
face.json turns component rules into something an agent can actually obey.
23 rule ids catch unknown props, broken composition, ARIA issues, and drift.
ui@1 can become React, Vue, or HTML after the structured screen is checked.
15 tools expose contracts, patterns, tokens, validation, and materialization to agents.
Userface validates structured composition first, then materializes to app code. Preview and patch review stay tied to the same output.
{
"mcpServers": {
"userface-engine": {
"command": "npx",
"args": ["userface-engine", "mcp-serve"]
}
}
}If generated UI keeps violating your design system, this is the layer that makes the promise enforceable.