Migration Guide
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
This guide covers migrating schemas between FlowMCP versions. Both migration paths are documented below.
v2 to v3 Migration
Section titled “v2 to v3 Migration”The v3.0.0 release renames routes to tools and adds two new MCP primitives: Resources (SQLite-based read-only data) and Skills (reusable AI agent instructions).
What Changed
Section titled “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
Section titled “Automated Migration”# Migrate a single schemaflowmcp migrate ./schemas/coingecko/Ping.mjs
# Migrate all schemas in a directoryflowmcp migrate --all ./schemas/
# Preview changes without writing (dry run)flowmcp migrate --dry-run ./schemas/coingecko/Ping.mjsManual Migration Steps
Section titled “Manual Migration Steps”-
Rename routes to tools — The primary change: rename the
routeskey totoolsand updateversion: '3.0.0'.// Before (v2)export const main = {namespace: 'coingecko',version: '2.0.0',routes: { ping: { method: 'GET', path: '/ping', description: 'Check API status', parameters: [] } }}// After (v3)export const main = {namespace: 'coingecko',version: '3.0.0',tools: { ping: { method: 'GET', path: '/ping', description: 'Check API status', parameters: [] } }} -
Update version field — Change
version: '2.0.0'toversion: '3.0.0'. -
Update group references — If your project uses groups in
.flowmcp/groups.json, add type discriminators:// Before"tools": [ "etherscan/contracts.mjs::getContractAbi" ]// After"tools": [ "etherscan/contracts.mjs::tool::getContractAbi" ] -
Add resources (optional) — If your schema benefits from local data lookups, see Resources.
-
Add skills (optional) — If your schema benefits from AI agent workflows, see Skills.
-
Run validation —
flowmcp validate <schema-path>
Deprecation Timeline
Section titled “Deprecation Timeline”| Version | routes Behavior |
|---|---|
| v3.0.0 | routes accepted as silent alias for tools |
| v3.1.0 | routes accepted with loud deprecation warning |
| v3.2.0 | routes rejected with error |
v1 to v2 Migration
Section titled “v1 to v2 Migration”Schema Categories
Section titled “Schema Categories”| Category | % of Schemas | Migration Effort | Description |
|---|---|---|---|
| Pure declarative | ~60% | Automatic | No handlers, no imports. |
| With handlers | ~30% | Semi-automatic | Has handlers but no imports. |
| With imports | ~10% | Manual review | Imports shared data that must become shared list references. |
Migration Steps
Section titled “Migration Steps”-
Wrap existing fields in main block — The biggest structural change:
// Before (v1.2.0)export const schema = {namespace: 'etherscan',flowMCP: '1.2.0',root: 'https://api.etherscan.io/v2/api',routes: { /* ... */ },handlers: { /* ... */ }}// After (v2.0.0)export const main = {namespace: 'etherscan',version: '2.0.0',root: 'https://api.etherscan.io/v2/api',requiredLibraries: [],routes: { /* ... */ }}export const handlers = ( { sharedLists, libraries } ) => ({/* ... */}) -
Update version field —
flowMCP: '1.2.0'becomesversion: '2.0.0'insidemain. -
Convert imports to shared list references:
// Before (v1.2.0) — has importimport { evmChains } from '../_shared/evm-chains.mjs'// ...handlers use evmChains directly// After (v2.0.0) — no import, uses injectionexport const main = {sharedLists: [ { ref: 'evmChains', version: '1.0.0' } ],// ...}export const handlers = ( { sharedLists } ) => ({toolName: {preRequest: async ( { struct, payload } ) => {const chain = sharedLists.evmChains.find( c => c.alias === payload.chainName )return { struct, payload }}}}) -
Add output schemas (optional) — New in v2.0.0. See Output Schema.
-
Run validation —
flowmcp validate <schema-path>
Common Migration Issues
Section titled “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 |
Migration Checklist
Section titled “Migration Checklist”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 -
requiredLibrariesdeclared (can be empty[]) - Full validation passes (
flowmcp validate)
v2 to v3:
-
routesrenamed totools -
versionchanged from2.x.xto3.0.0 - Group references updated with type discriminators (optional in v3.0.0)
- Full validation passes (
flowmcp validate)