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.

33 lines 1.33 kB
/** * Inspector Mounting * * Handles mounting of the MCP Inspector UI at /inspector endpoint. */ import type { Hono as HonoType } from "hono"; /** * Mount MCP Inspector UI at /inspector * * Dynamically loads and mounts the MCP Inspector UI package if available, providing * a web-based interface for testing and debugging MCP servers. The inspector * automatically connects to the local MCP server endpoints. * * This function gracefully handles cases where the inspector package is not installed, * allowing the server to function without the inspector in production environments. * * @param app - Hono app instance * @param serverHost - Server hostname * @param serverPort - Server port * @param isProduction - Whether the server is running in production mode * @returns Promise that resolves to true if inspector was mounted, false otherwise * * @example * If @mcp-use/inspector is installed: * - Inspector UI available at http://localhost:PORT/inspector * - Automatically connects to http://localhost:PORT/mcp (or /sse) * * If not installed: * - Server continues to function normally * - No inspector UI available */ export declare function mountInspectorUI(app: HonoType, serverHost: string, serverPort: number | undefined, isProduction: boolean): Promise<boolean>; //# sourceMappingURL=mount.d.ts.map