FlowMCP
This server offers two read-only, deterministic workflow tools that fetch public data without API keys.
hn_top: Returns the top 5 Hacker News stories as a markdown list (no parameters).morning_brief: Provides a daily summary with today's weather forecast for an optional city and the top 5 Hacker News stories in markdown. It wraps Open-Meteo and the Hacker News API, exposing only two tools to ensure reliable use by language models.
Allows workflows to call GitHub MCP tools (e.g., get_issue) as steps, with read-only access by default and explicit allowlisting for write operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FlowMCPGenerate the morning brief for Tokyo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FlowMCP
Most MCP servers wrap an entire platform: every endpoint becomes a tool, the model gets a 40-tool surface, and orchestration is outsourced to sampling — then everyone blames the model. FlowMCP inverts that: workflows are the tools. Each MCP tool is one known, named workflow; a deterministic engine executes the steps; the model's only job is picking the flow and filling 2–3 parameters. Small models (7–30B) can drive this reliably, because there is almost nothing to get wrong.
Quickstart (60 seconds)
npm install -g @petergreenappliedai/flowmcp
flowmcp serve # serves the demo flows over stdio
flowmcp serve --flows ~/my-flows # serves yoursOr from a clone (for development):
git clone https://github.com/PeterGreenAppliedAI/FlowMCP.git && cd FlowMCP
npm install
npm test # hermetic — no network needed
npm start # serves MCP over stdioPoint any MCP client at it. Claude Desktop / Claude Code / anything MCP:
{
"mcpServers": {
"flowmcp": {
"command": "npx",
"args": ["-y", "@petergreenappliedai/flowmcp", "serve", "--flows", "/absolute/path/to/your/flows"]
}
}
}Your client will list two tools — morning_brief and hn_top — not forty. Both run against keyless public APIs (Open-Meteo, Hacker News), so they work on a fresh clone with zero configuration.
> morning_brief city="Lisbon"
# Morning brief — Lisbon, Portugal
## Weather today
High 29.4°C / low 19.3°C, 0% chance of rain.
## Top of Hacker News
- **…** — 330 points https://…Related MCP server: production-grade-mcp-agentic-system
Flow file format
Flows are data, not code. The server loads every flows/*.flow.json5 at startup and exposes each as one MCP tool. An invalid flow is a loud startup error naming the file and field.
{
name: 'morning_brief', // becomes the MCP tool name (snake_case)
description: 'WHEN TO USE: …', // ≤300 chars — this is the model's entire manual
input: { // 0–3 parameters, no more
city: { type: 'string', description: 'City for the weather', required: false, default: 'New York' },
},
env: ['WEATHER_API_KEY'], // ONLY these env vars are visible to {{env.X}} — least privilege
steps: [ /* run in order; each result is available as steps.<id> */ ],
output: '{{steps.render}}', // the tool's text result
}Check a directory without serving: npm start -- --flows ./my-flows --validate exits 0 if every flow is valid, 1 with the file and field otherwise.
Step kinds
kind | fields | what it does |
|
| Fetch a URL; JSON responses are parsed. One automatic retry on network error — GET only: a timed-out POST may have landed, so it is never retried. |
|
| Reshape prior results with a sandboxed expression — paths, object/array literals, comparisons. No code execution. |
|
| Mustache-style string build: |
|
| Run one leaf step per array element, sequentially, max 10 items — slice with |
|
| Evaluate a condition, run one of two step lists. No nested branches. |
|
| Call one tool on a downstream MCP server from |
Everything downstream of a step sees input.*, env.* (for {{env.API_KEY}} — never put secrets in flow files), and steps.<id>. A failed step aborts the flow and returns a structured isError result naming the step. Whole-flow timeout: 60s.
Writing your own flow
Drop a file in a flows directory, restart the server — that's the whole workflow. The server reads flows/ in the repo by default; point it anywhere with --flows (or the FLOWMCP_FLOWS_DIR env var), which is how you keep private flows out of a public checkout:
npm start -- --flows ~/my-flows// flows/cat_fact.flow.json5
{
name: 'cat_fact',
description: 'WHEN TO USE: the user wants a random cat fact.',
input: {},
steps: [
{ id: 'fact', kind: 'http_request', url: 'https://catfact.ninja/fact' },
{ id: 'render', kind: 'template', template: 'Cat fact: {{steps.fact.fact}}' },
],
output: '{{steps.render}}',
}Composition: wrapping other MCP servers
Flows can call tools on other MCP servers — and this is where the thesis becomes an operation instead of an opinion. Register downstream servers in a servers.json5 next to your flow files:
Downstream servers speak either transport: stdio (command) or remote
Streamable HTTP (url + headers, e.g. a hosted Shopify/Business Central
MCP — tokens interpolated from env):
{
erp: {
url: 'https://your-tenant.example.com/mcp',
headers: { Authorization: 'Bearer {{env.ERP_TOKEN}}' },
attestReadOnly: ['list_customers', 'get_customer'], // operator-attested reads (server annotates nothing)
allow: ['post_invoice'], // write-capable, two-phase gated
},
github: {
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-github'],
env: { GITHUB_TOKEN: '{{env.GITHUB_TOKEN}}' }, // interpolated — never inline secrets
allow: [], // non-read-only tools need explicit listing
shell: true, // Windows: npx is a .cmd shim — raw spawn can't exec it
},
}(shell defaults to false. On Windows, .cmd shims like npx need shell: true — or point command directly at a Node entry point. servers.json5 is operator-trusted config, so the shell opt-in is a portability knob, not an injection surface. Relative paths in command/args resolve against the directory containing servers.json5 — the config works no matter where the flowmcp process was started from.)
Then use an mcp_call step like any other:
{ id: 'issue', kind: 'mcp_call', server: 'github', tool: 'get_issue',
args: { owner: 'x', repo: 'y', issue_number: '{{input.n}}' } }The key property: the wrapped server's 40 tools never appear in FlowMCP's tools/list. 40 tools in, 3 workflows out — the model's surface never grows, no matter how many servers sit behind it.
Rules of engagement:
Read-only by default, fail-closed. A downstream tool is callable only if it declares
annotations.readOnlyHint: true, is operator-attested as a read in that server'sattestReadOnlylist (a security assertion — production servers often annotate nothing), or is explicitly named in itsallowlist. Naming a write tool is a consent moment, on purpose — and it changes what FlowMCP advertises: annotations are computed per flow from its steps, so a flow containing a POST or an allowlisted write tool is published withreadOnlyHint: false, destructiveHint: true. FlowMCP never tells a client a write-capable flow is read-only.Children get a minimal environment. Downstream servers receive a baseline (
PATH,HOME, …) plus the vars you configure in theirenvblock — never the whole parent environment, unless you setinheritEnv: truefor that server.One session per child, not per flow. Downstream servers spawn lazily on first use, stay alive across calls, respawn on crash (3 attempts, then a 5s backoff), and shut down after 5 minutes idle. The client handshakes at the newest supported protocol revision and validates what comes back.
The step timeout covers spawn + handshake + call as one unit, bounded by the flow's 60s deadline — a slow cold-start can't invisibly eat the budget.
Results are capped at
maxResultChars(default 8K) — downstream verbosity is not your flow's problem to inherit.structuredContentis preferred when the downstream tool provides it; otherwise JSON text results are parsed so later steps can path into them.
The benchmark
The thesis is an empirical claim, so we tested it: six conditions, ten local models (4B–35B plus DeepSeek v4-flash), identical fixture data, outcome-based scoring. Headline: 79% task success through the two-flow façade vs 10% on the same 35 tools raw — paired McNemar 33 discordant pairs, every one favoring the façade (exact p ≈ 2.3×10⁻¹⁰) — at a tenth of the tokens per attempt. A 7B through the façade outscored a 35B driving the raw surface. Full report with charts, per-model tables, and everything the data does not prove: petergreenappliedai.github.io/FlowMCP · method, harness, raw results, and transcripts in bench/.
The CLI
One entry point for the whole loop (from a clone: npx tsx src/cli.ts <cmd>, or
npm run build once and use node dist/cli.js; installed as a package it's the
flowmcp bin):
command | what it does |
| serve flows as MCP tools over stdio (default) |
| check flows + |
| registry health and advisory nominations |
| print a routing preamble for LLM hosts |
| author a flow with a model, under observation |
| compile a recorded trace into a candidate flow |
| nominate recurring procedures from execution logs |
| shadow-verify a flow against a host-supplied agent |
| compile recurring GraphQL operations into candidate flows |
author needs an OpenAI-compatible endpoint via --gateway or the GATEWAY env var —
there is no default endpoint or model; any local or hosted model works.
The authoring loop (experimental)
"Workflows as tools" has an obvious objection: someone has to author the workflows. The
answer, shipped as flowmcp author / compile / detect: a model helps author the
flow once, under observation and validation — it does not improvise the workflow at
runtime. A model writes a program against the tool surface; an instrumented runner
records its execution (cassette record/replay for live, nondeterministic APIs); the
compiler derives a candidate flow from the observed trace — dataflow classified by
variant differencing, constants separated from inputs, redundant calls removed — and
emits it with provenance, warnings, and fail-closed refusals for anything it cannot
prove. Replay against mutated data catches hardcoding before a human ever reviews it.
The full loop exists and has run end-to-end: detect.ts nominates flow candidates from
execution logs (frequency × cost × success, inputs discovered from cross-run argument
variance); flowmcp author takes an intent, introspects the configured servers'
read-only tools, has a model write and repair a script in a disposable sandboxed process,
records it against the real servers, and compiles the trace. Dogfooded on a real
recurring news-gathering workflow: the compiled flow replaced a multi-minute agentic
search sweep with one 4.5-second deterministic call at zero model tokens. Nothing in the
loop is provider-specific — the dogfood happens to use a self-hosted SearXNG wrapper, but
any MCP server exposing a search (or any other read-only) tool slots into servers.json5
the same way.
This is not "automatic workflow generation": a generated flow carries provenance for every inference, warns where the DSL cannot express the source, and requires review before serving — and always before writes. The precise claim: existing MCP workflow engines execute workflows; FlowMCP is designed to compile observed tool use into small, reviewable workflow tools, and then execute them deterministically. Intelligence at build time, determinism at runtime.
The registry: promotion and rot detection (v0.6)
A compiled flow is deterministic code, and deterministic code can silently rot. The
registry is the maintenance layer: drop a registry.json5 beside your flows and the
directory becomes governed — every flow must be listed with a state
(candidate → reviewed → active → retired), only active flows are served, and an
unlisted flow file is a loud startup error. Entries carry provenance (source trace,
authoring model) and review records. No registry file → nothing changes.
With a registry present, every flow execution is logged to registry-log.jsonl — an
open append-only contract that external systems write to as well: a consuming agent's
editorial layer can append signal records ("this lens of the output was thin, I
patched it"), and a shadow-replay harness can append shadow records (flow output vs
the specialist path). npm start -- --flows <dir> --status computes per-flow health and
prints advisory nominations, in cost order:
Loud failure counting (free): 3+ consecutive failed runs → needs review.
Consumer signals (free): the same lens patched in each of the last 3 gap-check signals → recompile candidate — this catches stale-but-well-formed output, the rot no structural check can see, using judgment the consumer was already paying for.
Shadow replay (paid, scheduled):
flowmcp shadow <flow> --agent '<cmd>' --judge '<cmd>'re-derives the task through a host-supplied agent, has a host-supplied judge compare, and records the verdict. FlowMCP never calls a model — the agent and judge are injected commands; without a judge nothing is recorded. Write flows are refused (shadowing one would write twice).
Nominations are advisory: --status never mutates the registry. Promotion and
retirement stay human decisions — the registry's job is to make them informed and cheap.
Full spec in FORMAT.md.
Trust model
Flow files are trusted programs — treat them like code, review them like code. The expression language can't execute code, but a flow can still send data to any URL it names; what bounds the blast radius is what the flow can see: only the env vars it declares in env: [...] (never all of process.env), only the 0–3 inputs it declares, and only downstream MCP tools that are read-only or explicitly allowlisted. servers.json5 is operator configuration, same trust level as the server's own command line. Don't load flow files you haven't read.
Design constraints (on purpose)
Hand-rolled server protocol, ~150 lines:
initialize,tools/list,tools/call,pingover newline-delimited JSON-RPC on stdio — small enough to audit in one sitting. The line we hold: we implement the MCP surface we govern; we use the reference client for downstream interoperability.Dependencies:
zod,json5, and the official MCP SDK — used ONLY as the reference client transport for consuming remote (Streamable HTTP) downstream servers, pinned to its v1 line. FlowMCP's governed server runtime and workflow engine are hand-built and intentionally small; commodity protocol churn is delegated to the reference client.Small surfaces everywhere: few tools, ≤300-char descriptions, ≤3 params. Every token in
tools/listis budget spent by every client on every turn.Writes are gated by construction. A flow containing a write step (a POST, or an
mcp_callto an allowlisted tool) automatically gets a two-phase confirmation protocol — there is no opt-out flag. The first call runs the read steps, pauses before the first write, and returns a proposal plus a single-use confirmation token (5-minute expiry) bound to the frozen pre-write state; confirming executes exactly what was proposed, never a recomputation. Aproposaltemplate on the flow customizes the prompt. Write flows advertisereadOnlyHint: falseand aconfirmparameter — all computed from the steps, never declared. With an elicitation-capable client (v0.5), approval is host-mediated instead: the server elicits{approve}through the host and the model never holds a token; missing required parameters are elicited the same way. With plain clients, the token protocol applies — a checkpoint, not a guaranteed human gate.stdout is the protocol channel; all logging goes to stderr.
Roadmap
Done and shipped: the six-condition benchmark (report, frozen at tag bench-2026-07-31), the trace→flow compiler and authoring loop (now first-class CLI: flowmcp author / compile / detect; the benchmark corpus stays in bench/), remote Streamable HTTP downstreams with operator attestation + schema drift pinning (v0.4), host-mediated write approval via elicitation (v0.5), the flow registry with promotion states, run logging, and staleness nominations (v0.6), the unified flowmcp CLI (v0.7, on npm), and the shadow-verification harness with host-injected agent and judge (v0.8).
Ahead:
A broader benchmark task suite: more decline and partial-match shapes, tasks with no flow coverage, more trials per cell
MCP conformance matrix (Inspector-based CI against current protocol revisions)
Destination allowlists and HTTPS policy for
http_requestHTTP transport for the server itself
Flow hot-reload
Development
npm test # vitest: spawns the real server, speaks JSON-RPC, mocks only outbound HTTP
npm run typecheck # strict TS, no emit
npm run build # emits dist/ — the `flowmcp` bin entry points thereCI runs typecheck + tests on Node 20 and 22 for every push. Engineering log — what worked, what didn't, what the fix was — lives in DECISIONS.md. The flow file format is specified as a portable contract in FORMAT.md; benchmark method and results live in bench/.
MIT license.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
Flicense-qualityDmaintenanceMCP server that lets AI agents execute structured business processes by exposing process steps as tools with a sequenced event bus to prevent skipping steps.Last updated1- Alicense-qualityDmaintenanceA production-grade MCP server designed for multi-tenant, authenticated, and observable AI agent systems, enabling secure tool execution across heterogeneous data sources.Last updated54MIT
- Alicense-qualityCmaintenanceMCP server that routes natural language requests to structured tool calls using a LoRA-tuned small language model, with built-in validation, retry, and fallback recovery.Last updatedMIT
- Alicense-qualityAmaintenanceMCP server that enables AI agents to run a deterministic orchestration loop with decomposition, subagent execution, and review feedback across multiple LLM backends.Last updated53MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP server for generating rough-draft project plans from natural-language prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PeterGreenAppliedAI/FlowMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server