MCP Support
Batoi UIF is MCP-ready at the interface layer. It provides browser-native surfaces for AI and Model Context Protocol workflows, while the MCP server and privileged tool execution stay on the governed backend.
Use this model for Batoi RAD pages, Build workspaces, Micro Apps, dashboards, approval flows, and documentation-backed AI assistants.
Open the Batoi UIF MCP Preview to test safe chart, component, dashboard, and markup draft outputs.
Architecture
Supported UI Surfaces
data-uif="ai-action"for AI-assisted controls and generated output panelsdata-uif="tool-approval"for approval review before a governed backend action- Prompt panels for request editing and confirmation
- Streaming text surfaces for progressive responses
- Policy check summaries for warnings and blocked actions
- Result cards for completed validation, generation, and draft work
- Audit timelines for request, approval, execution, result, and failure evidence
- Chart and spec previews for dependency-free dashboard generation
MCP Server Capabilities
The public MCP support scope is read-only and low-risk:
- documentation resources
- schema resources
- safe generation prompts
- component and chart discovery tools
- chart spec validation
- Flint-compatible chart conversion
data-uif-*markup validation- dependency-free markup generation
Draft creation, source changes, publishing, deployments, email, payments, and database operations require authenticated backend workflows, explicit approval, policy checks, rate limits, idempotency keys, and audit records.
Security Model
Browser UI is not authorization.
Approval confirmation is not authorization.
The backend must still authenticate the user, authorize the operation, validate the input, enforce policy, rate-limit the request, write audit records, and keep credentials server-side.
Do not run these operations from the browser:
- database access
- file writes
- GitHub commits
- deployments
- email sending
- payment actions
- MCP server invocation
- credential handling
- permission decisions
- authoritative audit logging
Public Read-Only Endpoint
The public read-only endpoint supports early MCP discovery and validation:
/resources/uif-mcpThe endpoint supports JSON-RPC style requests for read-only resources, prompts, and tools. It does not expose private customer data, credentials, database writes, filesystem writes, deployments, email, or payment actions.
Use the hosted preview surface for safe chart, component, dashboard, and markup draft checks:
/resources/uif-mcp-previewExample tool discovery request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Example chart validation request:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "uif.validate_chart_spec",
"arguments": {
"spec": {
"chartType": "Line Chart",
"encodings": {
"x": {"field": "quarter"},
"y": {"field": "revenue"}
}
},
"data": [
{"quarter": "Q1", "revenue": 120},
{"quarter": "Q2", "revenue": 180}
]
}
}
}Tool Approval Markup
Use Batoi UIF to render the approval surface. Send the user's decision to a governed backend endpoint, then let the backend make the authorization and execution decision.
<section
data-uif="tool-approval"
data-uif-request-id="req_123"
data-uif-tool="uif.generate_chart_markup"
data-uif-risk="low"
data-uif-title="Generate chart markup">
<p>Review the generated chart markup before inserting it into a governed draft.</p>
<button type="button" data-uif-action="approve">Approve</button>
<button type="button" data-uif-action="reject">Reject</button>
</section>Browser events should be treated as user intent only:
{
"requestId": "req_123",
"tool": "uif.generate_chart_markup",
"risk": "low",
"decision": "approve",
"payload": {},
"clientTimestamp": "2026-07-04T00:00:00.000Z"
}Chart Validation Example
Use data-uif="chart" for generated chart markup:
<div
data-uif="chart"
data-uif-chart-type="line"
data-uif-data='[{"label":"Q1","value":120},{"label":"Q2","value":180}]'
data-uif-chart-options='{"title":"Quarterly revenue"}'>
</div>For Flint-compatible inputs, validate or convert the chart spec through the server boundary before rendering it in a preview.
Implementation Path
| Phase | Scope | Acceptance |
|---|---|---|
| 0 | Public docs and security model | Developers can explain that UI renders in the browser and tools execute on the server |
| 1 | Read-only MCP resources, prompts, and validators | MCP clients can discover and validate without side effects |
| 2 | Chart and markup generation | Generated output is dependency-free and warning-aware |
| 3 | Governed draft workflow | Authenticated drafts have preview URLs and audit records |
| 4 | Optional high-risk actions | Write-like tools require explicit approval, role checks, policy, dry-run, audit, and rollback or review |