MCP reference
This page documents Reflow’s own MCP server for connecting coding agents. To test an MCP server you build inside a flow, see the MCP inspector plugin.
Connection surfaces
Section titled “Connection surfaces”| Surface | Entry point | Auth | Capabilities |
|---|---|---|---|
| Local stdio MCP (primary) | reflow mcp (stdio from checkout) | Saved reflow login profile | Full authoring, local plan/apply, live --hold + debug_execution, code coverage, knowledge editing, Review Apps, evidence & downloads, PR comparisons |
| Shell CLI parity | reflow mcp tools / reflow mcp call <tool> [json | @file | -] | Same profile and checkout as reflow mcp | Runs any local MCP tool from a shell script without an agent host; prints raw MCP output and exits 1 on tool error |
| Hosted HTTP MCP | https://mcp.reflow.io/mcp | OAuth 2.1 browser consent | Read runs/screenshots, search flows, manage collections/preferences, save shared KB flows (no local file writes or flow execution) |
Install the CLI and configure your agent to launch reflow mcp over stdio from your application checkout (Agents start here). Reflow infers the Git root and manages the local device service automatically; for desktop hosts launched outside a checkout, set REFLOW_LOCAL_REPO (setup appendix).
Representative author tools
Section titled “Representative author tools”Read the connected tool schemas before calling—local stdio, hosted HTTP, and --knowledge-maintainer profiles expose different tool subsets.
| Job | Tools | Contract |
|---|---|---|
| Product documentation | get_product_docs | List, search, and read bounded excerpts of the packaged product docs. |
| Packaged guidance | load_skill | Load reflow first, then task skills on demand: application-onboarding, knowledge-corpus, flow-authoring, plugin-execution, local-testing, storyboard, test-change, evidence-review, golden-authoring, flow-sweep, review-apps, pr-publishing, plus dynamic user-preferences while a note is set. |
| Collections and links | manage_collections, get_dashboard_links | Create, list, and select application collections (list, create, select); build direct Reflow app links to runs, flows, and reviews. |
| List and find tests | search_flows | Unified flow listing across local, hosted, and knowledge-maintainer profiles: current version ID and hash, tags, golden state and cited runs, needs, covers, last run, and recent counts. Filter by query, prefix, tag, golden, paths / changed_since <sha>, or archived: true. Read-only. |
| Preferences | manage_preferences, load_skill | Read or update personal and team agent instructions (get, set_user, clear_user, set_team, clear_team). Delivered via MCP instructions, reflow, and user-preferences (preferences). |
| Plugins | list_plugins, init_plugins | Inspect installed plugin schemas and exact source pins; initialize or upgrade collection plugins. |
| Local execution | manage_execution | Select target, plan, apply, inspect run/status, taint, cancel, reset, or unlock via the same controller as the CLI. Supports selectors, golden, tag, untagged, and changed_since. |
| Live hold debugging | debug_execution | Inspect a failed execution kept alive by apply --hold (snapshot, screenshot, act, release); re-applying the edited flow continues from the failed step (debugging). |
| Evidence and downloads | get_run_evidence | Discover and read recorded PNGs, mask match counts, non-image plugin artifacts (include_artifacts: true), and downloaded files without rerunning. |
| Saved flows | get_reflow_context, manage_flows, get_flow_source | Inspect collection/storage policy; read exact flow originals; create, save, archive, and unarchive flows through shared state. |
| Knowledge base | search_kb, get_kb_page, manage_knowledge_uploads, manage_knowledge_drafts | Read pinned revisions; prepare 0600 temp edits, upload verified bytes, publish delta manifests, and select roots. |
| Source-driven KB refresh | prepare_knowledge_refresh | Return a bounded task brief for a host-managed knowledge maintainer when committed source changes. |
| Review Apps | manage_review_apps, upload_review_app_asset | Validate, locally preview (action: "preview"), upload assets, create, publish, and share sandboxed HTML/Markdown review pages with <reflow-image>, <reflow-compare>, <reflow-flow>, <reflow-run>, and <reflow-file> (Review apps). |
| Comparisons and review notes | review_changes, manage_review_notes | Publish/read exact base/head comparisons, inspect originals, manage structured review notes, add fresh_review annotations, prepare/export PR comments, and read individual published runs (team_reviews, team_review, team_review_file, remove_review). |
| Code coverage | query_code_coverage | Local connection only: list coverage documents, inspect gaps and line ranges, and compare runs (code coverage). |
Plan and execute with plugins
Section titled “Plan and execute with plugins”Call get_reflow_context to resolve the application collection and storage preference. Load flow-authoring and plugin-execution, inspect list_plugins, keep plugin aliases in flow frontmatter, and keep private connection credentials in device binding files.
- Select the repository, target URL, and group once with
manage_execution(action: "target"). - Inspect
action: "plan"forrun/reuse/wait/blockeddecisions andinputChanges. - Call
action: "apply"with the inspectedfingerprint,storage_fingerprint, and a freshrequest_idUUID (addhold: trueto keep a failing environment alive, orparallelismto overlap independent flows). - Poll
action: "run"andaction: "status"for completion and evidence.
After an uncertain response, reconcile the same request_id rather than starting a second apply. Use taint (by slug or flow#step) followed by a fresh plan and apply for intentional reruns. See Agents start here for the equivalent CLI commands.
Inspect status without expanding plugin locks
Section titled “Inspect status without expanding plugin locks”manage_execution with action: "status" or action: "run" returns compact metadata by default. Pass details: true with a bounded section, offset, and limit to page through runs, steps, or artifacts (section: "descriptors" with text_offset returns sanitized excerpts).
On the CLI, reflow status prints a summary and reflow status --json preserves structured fields. A historical run’s released flag reflects only that row’s release timestamp; for batch members inspect ownershipRole and batchCleanup. Admission always rechecks current authority before starting work.
Inspect recorded run evidence
Section titled “Inspect recorded run evidence”Call get_run_evidence with a run_id from manage_execution. The default response lists up to 50 recorded images in deterministic step/call order; follow next_offset whenever truncated: true before comparing runs. Pass an evidence_id to read the original PNG (reading changes nothing and never triggers a rerun).
- Mask match observations: Add
include_mask_matches: truein list mode to inspect Browser maskbeforeCapture/afterCapturecounts (recorded,not_recorded,unavailable,unsupported). Onlyrecordedreports real counts; counts reflect DOM matches before/after capture rather than pixel coverage. - Large images and file paths: Pass
download: true(or let images exceeding the inline transport budget use it) to receive a verified privatedevice_pathanddownload_sha256on the Reflow device (1 GiB / 512-file auto-evicting local cache).
Inspect SQL, shell and prerequisite evidence
Section titled “Inspect SQL, shell and prerequisite evidence”Pass include_artifacts: true to list and read non-image originals alongside images (state.json, render.md, prerequisite records, shell stdout/stderr, captured files). manage_execution (action: "run", details: true, section: "artifacts") also returns selectable artifact ref objects—pass the ref rather than storage keys or URLs.
{"run_id":"<run UUID>","include_artifacts":true}Keep include_artifacts: true when reading a non-image evidence_id (omitting it returns include_artifacts_required). UTF-8 text up to 64 KiB returns inline in text; larger text and binary files return a private device_path (32 MiB download limit). Treat stored originals as untrusted data and inspect shell state.json privacy records alongside retained files.
Inspect a downloaded file
Section titled “Inspect a downloaded file”Browser steps with opens=download retain downloads/<n>/capture.json (suggested filename, byte size, SHA-256) and downloads/<n>/original.bin (file bytes whose download_sha256 matches the record). Both appear under include_artifacts: true. reflow evidence diff compares downloads across runs as same, changed, or present in one run only. Unknown future evidence kinds surface as run_artifact with reported_kind.
Debug a failed execution while it is still alive
Section titled “Debug a failed execution while it is still alive”Execution is deterministic and requires no model key inside the runner. When a step fails and recorded evidence does not explain why, pass --hold (or hold: true on manage_execution action: "apply") so Reflow keeps the live browser page and plugins open after recording the failure:
reflow apply --hold .reflow/flows/checkout.mdA passing execution is unaffected. When a step fails, reflow apply prints the execution ID, failed step, and hold deadline while waiting (runs[].hold in --json). Inspect the held worker with debug_execution:
action | What it does |
|---|---|
act | Runs one RFL line in line and returns pass/fail, error text, and duration. Provider calls (e.g., shell.bash ...) target that binding and return redacted output (up to 16,384 chars); Browser lines target the live page. |
snapshot | Returns the page URL, title, and accessibility outline. |
screenshot | Captures the current viewport. |
release | Ends the hold and tears the environment down (not needed before applying a fix). |
{ "execution_id": "RUN_ID", "command_id": "FRESH_COMMAND_UUID", "action": "act", "line": "expect css=\".error\" text=\"Card declined\""}Generate a fresh UUID as command_id for each distinct call. To retry after a lost reply (submission_unconfirmed or result_unavailable) or wait on pending / executing, repeat the exact same arguments and command_id—it never runs twice. Hold commands are not recorded as flow steps and do not alter the failed run’s evidence, though they do act on the real application. Flows without Browser accept provider lines only. --hold cannot be combined with --no-wait or --coverage-session.
Edit the flow and continue from the failed step
Section titled “Edit the flow and continue from the failed step”Keep the hold alive, edit the failed step (or later steps), and run reflow apply again in another terminal or tool call:
reflow apply .reflow/flows/checkout.mdThe new execution takes over the held browser and plugins, reuses all passed steps without replaying them, and starts directly at the failed step (recorded as Continued on held environment of execution <id>). The original execution stays failed and exits 1. Pass --hold on the second apply as well if you want to keep the environment on another failure.
The same continuation works for a full collection (reflow apply --hold): flows before the failure are reused, the held flow continues, and remaining flows run on fresh workers (with --parallelism > 1, one eligible hold continues per apply while other holds end and replay fresh). reflow plan previews the exact continuation outcome (execution_id, step_idx, continued, reason, ended_holds, stopped_flows).
Apply ends the hold and replays in a fresh environment whenever continuation is unsafe—such as an edited earlier step, invalidated needs ancestor, --golden, mailbox usage (${MAILBOX}), cleanup steps, LocalBash service, active parallel siblings, or less than 5 minutes left before the worker timeout (timeout: + 5m, minimum 36m). Under --coverage-session, taint the flow before re-applying. A hold also ends on release, Ctrl-C, cancellation, or after at most 30 minutes. See Repair and rerun for the complete reuse matrix.
Build and publish Review Apps
Section titled “Build and publish Review Apps”Load load_skill("review-apps") to assemble interactive HTML or Markdown review pages backed by real Reflow evidence (Review apps):
- Upload images, scripts, stylesheets, or static-site files with
upload_review_app_asset. - Author a
formatVersion: 2manifest (htmlormarkdown, or a static site withpage.entry+page.files) embedding<reflow-image>,<reflow-compare>,<reflow-flow>,<reflow-run>, and<reflow-file>web components so readers inspect real flow source, step rails, and file lines instead of pasted snippets. - Run
manage_review_appswithaction: "validate"to check markup references locally, andaction: "preview"(local stdio only) to render a self-contained HTML file with the exact hosted CSP and sandbox for headless-browser verification before publishing. - Create (
action: "create"), update (action: "update"withexpectedDraftRevision), and publish (action: "publish"with exactmanifestHash) to get a stableviewUrland pinnedrevisionUrl. - Control sharing with
set_visibility(private/public),set_expiration,grant_access,list_access, andrevoke_access(usingexpectedAccessRevision). Reconcile uncertain writes withaction: "publication"rather than blindly retrying.
Prepare a PR for human review
Section titled “Prepare a PR for human review”- Read pinned application knowledge with
search_kbandget_kb_pageafter loadingknowledge-corpus. Update stale product facts in place and keep change rationale outside corpus pages. - Plan and apply the collection’s flows with
manage_execution, inspect original source, step results, and screenshots, and keep the controller’s run and artifact links. To freeze a run for sharing without rerunning it, usemanage_executionreview_source,prepare_review, andpublish_review(test storage). - For committed source changes, call
prepare_knowledge_refreshwithbase_ref,candidate_ref, and the selected knowledge revision/hash so your host can run a fresh knowledge-maintainer check. - Choose how to deliver human-ready review artifacts:
- Review App: Publish an interactive review page via
manage_review_apps(Review apps). - Inline GitHub PR review: Load
pr-publishingand post a summary plus line-anchored diff comments asreflow-code-review[bot]viareflow pr review <number> --head <sha> -F review.md --comments-file comments.json(PR review). - Structured comparison & export: Publish an exact base/candidate selection with
review_changes(keepingidandselectionHashtogether), optionally have a separate fresh reviewer inspectreview_packetand addbasis: "fresh_review"annotations, then callprepare_commentandexport_comment(with a new absoluteoutputDirectoryon the daemon device). These actions do not post or upload. Inspect the output and receipt after any uncertainty before retrying.
- Review App: Publish an interactive review page via
Human links use the configured application origin and normal team permissions. Missing evidence cannot be waived by an agent’s LGTM; human acceptance belongs to PR merge.
Visual results and repairs
Section titled “Visual results and repairs”Visual checkpoints use Browser snapshot (for example site.snapshot name="hero" selector="#hero" mask=".timestamp")—Reflow stores no approved baseline and visual differences never fail a run.
After manage_execution apply finishes, a compact action: "run" read includes a visual comparison against a qualifying reference run (compared, no_reference, no_snapshots, or unavailable; pass visual_compare: false to skip). Never read unavailable as “same”. For each entry in visual.differences, inspect both sides with get_run_evidence, judge whether the change is expected or a regression, and record the finding in your report or via review_changes action: "annotate" (Snapshots and review).
To repair a failure, your coding agent diagnoses the cause (using hold: true and debug_execution when live inspection helps), patches the application or flow, and runs plan and apply again. Changed inputs and dependencies invalidate affected steps automatically. Preserve the original failure and verify candidate outcomes before claiming a fix (Repair and rerun).
Reading comparison originals
Section titled “Reading comparison originals”Use review_changes (action: "file", id, selectionHash, sourceId, blobId) to inspect comparison originals (blobId: "manifest" returns run descriptors). Images return image content and text pages by UTF-16 textOffset / nextOffset; pass maxBytes (1–24576, default 6144) or byteOffset (with textOffset: 0) for base64 binary paging verified against contentHash and bytes.
Remote HTTP API connection
Section titled “Remote HTTP API connection”The streamable-HTTP MCP server is hosted at:
https://mcp.reflow.io/mcpIt uses OAuth 2.1 browser consent:
claude mcp add --transport http reflow-remote https://mcp.reflow.io/mcpHosted tools include get_me, get_context, get_reflow_context, manage_collections, manage_flows (shared KB saves and repository drafts, no local file writes), manage_preferences, search_flows, tail_run, list_runs, get_run, and get_run_screenshot. The hosted server runs no flows—execute tests on the author device with manage_execution and read results from either surface. See API and tokens and GitHub Actions.
Operational and recovery reference
Section titled “Operational and recovery reference”Connection, retained state and authority
Section titled “Connection, retained state and authority”A reflow login sign-in lasts 30 days; once expired or revoked, CLI and MCP ask you to run reflow login again while preserving your profile and retained local work. Shared writes require an active API connection and a matching server acknowledgement; retain operation identities after uncertainty and inspect them before retrying.
Downloaded knowledge and retained evidence can be read offline (missing content and omissions are reported explicitly), though cached bytes never establish current access or approval. manage_local_workspace_storage reports cache budgets; local execution originals stay under a 10 GiB admission target across profiles while downloaded knowledge caches auto-evict.
To run the device service under your own supervisor instead of autospawn, set REFLOW_SIDECAR_NO_AUTOSPAWN=1 (reports autospawn_disabled if stopped; unreadable review-password reports credential_unreadable). Frozen review publication (reflow_knowledge_reviews) and get reads wait briefly for a starting sync connection; state: rejected with submission: not_submitted means nothing was submitted, while unconfirmed requires inspecting the same IDs before retrying.
Device service ownership
Section titled “Device service ownership”One device service runs per profile and belongs to the Git checkout and profile that started it. CLI commands share the running service because target, plan, and apply name their repository on every call. An MCP server must match its service:
- The profile records its home checkout (the running service’s checkout, or the first MCP server’s checkout; a missing home checkout passes to the next MCP server).
- An MCP server launched from any other checkout or Git worktree uses a private lane at
<profile>/checkouts/<name>-<hash>with its own device service, device identity, and target (select a target for that lane withmanage_executionaction: "target"). Lanes share the profile’s login. - A service from another release or a CLI-started service for a different checkout returns
daemon_conflictnaming PID, checkout, runtime, and mismatch. A service started outside any Git checkout is replaced once idle by the first MCP server from a checkout.
Manage services cleanly with:
reflow service status --profile-dir <profile>— inspect PID, port, checkout, and runtime without starting a service.reflow service stop --profile-dir <profile>— retire an idle service (refuses while work is running and kills nothing).reflow service status --profile-dir <profile>/checkouts/<lane>— inspect a checkout lane.
Upgrades and reconnects
Section titled “Upgrades and reconnects”Run reflow upgrade in the same installation (update guide). It preserves plugin locks (reflow init --upgrade updates them) and never carries over trusted local code execution. The stdio supervisor switches compatible server code between calls without replaying delivered mutations, waiting for running device work. Incompatible supervisor or protocol versions return update_required; hosts that cache tool schemas need a reconnect or fresh session when tools change.
Compact authoring responses
Section titled “Compact authoring responses”get_reflow_context, manage_collections, and manage_flows return compact plugin lock summaries by default (include_plugin_lock: true returns full descriptors). reflow flows save prints human-readable receipts (--json returns full fields); treat pending or unconfirmed receipts as uncertain until inspected. For manage_knowledge_uploads action: "root_operation", omit operation_id to inspect the latest retained attempt for that app and root_selection_id, or pass operation_id for a specific attempt.
Knowledge uploads from local files
Section titled “Knowledge uploads from local files”Local manage_knowledge_uploads action: "upload" accepts app and one of content or file_path (from prepare_edit or read-only checkout import; UTF-8 max 256 KiB preserving BOM/CRLF; see Edit application knowledge). Retain upload_id and operation_id to reconcile unconfirmed transfers; verify returning incomplete means resume upload with the same upload_id, a fresh operation_id, and exact bytes. Use delete to abandon unused reservations (full author profile required; published references cannot be deleted).
Recover a blocked test-data reset
Section titled “Recover a blocked test-data reset”manage_execution action: "reset" rotates named generated values and mailbox identities without deleting application records or clearing execution uncertainty. It refuses active ownership or unresolved terminal outcomes (state=blocked, code=reset_blocked, bounded blockers), including live same-group device work across profiles and older runs outside status’s 50-run window.
After inspecting every listed terminal uncertain run and checking application state, acknowledge the exact blocker digest:
reflow reset --jsonreflow reset --expected-epoch <generation> --idempotency-key <request-id> \ --acknowledge <blocker-set-digest> --reason "Inspected the outcomes; rotating test data is safe"MCP manage_execution action: "reset" accepts the same expected_epoch, request_id, and acknowledgement: {blockerSetDigest, reason}. Active/queued work cannot be acknowledged—reconcile or cancel it first. Changed blockers invalidate the digest and clear stale acknowledgements while keeping the request ID and generation. Acknowledgement never marks a run passed or replays work; inspect the next plan before applying.
Review annotation text limits
Section titled “Review annotation text limits”review_changes annotate accepts content.comment up to 256 Unicode code points on one line without leading or trailing whitespace. A lgtm annotation requires comment: ""; use verdict comment for findings and never omit a material finding to fit an LGTM.
Failed-run visual receipts
Section titled “Failed-run visual receipts”A controller run that fails an assertion can still retain comparable screenshots from earlier steps when its failed receipt is definite and its retained-failure original verifies against that result and evidence keys. The receipt stays non-reusable (evidenceComplete=false), the run stays failed, and skipped steps are not passing coverage. Failed receipts without a retained-failure original remain ambiguous and are never silently upgraded; when checkpointCoverage=not_recorded, the checkpoint list is not a complete inventory.
Report Reflow issues
Section titled “Report Reflow issues”Use give_feedback in local or hosted MCP—or reflow feedback from the CLI—to report bugs or friction with sanitized diagnostics (omit credentials, cookies, auth codes, and customer data):
reflow feedback "The upgrade status was unclear" --category friction --impact annoyingreflow feedback --file report.json --jsonInclude minimal reproduction steps, expected vs. actual behavior, CLI/OS/browser versions, relevant run/request/collection IDs, and --log-level debug (REFLOW_LOG_LEVEL=debug) excerpts such as plan_timings (Plan and apply output). Never repeat an uncertain mutation just to collect logs.