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

    Interface ReadinessConfig

    Readiness endpoint configuration.

    Provides a generic readiness check hook for the /ready endpoint. Consumers implement their own readiness logic (API connectivity, database health, external service checks, etc.).

    const server = createServer({
    name: 'my-server',
    version: '1.0.0',
    transport: { mode: 'http' },
    health: {
    readinessCheck: async () => {
    const ok = await myApi.ping();
    return ok || 'API not reachable';
    },
    serviceLabel: 'my-api',
    },
    });
    interface ReadinessConfig {
        readinessCheck?: () => string | boolean | Promise<string | boolean>;
        serviceLabel?: string;
    }
    Index

    Properties

    readinessCheck?: () => string | boolean | Promise<string | boolean>

    Custom readiness check. Called on every GET /ready request.

    • Return true (or undefined/no check configured) → 200 (ready)
    • Return false → 503 (not ready)
    • Return a string → 503 with the string as reason
    serviceLabel?: string

    Label for the service in health responses.

    'service'