Skip to main content
FlowMCP is a deterministic normalization layer that converts heterogeneous web data sources into uniform, AI-consumable tools. The v2.0.0 specification defines how schemas, shared lists, groups, and security constraints work together to produce reliable, verifiable tool catalogs.
This documentation adapts the formal specification for practical use. The full specification is maintained at github.com/FlowMCP/flowmcp-spec.

Problem

Web data sources are organized by provider — Etherscan exposes smart contract endpoints, CoinGecko exposes market data, DeFi Llama exposes TVL metrics. Each source has its own interface style, authentication scheme, URL structure, response format, and error handling. AI agents need tools organized by application domain — token prices, contract ABIs, TVL data, wallet balances. An agent answering a question about a token’s market cap should not need to know whether the answer comes from CoinGecko, CoinCap, or DeFi Llama. Manual integration per source is unsustainable at scale. With 187+ schemas across dozens of providers, the combinatorial complexity makes hand-written integrations fragile and expensive to maintain.

Solution

FlowMCP introduces a schema-driven normalization layer between web data sources and AI clients. Each schema is a .mjs file that declaratively defines:
  • Input parameters with Zod-based validation (type, constraints, enum values)
  • URL construction rules (path templates, query parameters, body payloads)
  • Response transformation (optional handlers for pre/post processing)
  • Security constraints (no imports, no filesystem access, no eval)
The runtime reads these schemas and exposes them as MCP tools. The AI client sees a flat catalog of tools with typed inputs and predictable outputs — the underlying source complexity is completely abstracted away.

Positioning

FlowMCP is the deterministic anchor in a system that pairs it with non-deterministic AI.
LayerNatureResponsibility
AI Client (Skills)Non-deterministicDecides which tool to use, how to interpret results
FlowMCPDeterministicGuarantees the tool itself behaves identically every time
Web Data SourcesExternalProvides the raw data (uncontrolled)
FlowMCP guarantees that:
  • The same input parameters always produce the same API call
  • Parameter validation is enforced before any network request
  • Response transformations are consistent and reproducible
  • Security constraints are verified at load-time, not runtime

Terminology

TermDefinition
SchemaA .mjs file with two named exports: main (static) and optionally handlers (factory function). Defines one or more tools.
RouteA single tool within a schema. Maps to one web data source endpoint. Each route has parameters, a method, a path, and optional handlers.
ToolThe MCP-visible unit exposed to AI clients. Fully qualified name: namespace/schemaFile::routeName.
NamespaceProvider identifier, lowercase letters only (e.g. etherscan, coingecko). Groups schemas by data source.
HandlerAn async function returned by the handlers factory. Performs pre- or post-processing for a route. Receives dependencies via injection.
ModifierHandler subtype: preRequest transforms input before the API call, postRequest transforms output after.
Shared ListA reusable, versioned value list (e.g. EVM chain identifiers) referenced by schemas and injected at load-time.
GroupA named collection of cherry-picked tools with an integrity hash. Used for project-level tool activation.
Main Exportexport const main = {...} — the declarative, JSON-serializable part of a schema. Hashable for integrity verification.
Handlers Exportexport const handlers = ({ sharedLists, libraries }) => ({...}) — factory function receiving injected dependencies.

Design Principles

1. Deterministic over clever

Same input always produces the same API call. No randomness, no caching heuristics, no adaptive behavior inside the schema layer.

2. Declare over code

Maximize the main block, minimize handlers. Every field that can be expressed declaratively must live in main. Handlers exist only for transformations that cannot be expressed as static data.

3. Inject over import

Schemas receive data through dependency injection, never import. A handler that needs EVM chain data receives sharedLists.evmChains via the factory function. Libraries are declared in requiredLibraries and injected by the runtime from an allowlist.

4. Hash over trust

Integrity verification through SHA-256 hashes. The main block is hashable because it is pure JSON-serializable data. Groups store hashes of their member tools.

5. Constrain over permit

Security by default, explicit opt-in for capabilities. Schema files have zero import statements. The security scanner rejects schemas with forbidden patterns at load-time.

Version History

VersionDateChanges
1.0.02025-06Initial schema format. Flat structure with inline parameters.
1.2.02025-11Added handlers, Zod-based parameter validation, modifier pattern.
2.0.02026-02Two-export format (main + handlers factory). Dependency injection. Shared lists. Output schemas. Zero-import security. Groups with integrity hashes. Max routes reduced to 8.

What Changed in v2.0.0

The v2.0.0 release restructures the schema format around a fundamental insight: the declarative parts should be separable from the executable parts. This enables:
  • Integrity hashing of the main block without including function bodies
  • Security scanning of the handlers block as an isolated concern
  • Shared lists that inject reusable data at load-time instead of hardcoding enum values
  • Output schemas that declare expected response shapes for downstream consumers
  • Groups that compose tools across schemas with verifiable integrity

Specification Document Index

DocumentDescription
Schema FormatFile structure, main/handlers split, route definitions, naming conventions
ParametersPosition block, Z block validation, shared list interpolation, API key injection
Shared ListsList format, versioning, field definitions, filtering, resolution lifecycle
Output SchemaResponse type declarations, field mapping, validation rules
Security ModelZero-import policy, library allowlist, static scan, dependency injection
Groups & PromptsCherry-pick groups, integrity hashes, prompt workflows
Route TestsTest format, response capture lifecycle, output schema generation
PreloadCache configuration, TTL guidelines, runtime behavior
Validation Rules79 rules across 12 categories with severity levels
Migration v1 to v2Step-by-step migration guide, backward compatibility