mcp-use TypeScript API
    Preparing search index...

    Interface ViewConfig

    Immutable pre-render runtime configuration for a view module.

    Export as a named viewConfig alongside the default component. Values are normalized and validated by bootstrapView before the guest App is constructed. React presentation settings do not belong here — compose ThemeProvider / ViewControls in the component tree instead.

    import type { ViewConfig } from "mcp-use/react";

    export const viewConfig = {
    autoResize: false,
    displayModes: ["inline", "fullscreen"],
    preferredDisplayMode: "fullscreen",
    } satisfies ViewConfig;

    export default function CanvasView() {
    return <Canvas />;
    }
    interface ViewConfig {
        autoResize?: boolean;
        displayModes?: readonly DisplayMode[];
        preferredDisplayMode?: "inline" | "fullscreen";
    }
    Index
    autoResize?: boolean

    Let ext-apps observe the document and report size changes.

    true
    
    displayModes?: readonly DisplayMode[]

    Display modes this view can render correctly.

    Must contain "inline".

    ["inline", "fullscreen", "pip"]
    
    preferredDisplayMode?: "inline" | "fullscreen"

    Hint to ChatGPT for the initial display mode, emitted on the UI resource. Must belong to displayModes. ChatGPT may ignore this preference and currently supports only "inline" and "fullscreen".