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

    Interface HealthConfig<TService>

    Health endpoint configuration for API connectivity monitoring.

    Allows consumers to wire their ConnectionStateManager to the /ready endpoint so readiness probes reflect the actual API connection state.

    Without this configuration, the /ready endpoint reports api: { configured: false, state: 'unknown', connected: false }.

    const server = createServer({
    name: 'my-server',
    version: '1.0.0',
    transport: { mode: 'http' },
    health: {
    connectionManager: myConnectionManager,
    isApiConfigured: () => !!process.env.MY_API_URL,
    apiLabel: 'my-api',
    },
    });
    interface HealthConfig<TService extends ServiceClient = ServiceClient> {
        apiLabel?: string;
        connectionManager?: ConnectionStateManager<TService>;
        isApiConfigured?: () => boolean;
    }

    Type Parameters

    Index

    Properties

    apiLabel?: string

    Label for the API in health responses (e.g., 'my-api', 'docker').

    'api'
    
    connectionManager?: ConnectionStateManager<TService>

    Connection state manager for API health checks. If not provided, API connectivity checks are skipped.

    isApiConfigured?: () => boolean

    Function to check if the API is configured. If not provided, defaults to checking for API_URL env var.