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.
24 lines • 1.05 kB
TypeScript
/**
* MCP Endpoint Mounting
*
* Main orchestration function for mounting MCP endpoints at /mcp and /sse.
* Uses a single native SDK transport instance to handle all sessions.
*/
import type { Hono as HonoType } from "hono";
import type { SessionData } from "../sessions/index.js";
import type { ServerConfig } from "../types/index.js";
/**
* Mount MCP server endpoints at /mcp and /sse
*
* Uses FetchStreamableHTTPServerTransport (Web Standard APIs) for proper bidirectional communication.
* Follows the official Hono example from PR #1209.
*/
export declare function mountMcp(app: HonoType, mcpServerInstance: {
getServerForSession: () => import("@modelcontextprotocol/sdk/server/mcp.js").McpServer;
cleanupSessionSubscriptions?: (sessionId: string) => void;
}, // The McpServer instance with getServerForSession() method
sessions: Map<string, SessionData>, config: ServerConfig, isProductionMode: boolean): Promise<{
mcpMounted: boolean;
idleCleanupInterval?: NodeJS.Timeout;
}>;
//# sourceMappingURL=mount-mcp.d.ts.map