flutter_mcp_ui_generator library
Flutter MCP UI Generator
A comprehensive toolkit for generating JSON UI definitions compatible with MCP UI DSL v1.0/v1.1 specification and flutter_mcp_ui_runtime.
This package provides:
- JSON generation for applications, pages, and widgets
- Fluent API builder for programmatic UI construction
- Support for all action types (tool, state, navigation, resource, batch, conditional)
- v1.1 client actions, permissions, and bidirectional channels
- Helper methods for common patterns
Classes
- ApplicationBuilder
- BoxBuilder
- Builder for box widgets (MCP UI DSL v1.0)
- BundleUiWriteAdapter
-
Write adapter that implements
UiPortfrom mcp_bundle. - CardBuilder
- CCodeGenerator
- CenterBuilder
- CounterTemplate
- Counter template: counter value with increment/decrement buttons
- CppCodeGenerator
- DartCodeGenerator
-
Generates Dart source code that returns the MCP UI DSL JSON as a
Map<String, dynamic>. - DashboardTemplate
- Dashboard template: card grid with metric cards
- FormTemplate
- Form template: form with fields, validation, and submit
- GoCodeGenerator
- Generates Go source code that produces MCP UI DSL JSON.
- GridViewBuilder
- JavaScriptCodeGenerator
- Generates JavaScript (ESM) source code that produces MCP UI DSL JSON.
- LinearBuilder
- Builder for linear layout (MCP UI DSL v1.0)
- ListDetailTemplate
- List-detail template: master-detail layout with list and detail pane
- ListViewBuilder
- LoginTemplate
- Login template: login form with username/password and auth action
- MCPUIBuilder
- Fluent API for building MCP UI definitions
- MCPUIJsonGenerator
- MCP UI JSON Generator v1.0
- MCPUIWidgetBuilders
- PageBuilder
- PythonCodeGenerator
- Generates Python source code that produces MCP UI DSL JSON.
- QuickBuilders
- Quick builder functions for common patterns
- SettingsTemplate
- Settings template: settings page with toggles, selects, and sections
- StackBuilder
- Template
- Base class for all templates
- TypeScriptCodeGenerator
- Generates TypeScript source code that produces MCP UI DSL JSON.