Skip to content

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

  1. list_flow_sites, then get_flow_site
    Find 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.
  2. get_flow_webflow_rules
    Fetch the enforced rules once, before the first write, rather than working from a remembered copy.
  3. set_flow_design_tokens
    The 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.
  4. set_flow_site_css
    The shared components once — buttons, containers, headings, cards — with variants as combo classes. Sections use them as they are.
  5. get_flow_style_guide
    Before each page: the tokens and shared classes in one small read, instead of reading other sections to match them.
  6. build_flow_page
    A 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.
  7. Edit what exists
    get_flow_section returns exact source and the revision you will need. Pass it to update_flow_section or the element tools; the receipt carries the next revision.
  8. audit_flow_site, then publish_flow_site
    Confirm 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_section first — it returns stable selectors and the element structure.
  • Then add_flow_element, update_flow_element or remove_flow_element against 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.