Skip to content
bahtuiv0.18.8

AI agents

An agent writing bahtui code should not guess field shapes or rule syntax. bahtui-mcp is a public, stateless MCP server that gives it the same guides the library authors work from, the full component API, and the engine itself, so it can check a schema before handing it to you.

Claude Code:

Terminal window
claude mcp add --transport http bahtui https://bahtui-mcp.20baht-bank.workers.dev/mcp

Any other MCP client (Claude Desktop, Cursor, Windsurf…) takes the same URL over Streamable HTTP:

{
"mcpServers": {
"bahtui": { "type": "http", "url": "https://bahtui-mcp.20baht-bank.workers.dev/mcp" }
}
}

No key, no session, nothing stored. The server is redeployed after each release; overview names the versions it describes.

Tool What it does
overview Start here: the four libraries, the agent workflow, the engine invariants, the doc ids
get_doc One guide, README, spec chapter or the engine’s TypeScript types in full
search_docs Keyword search across every guide, spec, README and component page
find_component The right <baht-*> element for a need (“dropdown”, “upload file”, “kpi tile”)
list_components Every element, one line each
get_component One element’s properties, attributes, events, slots and --baht-* tokens
parse_schema parseSchema: structure, unknown refs, duplicate keys, unsafe patterns, broken transitions
evaluate_rules evaluate: which fields are visible, required, read-only for a data snapshot
walk_path walkPath: which forms a workflow submission visits
validate_submission validateSubmission, exactly as your server would run it, with the canonical data to persist

The last four run the same bank20baht-ui/engine and bank20baht-validator code your app ships, so a schema that passes there passes in the browser and on your server.

The guide/* docs are the Claude Code skills the bahtui repo uses to build itself, bundled into the server on every deploy. When the libraries change, the skills change in the same commit, and the next deploy carries them to your agent.

Doc id Skill in the repo Covers
guide/authoring /bahtui The authoring loop, a worked workflow, rule vocabulary, the hard rules
guide/ui /bank20baht-ui Elements, engine exports, field types and value shapes, registry, theming
guide/validator /bank20baht-validator parseSchema, validateSubmission, verifyReferences, strict mode
guide/store /bank20baht-store Two-way binding, refs, React hooks, Angular signals
readme/stickers /baht-sticker <baht-sticker> and the sticker collection

The repo also keeps /bank20baht-cli (scaffolding and the field DSL), /docs-site and /release for work on bahtui itself.

Use the bahtui MCP server. Read overview and guide/authoring, then build a workflow for a leave request: a manager approval step, and a doctor’s note required only for sick leave. Check it with parse_schema, run both branches with evaluate_rules, and show me a validate_submission call that smuggles a value into the hidden field.

The agent should come back with a schema the engine accepted, not one that only looks right.