Skip to content

Add requiredModules field to schema spec #40

@a6b8

Description

@a6b8

Problem

14 of 120+ community schemas import npm modules (ethers, ccxt, moment, etc.). When schemas are copied to ~/.flowmcp/schemas/ via the CLI, there is no node_modules/ directory — these schemas fail at runtime.

Proposal

Add a requiredModules field to the schema spec (next version after 1.2.0):

export const schema = {
    namespace: "chainlink",
    name: "ExampleName",
    flowMCP: "1.3.0",
    requiredModules: [
        { name: "ethers", version: "^6.13.7" }
    ],
    // ... rest of schema
}
  • Schemas without modules: requiredModules: []
  • Versions should match the versions used during development

Current Workaround

The registry generator (flowmcp-schemas) uses a hardcoded module mapping to populate requiredModules in registry entries. This works but the field should be part of the schema spec so schema authors declare their dependencies explicitly.

Affected Schemas (13 files, 7 unique modules)

Module Schemas
ethers chainlink (2), ens, passport-xyz, uniswap-v3
ccxt ccxt/orderbook
moment ohlcv (3)
axios ohlcv (2)
indicatorts indicators, simdune/activityEVM
@erc725/erc725.js erc725/universalProfile
pinata pinata/write
@thanpolas/univ3prices uniswap-v3/price-discovery

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions