Member Junction
    Preparing search index...
    • Discovers mj.config.cjs with cosmiconfig (module name mj) and returns the RAW object plus its path. Hosts whose own config loader Zod-strips dynamicPackages use this to hand the loader an unstripped view.

      Parameters

      • OptionalsearchFrom: string

        Directory to start from. Defaults to process.cwd().

      • Optionaloptions: { searchStrategy?: MJConfigSearchStrategy }
        • OptionalsearchStrategy?: MJConfigSearchStrategy

          cosmiconfig's search strategy. Defaults to 'global' (walk up to the home directory — what MJAPI, the mj CLI and CodeGen do). A host whose own config loader only looks in the working directory should pass 'none' so the packages it loads come from the same file its database settings came from.

      Returns { config: Record<string, unknown>; configFilePath?: string }

      const { config, configFilePath } = DiscoverMJConfig();
      await LoadDynamicPackages({ processId: 'mcp', config, configFilePath });