import type { FastMCP } from 'fastmcp'; /** * Server lifecycle management utilities */ export interface ServerLifecycleHooks { onStart?: (server: FastMCP) => Promise; onStop?: (server: FastMCP) => Promise; onError?: (error: Error, server: FastMCP) => Promise; } /** * Manages the lifecycle of an MCP server with proper startup/shutdown handling */ export declare class ServerLifecycleManager { private server; private hooks; private isRunning; constructor(server: FastMCP, hooks?: ServerLifecycleHooks); /** * Start the server with lifecycle hooks */ start(): Promise; /** * Stop the server gracefully */ stop(): Promise; /** * Get the server instance */ getServer(): FastMCP; /** * Check if server is running */ isServerRunning(): boolean; } /** * Setup graceful shutdown handlers for the server */ export declare function setupGracefulShutdown(manager: ServerLifecycleManager): void; //# sourceMappingURL=ServerLifecycle.d.ts.map