MCP Server Framework - v1.0.0
    Preparing search index...

    Interface HandlersConfig

    Protocol handler configuration.

    Allows customizing behavior when MCP protocol events occur. All handlers are optional - the framework provides default behavior.

    Note: Cancellation is handled automatically by the framework. There is no hook for cancellation as it must always abort requests.

    const handlers: HandlersConfig = {
    onPing: () => metrics.increment('mcp.ping'),
    };
    interface HandlersConfig {
        onPing?: PingHandler;
    }
    Index

    Properties

    Properties

    onPing?: PingHandler

    Called when a ping request is received.

    Use for health checks, metrics, or heartbeat tracking. Return value is ignored (ping always returns empty object).