Skip to content

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.

SurfaceEntry pointAuthCapabilities
Local stdio MCP (primary)reflow mcp (stdio from checkout)Saved reflow login profileFull authoring, local plan/apply, live --hold + debug_execution, code coverage, knowledge editing, Review Apps, evidence & downloads, PR comparisons
Shell CLI parityreflow mcp tools / reflow mcp call <tool> [json | @file | -]Same profile and checkout as reflow mcpRuns any local MCP tool from a shell script without an agent host; prints raw MCP output and exits 1 on tool error
Hosted HTTP MCPhttps://mcp.reflow.io/mcpOAuth 2.1 browser consentRead 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).

Read the connected tool schemas before calling—local stdio, hosted HTTP, and --knowledge-maintainer profiles expose different tool subsets.

JobToolsContract
Product documentationget_product_docsList, search, and read bounded excerpts of the packaged product docs.
Packaged guidanceload_skillLoad 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 linksmanage_collections, get_dashboard_linksCreate, list, and select application collections (list, create, select); build direct Reflow app links to runs, flows, and reviews.
List and find testssearch_flowsUnified 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.
Preferencesmanage_preferences, load_skillRead 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).
Pluginslist_plugins, init_pluginsInspect installed plugin schemas and exact source pins; initialize or upgrade collection plugins.
Local executionmanage_executionSelect 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 debuggingdebug_executionInspect 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 downloadsget_run_evidenceDiscover and read recorded PNGs, mask match counts, non-image plugin artifacts (include_artifacts: true), and downloaded files without rerunning.
Saved flowsget_reflow_context, manage_flows, get_flow_sourceInspect collection/storage policy; read exact flow originals; create, save, archive, and unarchive flows through shared state.
Knowledge basesearch_kb, get_kb_page, manage_knowledge_uploads, manage_knowledge_draftsRead pinned revisions; prepare 0600 temp edits, upload verified bytes, publish delta manifests, and select roots.
Source-driven KB refreshprepare_knowledge_refreshReturn a bounded task brief for a host-managed knowledge maintainer when committed source changes.
Review Appsmanage_review_apps, upload_review_app_assetValidate, 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 notesreview_changes, manage_review_notesPublish/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 coveragequery_code_coverageLocal connection only: list coverage documents, inspect gaps and line ranges, and compare runs (code coverage).

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.

  1. Select the repository, target URL, and group once with manage_execution (action: "target").
  2. Inspect action: "plan" for run / reuse / wait / blocked decisions and inputChanges.
  3. Call action: "apply" with the inspected fingerprint, storage_fingerprint, and a fresh request_id UUID (add hold: true to keep a failing environment alive, or parallelism to overlap independent flows).
  4. Poll action: "run" and action: "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.

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: true in list mode to inspect Browser mask beforeCapture / afterCapture counts (recorded, not_recorded, unavailable, unsupported). Only recorded reports 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 private device_path and download_sha256 on 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.

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:

Terminal window
reflow apply --hold .reflow/flows/checkout.md

A 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:

actionWhat it does
actRuns 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.
snapshotReturns the page URL, title, and accessibility outline.
screenshotCaptures the current viewport.
releaseEnds 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:

Terminal window
reflow apply .reflow/flows/checkout.md

The 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.

Load load_skill("review-apps") to assemble interactive HTML or Markdown review pages backed by real Reflow evidence (Review apps):

  1. Upload images, scripts, stylesheets, or static-site files with upload_review_app_asset.
  2. Author a formatVersion: 2 manifest (html or markdown, or a static site with page.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.
  3. Run manage_review_apps with action: "validate" to check markup references locally, and action: "preview" (local stdio only) to render a self-contained HTML file with the exact hosted CSP and sandbox for headless-browser verification before publishing.
  4. Create (action: "create"), update (action: "update" with expectedDraftRevision), and publish (action: "publish" with exact manifestHash) to get a stable viewUrl and pinned revisionUrl.
  5. Control sharing with set_visibility (private / public), set_expiration, grant_access, list_access, and revoke_access (using expectedAccessRevision). Reconcile uncertain writes with action: "publication" rather than blindly retrying.
  1. Read pinned application knowledge with search_kb and get_kb_page after loading knowledge-corpus. Update stale product facts in place and keep change rationale outside corpus pages.
  2. 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, use manage_execution review_source, prepare_review, and publish_review (test storage).
  3. For committed source changes, call prepare_knowledge_refresh with base_ref, candidate_ref, and the selected knowledge revision/hash so your host can run a fresh knowledge-maintainer check.
  4. 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-publishing and post a summary plus line-anchored diff comments as reflow-code-review[bot] via reflow 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 (keeping id and selectionHash together), optionally have a separate fresh reviewer inspect review_packet and add basis: "fresh_review" annotations, then call prepare_comment and export_comment (with a new absolute outputDirectory on the daemon device). These actions do not post or upload. Inspect the output and receipt after any uncertainty before retrying.

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 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).

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.

The streamable-HTTP MCP server is hosted at:

https://mcp.reflow.io/mcp

It uses OAuth 2.1 browser consent:

Terminal window
claude mcp add --transport http reflow-remote https://mcp.reflow.io/mcp

Hosted 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.

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.

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 with manage_execution action: "target"). Lanes share the profile’s login.
  • A service from another release or a CLI-started service for a different checkout returns daemon_conflict naming 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.

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.

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.

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).

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:

Terminal window
reflow reset --json
reflow 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_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.

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.

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):

Terminal window
reflow feedback "The upgrade status was unclear" --category friction --impact annoying
reflow feedback --file report.json --json

Include 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.