@modelcontextprotocol/ext-apps - v0.0.1
    Preparing search index...

    Options for configuring the useApp hook.

    Note: This interface does NOT expose App options like autoResize. The hook creates the App with default options (autoResize: true). If you need custom App options, create the App manually instead of using this hook.

    • useApp for the hook that uses these options
    • useAutoResize for manual auto-resize control with custom App options
    interface UseAppOptions {
        appInfo: {
            icons?: { mimeType?: string; sizes?: string[]; src: string }[];
            name: string;
            title?: string;
            version: string;
            websiteUrl?: string;
        };
        capabilities: McpUiAppCapabilities;
        onAppCreated?: (app: App) => void;
    }
    Index

    Properties

    appInfo: {
        icons?: { mimeType?: string; sizes?: string[]; src: string }[];
        name: string;
        title?: string;
        version: string;
        websiteUrl?: string;
    }

    App identification (name and version)

    capabilities: McpUiAppCapabilities

    Features and capabilities this app provides

    onAppCreated?: (app: App) => void

    Called after App is created but before connection.

    Use this to register request/notification handlers that need to be in place before the initialization handshake completes.

    Type Declaration

      • (app: App): void
      • Parameters

        • app: App

          The newly created App instance

        Returns void

    import { McpUiToolInputNotificationSchema } from '@modelcontextprotocol/ext-apps/react';

    onAppCreated: (app) => {
    app.setNotificationHandler(
    McpUiToolInputNotificationSchema,
    (notification) => {
    console.log("Tool input:", notification.params.arguments);
    }
    );
    }