UNPKG

mcp-use

Version:

Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.

46 lines 1.54 kB
import React from "react"; interface McpUseProviderProps { children: React.ReactNode; /** * Enable debug button in WidgetControls component * @default false */ debugger?: boolean; /** * Enable view controls (fullscreen/pip) in WidgetControls component * - `true` = show both pip and fullscreen buttons * - `"pip"` = show only pip button * - `"fullscreen"` = show only fullscreen button * @default false */ viewControls?: boolean | "pip" | "fullscreen"; /** * Automatically notify OpenAI about container height changes for auto-sizing * Uses ResizeObserver to monitor the children container and calls window.openai.notifyIntrinsicHeight() * @default false */ autoSize?: boolean; } /** * Unified provider component that combines all common React setup for mcp-use widgets. * * Includes: * - StrictMode (always) * - ThemeProvider (always) * - BrowserRouter with automatic basename calculation (always) * - WidgetControls (if debugger={true} or viewControls is set) * - ErrorBoundary (always) * - Auto-sizing (if autoSize={true}) * * @example * ```tsx * <McpUseProvider debugger viewControls autoSize> * <AppsSDKUIProvider linkComponent={Link}> * <div>My widget content</div> * </AppsSDKUIProvider> * </McpUseProvider> * ``` */ export declare function McpUseProvider({ children, debugger: enableDebugger, viewControls, autoSize, }: McpUseProviderProps): React.JSX.Element; export {}; //# sourceMappingURL=McpUseProvider.d.ts.map