blockflow-mcp

v2.0.0
blockflow-mcp Checked 1 day ago Published 17 days ago

MCP server (stdio) for the BlockFlow browser extension: validate, run and repair workflows in your real browser.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_workflows List workflows

Lists the workflows saved in BlockFlow (id, name, whether it is switched on, whether it was imported over the bridge). Use an id with run_workflow or get_report.

validate_workflow Validate a workflow

Checks a workflow script or graph strictly, exactly as Import would, without saving or running it. Returns ok and a list of issues, each "<level> <code> at <JSON path>: <message> <hint>". Errors (unknown block type or config key, wrong value type, bad locator…) block import and running; warnings do not. To repair: change the key or value at each path as the hint says (the Repair table in blockflow://guide explains every code), then validate again until ok is true. Always validate before run_workflow.

ParameterTypeDescription
source *The workflow: a BlockFlow script ({"format":"blockflow-script","version":1,"name":"…","steps":[…]}), a graph file ({"format":"blockflow-workflows",…}) or one workflow, either as a JSON object or…

import_workflow Import a workflow

Saves a workflow script or graph into the user's BlockFlow editor (tagged "via bridge", switched off), after the same strict check as validate_workflow. Returns the new workflow ids. replace: true replaces an earlier bridge-imported workflow with the same name instead of adding a copy. Only import when the user wants to keep the workflow; run_workflow can run a source without saving it.

ParameterTypeDescription
source *The workflow: a BlockFlow script ({"format":"blockflow-script","version":1,"name":"…","steps":[…]}), a graph file ({"format":"blockflow-workflows",…}) or one workflow, either as a JSON object or…
replacebooleanReplace a workflow previously imported over the bridge with the same name (default false: add a new one).

run_workflow Run a workflow

Runs a workflow once in the user's browser and waits until it finishes. Pass either workflowId (a saved workflow, from list_workflows) or source (a script or graph, run without saving; it is validated first and invalid sources come back with issues, nothing runs). Returns a summary first: status (passed/failed/cancelled), run id, duration, and for a failure the failing step's id (the step `id` in your script, else s<N> for the Nth step) and block type, error code, message, locator, page URL and matching elements, then every step's status and the step outputs, plus a screenshot of the page at t…

ParameterTypeDescription
screenshotbooleanAttach the failing step's screenshot as an image (default true).
secretsobjectValues for {{secret.<name>}} in the workflow, for this run only (never stored). Keys are secret names, e.g. {"loginPassword": "…"}.
sourceThe workflow: a BlockFlow script ({"format":"blockflow-script","version":1,"name":"…","steps":[…]}), a graph file ({"format":"blockflow-workflows",…}) or one workflow, either as a JSON object or…
timeoutSecondsintegerStop the run after this many seconds (default: no overall limit; each step has its own timeout).
workflowIdstringId of a saved workflow (from list_workflows or import_workflow).

get_report Get a run report

Exports finished runs as a report: json (machine-readable, schema in docs/guide/report.schema.json: every step with input, output, error code, locator, URL), junit (XML for CI) or html (self-contained). Choose runs by runIds, or by workflowId (its latest runs, up to limit); with neither, the latest runs of all workflows.

ParameterTypeDescription
formatstringReport format (default json).
limitintegerHow many runs at most (default: the extension's default).
runIdsarrayRun ids (from run_workflow or run_suite).
workflowIdstringReport the latest runs of this workflow.

snapshot_page Snapshot a page

Returns an outline of a page as the browser sees it (with the user's logins): one line per element, `role "name" [state…] [ref] locator=…`. Copy the locator= part unchanged into click/fill/assert steps; never use the [ref=…] ids. Pass url (opened in a background tab, then closed) or tabId (an open tab). Take a snapshot before writing locators and again after a locator.not-found failure, on the failing step's page URL.

ParameterTypeDescription
tabIdintegerId of an already open browser tab to outline instead.
urlstringAn http(s) URL to open and outline.

stop_run Stop a run

Stops a running workflow before its next block (the run ends as cancelled). runId comes from run_workflow progress messages or list results.

ParameterTypeDescription
runId *stringId of the run to stop.

list_suites List suites

Lists the saved suites (named, ordered lists of workflows run together, like a test suite): id, name, workflow ids, stopOnFailure. Run one with run_suite.

run_suite Run a suite

Runs several workflows one after another and waits for all of them. Pass one of: suiteId or name (a saved suite, see list_suites), or suite (an inline suite: {name, workflowIds?, sources?, stopOnFailure?}, where sources are scripts run without saving; an invalid source fails the suite before anything runs). Returns the overall status, one line per workflow with its failing step, and the reports asked for in formats (json, junit, html).

ParameterTypeDescription
formatsarrayReports to return with the result.
namestringName of a saved suite.
secretsobjectValues for {{secret.<name>}} in the workflow, for this run only (never stored). Keys are secret names, e.g. {"loginPassword": "…"}.
suiteobjectAn inline suite (not saved).
suiteIdstringId of a saved suite.