MCP TypeScript SDK (V2)
    Preparing search index...

    Additional initialization options.

    type ProtocolOptions = {
        debouncedNotificationMethods?: string[];
        defaultTaskPollInterval?: number;
        enforceStrictCapabilities?: boolean;
        maxTaskQueueSize?: number;
        supportedProtocolVersions?: string[];
        taskMessageQueue?: TaskMessageQueue;
        taskStore?: TaskStore;
    }
    Index

    Properties

    debouncedNotificationMethods?: string[]

    An array of notification method names that should be automatically debounced. Any notifications with a method in this list will be coalesced if they occur in the same tick of the event loop. e.g., ['notifications/tools/list_changed']

    defaultTaskPollInterval?: number

    Default polling interval (in milliseconds) for task status checks when no pollInterval is provided by the server. Defaults to 5000ms if not specified.

    enforceStrictCapabilities?: boolean

    Whether to restrict emitted requests to only those that the remote side has indicated that they can handle, through their advertised capabilities.

    Note that this DOES NOT affect checking of local side capabilities, as it is considered a logic error to mis-specify those.

    Currently this defaults to false, for backwards compatibility with SDK versions that did not advertise capabilities correctly. In future, this will default to true.

    maxTaskQueueSize?: number

    Maximum number of messages that can be queued per task for side-channel delivery. If undefined, the queue size is unbounded. When the limit is exceeded, the TaskMessageQueue implementation's enqueue() method will throw an error. It's the implementation's responsibility to handle overflow appropriately (e.g., by failing the task, dropping messages, etc.).

    supportedProtocolVersions?: string[]

    Protocol versions supported. First version is preferred (sent by client, used as fallback by server). Passed to transport during connect().

    taskMessageQueue?: TaskMessageQueue

    Optional task message queue implementation for managing server-initiated messages that will be delivered through the tasks/result response stream.

    taskStore?: TaskStore

    Optional task storage implementation. If provided, enables task-related request handlers and provides task storage capabilities to request handlers.