MCP server
Agent workflow
The server states its own expectations on connect. They come down to: read before you write, carry the revision, and audit afterwards.
The order
- list_flow_sites, then get_flow_siteFind the site — never assume an id from an earlier session — and read its outline: pages, section ids and titles, tokens, the global header and footer, publish state. No source, so it stays small.
- get_flow_webflow_rulesFetch the enforced rules once, before the first write, rather than working from a remembered copy.
- set_flow_design_tokensThe whole vocabulary first — colours, font families, a font-size scale, a spacing scale, radii, shadows. Every one of those values in section CSS must be a
var(--name); a typed-out value is refused. - set_flow_site_cssThe shared components once — buttons, containers, headings, cards — with variants as combo classes. Sections use them as they are.
- get_flow_style_guideBefore each page: the tokens and shared classes in one small read, instead of reading other sections to match them.
- build_flow_pageA page's sections in one call — it can create the page too. Build the header and footer once, with
global_slot, on the first page. Every section is checked before anything is stored, so a refused build leaves no half-page behind. - Edit what exists
get_flow_sectionreturns exact source and the revision you will need. Pass it toupdate_flow_sectionor the element tools; the receipt carries the next revision. - audit_flow_site, then publish_flow_siteConfirm the page or site passes and uses its tokens, then put it online.
Revisions are not optional
Every update and delete takes the updated_at revision of the thing it is changing. A write carrying a stale revision is refused.
This is what makes it safe to have an agent and a human editing the same site: the second writer is told their view is out of date instead of silently overwriting the first.
Editing elements rather than whole sections
Rewriting a whole section to change one button is wasteful and risks collateral changes. For precise edits:
inspect_flow_sectionfirst — it returns stable selectors and the element structure.- Then
add_flow_element,update_flow_elementorremove_flow_elementagainst one exactly-matched selector.
Each of those can also replace the section's complete CSS and JavaScript in the same call, which is how you keep styles in step with a markup change.
When a write is rejected
A rule violation returns HTFLOW_WEBFLOW_RULES_VIOLATED and the section is not saved. The right response is to regenerate the section so it satisfies the rules — not to retry the same source, and not to work around the check.
A design-system violation returns HTFLOW_DESIGN_SYSTEM_VIOLATED with the offending declarations and the site's token names, so the fix is one pass: swap each typed value for the right token, or add the token first.
verify_flow_section runs both checks without writing, so a section can be confirmed before a write is spent on it.