Generate Generative UI components for Flutter with your coding agent
Updated 2026-11-17
The short answer
Install the useval CLI and connect it to your coding agent as an MCP server. Ask the agent for a component ("an order summary card with a refund button"); it creates the markup and typed shape, checks it, and starts a live preview. Your Flutter app draws published components with GenUiReplyView. Local authoring needs no account.
1. Connect the CLI to your agent
bash
# Claude Code
claude mcp add --transport stdio useval -- "$HOME/.local/bin/useval" --dir "$PWD" mcp
# Codex
codex mcp add useval -- "$HOME/.local/bin/useval" --dir "$PWD" mcp2. Ask for a component
Create an order summary card with useval. Analyze it and start a local preview. Keep the changes local until I ask you to publish.
3. Or do it by hand
bash
useval components create order_summary
useval analyze
useval serve --port 3000What a component is
Markup that says what it looks like, plus a typed shape: the values it reads, each with a type and a sentence. The shape is the contract your model is held to when it calls the component.
xml
<Card padding="5">
<Column gap="3">
<Text weight="semibold">{{ title }}</Text>
<Text size="sm" color="mutedForeground">{{ body }}</Text>
<Button label="{{ primary }}" action="send_reminders" />
</Column>
</Card>Frequently asked
- Can Claude Code create Flutter generative UI components?
- Yes. Connect the useval CLI as an MCP server and ask for a component; the agent creates, analyzes and previews it locally.
- Do I need an account?
- Not for local authoring. To publish to apps, sign in with useval login.
- Do published components need an app release?
- No. Installed apps draw the new version on the next answer.