state-blueprint-mcp
Enables automation and external tool interaction with a digital business process model through structured API tools for model editing, validation, and export.
README
Digitalisierungsplanung
Zustand is a standalone visual FSM builder for understanding, modeling, testing, and exporting digital business processes.
The repository is intentionally narrow. It contains the app, its generated preview runtime, the MCP/API control layer, and the tests that protect the state-machine contract.
Screenshots
These screenshots are generated from the real state.html app in CI after successful pushes, so the README stays aligned with the current UI.
The editor keeps the process, the generated app, and the global-state contract visible in one place.

The preview is the same FSM running as an app. Buttons and widgets fire real transitions and write through the global JSON bus.

The state inspector edits the selected state's trigger, widgets, screen fields, and scoped bus data without creating hidden local state.

Contract
There is one source of truth:
global JSON state/event bus
Everything that affects flow or data must be represented in the model and must read from or write to that bus through the official runtime path.
Allowed local state:
- Drag, hover, focus, and selection affordances.
- Viewport pan/zoom.
- Animation frame and timer handles.
- Temporary editor UI state.
Not allowed:
- Hidden component stores.
- DOM-only flow decisions.
- Stored HTML as component truth.
- Preset caches that act like runtime data.
- Shadow copies of
state.current, transition results, widget values, or flow state. - Legacy migrations or demo-specific behavior paths in the core model.
Repository
.
|-- index.html
|-- state.html
|-- package.json
|-- playwright.config.js
|-- tests/
|-- mcp/
|-- docs/
| `-- state-blueprint-mcp.md
|-- statereadme.md
|-- CNAME
|-- .github/workflows/deploy.yml
`-- .gitea/workflows/test.yml
App
state.html contains the visual editor host and the generated preview runtime.
Main responsibilities:
- Model normalization and validation.
- Canvas rendering, SVG ports, boundary proxies, routing, drag/drop, pan, and zoom.
- State inspector and render editor.
- Global state/data tree UI.
- Data defaults, data types, data wires, repeat mappings, and fetch-on-enter configuration.
- DaisyUI preset catalog and preset instantiation.
- Generated app preview runtime.
- Save/load/export/import helpers.
The file stays self-contained so it can be served as a single static app.
Runtime
The generated preview runtime is bus-driven:
- Host sends
STATE_BLUEPRINT_MODEL. - Runtime sends
STATE_BLUEPRINT_RUNTIME_STATE. - Runtime asks the host to open external links with
STATE_BLUEPRINT_OPEN_URL.
Runtime rules:
defaultContext(model)creates bus defaults such asstate.current,state.previous,state.lastTransition, andruntime.paused.runtimeSet(...)andwriteRuntimeState(...)are the write path into the bus.- Entry effects, such as fetch, run on state entry, not during render.
- Render reads the model plus the bus. It does not invent model state.
MCP/API
The MCP layer is the structured API surface for automation and external tools. It edits the same canonical JSON model as the app.
Main tools:
state_blueprint_get_modelstate_blueprint_replace_modelstate_blueprint_apply_actionsstate_blueprint_plan_promptstate_blueprint_apply_promptstate_blueprint_validatestate_blueprint_export_definitionstate_blueprint_export_htmlstate_blueprint_import_definitionstate_blueprint_action_catalog
Run the MCP server:
STATE_BLUEPRINT_MODEL_PATH=./state-blueprint.workspace.json npm run mcp:state
The API applies ordered model actions, normalizes the result, validates the contract, and persists only the canonical JSON model. It does not click the UI and does not keep a parallel runtime store.
Full API documentation: docs/state-blueprint-api.md
Tests
The tests are part of the architecture.
core-contracts.spec.jsprotects source-level and browser-level contracts.state-tool.spec.jsis the broad app smoke suite for canvas, proxies, nested states, routing, presets, Daisy behavior, touch gestures, undo/redo, render ordering, save/load, and preview behavior.nested-runtime-regressions.spec.jsprotects generated app flow through composite states.state-blueprint-mcp.spec.jsprotects the MCP/API contract.
Run:
npm test
npm run test:contracts
npm run test:full
Deploy
The GitHub Pages workflow runs the smoke suite before publishing the static app.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。