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

    Interface CreateServerResult

    Result returned from createServer().

    interface CreateServerResult {
        initTelemetry: () => Promise<void>;
        notifyPromptListChanged: () => void;
        notifyResourceListChanged: () => void;
        notifyResourceUpdated: (uri: string) => void;
        notifyToolListChanged: () => void;
        start: () => Promise<void>;
        stop: () => Promise<void>;
    }
    Index

    Properties

    initTelemetry: () => Promise<void>

    Initialize OpenTelemetry before starting the server.

    Call as early as possible so OTEL auto-instrumentation can hook into HTTP/Express modules before they are loaded. No-op if telemetry is disabled. Falls back automatically in start() if not called explicitly.

    notifyPromptListChanged: () => void

    Notify all connected MCP clients that the prompt list has changed.

    notifyResourceListChanged: () => void

    Notify all connected MCP clients that the resource list has changed.

    notifyResourceUpdated: (uri: string) => void

    Notify subscribed MCP clients that a specific resource has been updated.

    Only clients that previously sent resources/subscribe for the given URI receive the notifications/resources/updated notification.

    Requires capabilities: { resources: { subscribe: true } } to be set.

    Type Declaration

      • (uri: string): void
      • Parameters

        • uri: string

          The resource URI that has changed

        Returns void

    notifyToolListChanged: () => void

    Notify all connected MCP clients that the tool list has changed.

    Call this when external state changes affect tool availability (e.g., API connection state, feature flags).

    start: () => Promise<void>

    Start the server.

    Type Declaration

      • (): Promise<void>
      • Returns Promise<void>

        Promise that resolves when server is fully started

    stop: () => Promise<void>

    Stop the server gracefully.

    Type Declaration

      • (): Promise<void>
      • Returns Promise<void>

        Promise that resolves when server is stopped