mcp-use TypeScript API
    Preparing search index...

    Function withMcpUse

    • Add mcp-use build, CORS, and serverless tracing to a Next.js config.

      The MCP build runs when Next evaluates next.config, for both development and production builds. This removes the need for a separate prebuild script.

      Type Parameters

      Parameters

      • nextConfig: T = ...

        Existing Next.js configuration to augment.

      • options: WithMcpUseOptions = {}

        MCP source, route, and project-root settings.

      Returns Promise<T & NextConfigLike>

      The augmented configuration after the MCP project is built.

      import { withMcpUse } from "mcp-use/next";

      export default withMcpUse();