The full migration specification is maintained at github.com/FlowMCP/flowmcp-spec. This page provides a practical walkthrough.
v2 to v3 Migration
The v3.0.0 release renamesroutes to tools and adds two new MCP primitives: Resources (SQLite-based read-only data) and Skills (reusable AI agent instructions).
What Changed
| v2 | v3 | Description |
|---|---|---|
main.routes | main.tools | Primary key rename — routes accepted as deprecated alias |
version: '2.0.0' | version: '3.0.0' | Version field update |
namespace/file.mjs::routeName | namespace/file.mjs::tool::routeName | Type discriminator in group references |
prompts (in groups) | skills (in groups) | Group prompts renamed to group skills |
| — | main.resources | New: SQLite-based read-only data |
| — | main.skills | New: AI agent instruction files |
| — | includeSchemaSkills | New: Auto-include schema skills in groups |
Automated Migration
Use theflowmcp migrate command to upgrade schemas automatically:
- Reads the v2 schema file
- Renames
routestotools - Updates
versionfrom2.x.xto3.0.0 - Writes the updated schema in-place (or to a new file with
--dry-run) - Runs validation on the result
Manual Migration Steps
If you prefer to migrate manually:Update group references (if applicable)
If your project uses groups in After:The old format without
.flowmcp/groups.json, update tool references to use type discriminators:Before:::tool:: is still accepted but will produce warnings.Add resources (optional)
If your schema benefits from local data lookups, add a See Resources for the full specification.
resources block:Add skills (optional)
If your schema benefits from AI agent workflows, add a See Skills for the full specification.
skills array and create skill files:Deprecation Timeline
| Version | routes Behavior |
|---|---|
| v3.0.0 | routes accepted as silent alias for tools — schemas work without changes |
| v3.1.0 | routes accepted with loud deprecation warning on every load |
| v3.2.0 | routes rejected with error — schemas must use tools |
Backward Compatibility
| Feature | v2 Schema on v3 Runtime | v3 Schema on v3 Runtime |
|---|---|---|
routes key | Accepted (alias) | Use tools instead |
version: '2.x.x' | Accepted with info | Must be 3.x.x |
Group ::routeName | Accepted | Use ::tool::routeName |
| Resources | Not available | Fully supported |
| Skills | Not available | Fully supported |
v1 to v2 Migration
This section covers the earlier migration from v1.2.0 to v2.0.0 format.Schema Categories
Existing schemas fall into three categories based on migration effort:| Category | % of Schemas | Migration Effort | Description |
|---|---|---|---|
| Pure declarative | ~60% | Automatic | No handlers, no imports. Only URL construction and parameters. |
| With handlers | ~30% | Semi-automatic | Has preRequest/postRequest handlers but no imports. |
| With imports | ~10% | Manual review | Imports shared data that must become shared list references. |
Migration Steps
Wrap existing fields in main block
The biggest structural change — fields move into a After (v2.0.0):Key changes:
main export, and handlers become a separate factory function.Before (v1.2.0):- Two separate named exports:
main(static) andhandlers(factory function) flowMCP: '1.2.0'becomesversion: '2.0.0'handlersis now a factory function receiving{ sharedLists, libraries }- New field
requiredLibrariesdeclares needed npm packages - Zero import statements
Update version field
| Before | After |
|---|---|
flowMCP: '1.2.0' | version: '2.0.0' |
version field moves inside main and follows semver starting with 2..Convert imports to shared list references
Before (v1.2.0):After (v2.0.0):Key changes:
- Remove
importstatement entirely (zero imports policy) - Add
sharedListsreference inmain - Access list data via
sharedLists.evmChains(injected by factory function)
Common Migration Issues
| Issue | Cause | Fix |
|---|---|---|
SEC001: Forbidden pattern "import" | Import statement still present | Convert to sharedLists reference |
VAL003: "flowMCP" is not a valid field | Old version field | Change to version inside main |
DEP001: main.routes is deprecated | v2 schema on v3 runtime | Rename routes to tools, update version to 3.0.0 |
Migration Checklist
Per schema (v1 to v2):- Fields wrapped in
mainblock -
flowMCP: '1.2.0'changed toversion: '2.0.0'insidemain -
handlersat top level (sibling ofmain) - All
importstatements removed - Imported data converted to
sharedListsreferences - Handler code uses
sharedListsvia factory injection -
requiredLibrariesdeclared (can be empty[]) - Full validation passes (
flowmcp validate)
-
routesrenamed totools -
versionchanged from2.x.xto3.0.0 - Group references updated with type discriminators (optional in v3.0.0)
- Resources added if applicable
- Skills added if applicable
- Full validation passes (
flowmcp validate)