@node-in-layers/mcp-server
    Preparing search index...

    Interface ExpressOptions

    Full Express configuration accepted when building the HTTP app via getApp() or start().

    interface ExpressOptions {
        additionalRoutes?: Readonly<
            {
                handler: (req: Request, res: Response) => Promise<void>;
                method: "GET" | "POST" | "PUT" | "DELETE";
                path: string;
            },
        >[];
        afterRouteCallback?: (req: Request, res: Response) => void | Promise<void>;
        jsonBodyParser?: { limit?: string; strict?: boolean };
        limit?: string;
        preRouteMiddleware?: ExpressMiddleware[];
    }
    Index

    Properties

    additionalRoutes?: Readonly<
        {
            handler: (req: Request, res: Response) => Promise<void>;
            method: "GET" | "POST" | "PUT" | "DELETE";
            path: string;
        },
    >[]

    Additional routes to mount on the Express app.

    afterRouteCallback?: (req: Request, res: Response) => void | Promise<void>

    Optional callback invoked after every route handler completes. Useful for post-request instrumentation or cleanup.

    jsonBodyParser?: { limit?: string; strict?: boolean }

    Fine-grained options passed directly to bodyParser.json().

    Type Declaration

    • Optionallimit?: string

      Maximum request body size (e.g. '1mb').

    • Optionalstrict?: boolean

      When false, allows non-object/array JSON at the top level.

    limit?: string

    Body-size limit forwarded to body-parser (e.g. '10mb').

    preRouteMiddleware?: ExpressMiddleware[]

    Middleware to run before the MCP route handler.