rf_live_* key, point your agent at mcp.runflow.io, and you have:
- A
generatetool that runs any Runflow model or Solution and waits for the result. - A
list_modelstool that filters the live catalog. - One
/runflow:<slug>slash command per active Solution, auto-generated from the catalog. - The Runflow agent skill returned as MCP
initializeinstructions, so the Solutions-first decision rule is in context for the whole session.
The MCP server is the fastest path for agents that already speak MCP. If your runtime does not speak MCP, integrate via the regular REST API — the MCP server is a convenience layer, not a different product.
Connect in 30 seconds
Get an
rf_live_* key from the dashboard under Settings → API keys. Service keys (rf_svc_*) are not accepted — only rf_live_* can dispatch runs.
Claude Code
Easiest reliable path is the stdio wrapper. Add to~/.claude/config.json:
mcp-remote substitutes ${RUNFLOW_API_KEY} from the env block before opening the HTTPS connection. If you prefer the direct HTTP transport, paste the literal key:
.gitignore if it lives inside a project. Never commit a literal key.
Cursor
Same constraint as Claude Code. Add to~/.cursor/mcp.json:
~/.cursor/mcp.json is user-scoped (not committed). If you want a project-scoped config, prefer the mcp-remote stdio pattern shown above so the key can live in a process env var instead of a JSON file.
VS Code MCP
Use the VS Code MCP extension’s HTTP transport with URLhttps://mcp.runflow.io/mcp and a single literal-key Authorization header in user settings. Same env-var-substitution limitation as the CLI clients.
Claude.ai connectors
Add a custom connector with URLhttps://mcp.runflow.io/mcp and paste your bearer when prompted. The connector inherits the initialize.instructions SKILL.md automatically. The bearer is stored encrypted in your account, not in a local file.
Tools
generate
Dispatch a run and (by default) wait for the result.
Polling backs off adaptively: 2s for the first 30s, 5s through 2 minutes, then 10s. The server enforces
MCP_POLL_TIMEOUT_MS (10 minutes by default). If the poll exceeds that ceiling, the tool returns a polling_timeout envelope with the latest run state. The upstream run keeps running.
Resuming after polling_timeout
If you supplied client_ref on the original call, re-invoke generate with the same model and the same client_ref. Runflow honours the idempotency key and returns the existing run. Without client_ref, the run still completes upstream but cannot be resumed via MCP — the run_id is returned in the error envelope so you can poll the REST API directly.
Example
list_models
Browse the unified catalog. Solutions (provider_slug=runflow) appear alongside raw provider models — no special casing.
Each entry includes a
runs_endpoint you can pass straight to generate (strip the /v1/models/ prefix and /runs suffix to get the model argument).
Prompts
The server auto-builds one slash command per active Solution. Solutions are catalog entries withprovider_slug=runflow — they encode a complete workflow behind a single endpoint. You will see prompts like:
/runflow:headshots/runflow:logo-inpaint/runflow:object-removal-prompt/runflow:smart-segmentation/runflow:upscale
generate for you.
Prompts are memoised per catalog snapshot, so prompts/list is cheap and initialize does not rebuild on every request.
Auth
The server accepts any bearer matchingMCP_ACCEPTED_KEY_PREFIXES (default rf_live). Send the key verbatim:
WWW-Authenticate header:
/.well-known/oauth-protected-resource endpoint returns a stub resource block in v1.0; a future minor release will add authorization-server pointers for the in-browser MCP OAuth flow.
Errors
Two distinct envelope shapes, depending on where the error originates.Transport-level (JSON-RPC)
Returned when a request is rejected before the tool handler runs — host check, body cap, auth, rate limit. Lives at HTTP 4xx/5xx.
Default rate-limit window is 60s with caps of 30 req/IP pre-auth, 120 req/IP post-auth, and 600 req per distinct bearer fingerprint.
Tool-result envelope
Returned at HTTP 200 withisError: true when a tool succeeds at the transport layer but fails inside generate or list_models. Clients reading structuredContent.error get a stable shape:
[code] message lead line.
Troubleshooting
If none of the above match, run the smoke test below — the raw JSON-RPC response usually identifies the cause.
Smoke test
Two curl steps. The first proves your bearer is accepted and the skill is returned asinstructions; the second proves a real tool call round-trips end-to-end.
result.serverInfo.name = "Runflow" and result.instructions containing the agent skill.
provider_slug=runflow) in result.content[0].text along with result.structuredContent. The exact count varies as Solutions ship and retire — check the live catalog for the current set.
When to use the MCP server vs. the REST API
Related
- Agent skill — the SKILL.md the MCP server returns as
instructions. - Quickstart (REST) — direct HTTP integration.
- Models — the catalog
generatedispatches into. - Authentication — bearer lifecycle, scopes, rotation.
- Errors — REST error vocabulary. MCP envelopes use lowercase
snake_casecodes (e.g.insufficient_credits); the REST API returns the correspondingSCREAMING_SNAKEenum (e.g.INSUFFICIENT_CREDIT). The lowercase MCP form is a direct lowercasing of the RESTerrors[].type; treat them as the same code under different casing conventions.