Skip to content

CLI Reference

The FlowMCP CLI is a command-line tool for developing, validating, and managing FlowMCP schemas. It handles schema imports, group management, live API testing, migration, and can run as an MCP server for AI agent integration.

Terminal window
npm install -g github:FlowMCP/flowmcp-cli

Or clone and link locally:

Terminal window
git clone https://github.com/FlowMCP/flowmcp-cli.git
cd flowmcp-cli
npm install
npm link

The CLI operates on two configuration levels:

LevelPathContent
Global~/.flowmcp/Config, .env with API keys, all imported schemas
Local{project}/.flowmcp/Project config, groups with selected tools
~/.flowmcp/
├── config.json # Global configuration
├── .env # API keys for schema testing
└── schemas/ # All imported schema files
└── flowmcp-schemas/ # Imported from GitHub
{project}/.flowmcp/
├── config.json # Project-level configuration
└── groups/ # Tool groups for this project

The CLI has two operating modes that control which commands are available:

ModeDefaultDescription
AgentYesSubset of commands for AI agent use (search, add, remove, list, call, run)
DevNoAll commands including validation, testing, schema browsing, migration, and imports

Switch modes with flowmcp mode agent or flowmcp mode dev.

Interactive setup that creates global and local configuration. Run this once in each project.

Terminal window
flowmcp init

This will:

  • Create ~/.flowmcp/ if it does not exist
  • Optionally import the default schema repository
  • Create .flowmcp/ in the current project
  • Set up a default group

Show config, sources, groups, and health info.

Terminal window
flowmcp status

Show or switch the current mode.

Terminal window
flowmcp mode # Show current mode
flowmcp mode dev # Switch to dev mode
flowmcp mode agent # Switch to agent mode

Find available tools by keyword. Returns matching tool names with descriptions.

Terminal window
flowmcp search etherscan
flowmcp search "gas price"
flowmcp search defi

List all available schemas and their tools. Dev mode only.

Terminal window
flowmcp schemas

Activate a tool for this project. Adds it to the default group.

Terminal window
flowmcp add coingecko_simplePrice

Deactivate a tool from the project.

Terminal window
flowmcp remove coingecko_simplePrice

Show all active tools in the current project.

Terminal window
flowmcp list

Import schemas from a GitHub repository. Dev mode only.

Terminal window
flowmcp import https://github.com/FlowMCP/flowmcp-schemas
flowmcp import https://github.com/FlowMCP/flowmcp-schemas --branch develop

Import schemas from a registry URL. Dev mode only.

Terminal window
flowmcp import-registry https://registry.example.com/schemas

Update schemas from remote registries using hash-based delta sync.

Terminal window
flowmcp update # Update all sources
flowmcp update flowmcp-schemas # Update specific source

Migrate schemas from v2 to v3 format. Renames routes to tools and updates the version field. Dev mode only.

Terminal window
# Migrate a single schema file
flowmcp migrate ./schemas/coingecko/Ping.mjs
# Migrate all schemas in a directory
flowmcp migrate --all ./schemas/
# Preview changes without writing files
flowmcp migrate --dry-run ./schemas/coingecko/Ping.mjs

Flags:

FlagDescription
--allMigrate all .mjs schema files in the directory recursively
--dry-runPreview changes without modifying any files

What it does:

  1. Reads the schema file
  2. Renames routes key to tools
  3. Updates version from 2.x.x to 3.0.0
  4. Writes the updated file in-place
  5. Runs validation on the result

Groups organize tools into named collections. Each project can have multiple groups with one set as default.

List all groups and their tool counts.

Terminal window
flowmcp group list

flowmcp group append <name> --tools "refs"

Section titled “flowmcp group append <name> --tools "refs"”

Add tools to a group. Creates the group if it does not exist.

Terminal window
flowmcp group append crypto --tools "flowmcp-schemas/coingecko/simplePrice.mjs,flowmcp-schemas/etherscan/getBalance.mjs"

flowmcp group remove <name> --tools "refs"

Section titled “flowmcp group remove <name> --tools "refs"”

Remove tools from a group.

Terminal window
flowmcp group remove crypto --tools "flowmcp-schemas/coingecko/simplePrice.mjs"

Set the default group used by call, test, and run commands.

Terminal window
flowmcp group set-default crypto

Validate schema structure against the FlowMCP specification.

Terminal window
flowmcp validate # Validate default group
flowmcp validate ./my-schema.mjs # Validate single file
flowmcp validate --group crypto # Validate specific group

flowmcp test project [--route name] [--group name]

Section titled “flowmcp test project [--route name] [--group name]”

Test default group schemas with live API calls.

Terminal window
flowmcp test project # Test all tools
flowmcp test project --route getBalance # Test specific tool
flowmcp test project --group crypto # Test specific group

Test all user-created schemas with live API calls.

Terminal window
flowmcp test user

Test a single schema file.

Terminal window
flowmcp test single ./my-schema.mjs
flowmcp test single ./my-schema.mjs --route getBalance

List available tools in the default or specified group.

Terminal window
flowmcp call list-tools
flowmcp call list-tools --group crypto

flowmcp call <tool-name> [json] [--group name]

Section titled “flowmcp call <tool-name> [json] [--group name]”

Call a tool with optional JSON input.

Terminal window
flowmcp call coingecko_simplePrice '{"ids":"bitcoin","vs_currencies":"usd"}'
flowmcp call etherscan_getBalance '{"address":"0x..."}' --group crypto

Start as an MCP server using stdio transport. This is used for integration with AI agent frameworks like Claude Code.

Terminal window
flowmcp run
flowmcp run --group crypto

Tools are referenced using the source/file.mjs format with optional type discriminators:

source/file.mjs # All tools from a schema
source/file.mjs::tool::toolName # Single tool (v3 format)
source/file.mjs::resource::resName # Single resource (v3 format)
source/file.mjs::skill::skillName # Single skill (v3 format)
source/file.mjs::toolName # Single tool (v2 compat format)

For example:

flowmcp-schemas/coingecko/simplePrice.mjs # All tools
flowmcp-schemas/coingecko/simplePrice.mjs::tool::getPrice # Single tool
  1. Initialize

    Run the interactive setup. This imports schemas and creates a default group.

    Terminal window
    flowmcp init
  2. Import schemas (optional)

    If you skipped the import during init, add schemas manually:

    Terminal window
    flowmcp import https://github.com/FlowMCP/flowmcp-schemas
  3. Create a group

    Organize tools into a named group:

    Terminal window
    flowmcp group append crypto --tools "flowmcp-schemas/coingecko/simplePrice.mjs,flowmcp-schemas/etherscan/getBalance.mjs"
    flowmcp group set-default crypto
  4. Validate and test

    Ensure schemas are correct and APIs respond:

    Terminal window
    flowmcp validate
    flowmcp test project
  5. Use tools

    Call tools directly or start the MCP server:

    Terminal window
    flowmcp call list-tools
    flowmcp call coingecko_simplePrice '{"ids":"bitcoin","vs_currencies":"usd"}'
    # Or start as MCP server
    flowmcp run

API keys for schema testing go in ~/.flowmcp/.env:

Terminal window
ETHERSCAN_API_KEY=your_key_here
COINGECKO_API_KEY=your_key_here
DUNE_API_KEY=your_key_here