MCP Server Framework - v1.0.0
    Preparing search index...

    Function registerConfigSection

    • Register a custom config section for consumer use.

      Must be called before config initialization (i.e., before the first call to getFrameworkConfig()). Registered sections:

      1. Are recognized in config files (no "unknown section" warning)
      2. Are validated against the provided Zod schema
      3. Can be retrieved via getAppConfig(name)

      Parameters

      • name: string

        Section name as it appears in the config file (e.g., 'myapp')

      • schema: ZodTypeAny

        Zod schema to validate the section data

      Returns void

      If the section name is reserved, already registered, or config has already been initialized

      registerConfigSection('myapp', z.object({
      url: z.string().url(),
      api_key: z.string().optional(),
      }));