OptionalauthAn OAuth client provider to use for authentication.
When an authProvider is specified and the SSE connection is started:
authProvider.authProvider is used to refresh the token.OAuthClientProvider.redirectToAuthorization is called, and an UnauthorizedError will be thrown from connect/start.After the user has finished authorizing via their user agent, and is redirected back to the MCP client application, call SSEClientTransport.finishAuth with the authorization code before retrying the connection.
If an authProvider is not provided, and auth is required, an UnauthorizedError will be thrown.
UnauthorizedError might also be thrown when sending any message over the SSE transport, indicating that the session has expired, and needs to be re-authed and reconnected.
OptionaleventCustomizes the initial SSE request to the server (the request that begins the stream).
NOTE: Setting this property will prevent an Authorization header from
being automatically attached to the SSE request, if an authProvider is
also given. This can be worked around by setting the Authorization header
manually.
OptionalfetchCustom fetch implementation used for all network requests.
OptionalrequestCustomizes recurring POST requests to the server.
Configuration options for the
SSEClientTransport.