ailoy-web
    Preparing search index...

    Interface MCPClientStartOptions

    interface MCPClientStartOptions {
        maxTotalTimeout?: number;
        onclose?: () => void;
        onerror?: (error: Error) => void;
        onmessage?: (message: JSONRPCMessage, extra?: MessageExtraInfo) => void;
        onprogress?: ProgressCallback;
        onresumptiontoken?: (token: string) => void;
        relatedRequestId?: RequestId;
        resetTimeoutOnProgress?: boolean;
        resumptionToken?: string;
        signal?: AbortSignal;
        timeout?: number;
    }

    Hierarchy

    • RequestOptions
      • MCPClientStartOptions
    Index

    Properties

    maxTotalTimeout?: number

    Maximum total time (in milliseconds) to wait for a response. If exceeded, an McpError with code RequestTimeout will be raised, regardless of progress notifications. If not specified, there is no maximum total timeout.

    onclose?: () => void
    onerror?: (error: Error) => void
    onmessage?: (message: JSONRPCMessage, extra?: MessageExtraInfo) => void
    onprogress?: ProgressCallback

    If set, requests progress notifications from the remote end (if supported). When progress notifications are received, this callback will be invoked.

    onresumptiontoken?: (token: string) => void

    A callback that is invoked when the resumption token changes, if supported by the transport.

    This allows clients to persist the latest token for potential reconnection.

    relatedRequestId?: RequestId

    If present, relatedRequestId is used to indicate to the transport which incoming request to associate this outgoing message with.

    resetTimeoutOnProgress?: boolean

    If true, receiving a progress notification will reset the request timeout. This is useful for long-running operations that send periodic progress updates. Default: false

    resumptionToken?: string

    The resumption token used to continue long-running requests that were interrupted.

    This allows clients to reconnect and continue from where they left off, if supported by the transport.

    signal?: AbortSignal

    Can be used to cancel an in-flight request. This will cause an AbortError to be raised from request().

    timeout?: number

    A timeout (in milliseconds) for this request. If exceeded, an McpError with code RequestTimeout will be raised from request().

    If not specified, DEFAULT_REQUEST_TIMEOUT_MSEC will be used as the timeout.