McpStreamableHttpClient class final
HTTP client for session-based MCP revisions and stateless MCP 2026.
For session-based revisions, the client keeps the negotiated MCP session headers and SSE cursor so consumer applications do not need to reimplement the transport details.
- Available extensions
Constructors
-
McpStreamableHttpClient(Uri endpoint, {HttpClient? httpClient, McpHttpClientFactory? subscriptionHttpClientFactory, Map<
String, String> headers = const <String, String>{}, McpJsonMap? clientInfo, McpJsonMap clientCapabilities = const <String, Object?>{}, String defaultProtocolVersion = latestSessionProtocolVersion, Duration requestTimeout = defaultRequestTimeout, int maxRequestBytes = defaultMaxRequestBytes, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) -
Creates a session-based Streamable HTTP MCP client for
endpoint. -
McpStreamableHttpClient.stateless(Uri endpoint, {required McpJsonMap clientInfo, McpJsonMap clientCapabilities = const <String, Object?>{}, HttpClient? httpClient, McpHttpClientFactory? subscriptionHttpClientFactory, Map<
String, String> headers = const <String, String>{}, Duration requestTimeout = defaultRequestTimeout, int maxRequestBytes = defaultMaxRequestBytes, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) -
Creates a sessionless client for MCP protocol revision
2026-07-28. -
McpStreamableHttpClient.statelessWithAuthGrant(Uri endpoint, ConnectanumHttpAuthGrant grant, {required McpJsonMap clientInfo, McpJsonMap clientCapabilities = const <String, Object?>{}, HttpClient? httpClient, McpHttpClientFactory? subscriptionHttpClientFactory, Map<
String, String> headers = const <String, String>{}, Duration requestTimeout = defaultRequestTimeout, int maxRequestBytes = defaultMaxRequestBytes, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) -
Creates a sessionless MCP 2026 client using an HTTP auth bridge grant.
factory
-
McpStreamableHttpClient.statelessWithBearerToken(Uri endpoint, String bearerToken, {required McpJsonMap clientInfo, McpJsonMap clientCapabilities = const <String, Object?>{}, HttpClient? httpClient, McpHttpClientFactory? subscriptionHttpClientFactory, Map<
String, String> headers = const <String, String>{}, Duration requestTimeout = defaultRequestTimeout, int maxRequestBytes = defaultMaxRequestBytes, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) - Creates a bearer-authenticated sessionless MCP 2026 client.
-
McpStreamableHttpClient.withAuthGrant(Uri endpoint, ConnectanumHttpAuthGrant grant, {HttpClient? httpClient, McpHttpClientFactory? subscriptionHttpClientFactory, Map<
String, String> headers = const <String, String>{}, McpJsonMap? clientInfo, McpJsonMap clientCapabilities = const <String, Object?>{}, String defaultProtocolVersion = latestSessionProtocolVersion, Duration requestTimeout = defaultRequestTimeout, int maxRequestBytes = defaultMaxRequestBytes, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) -
Creates a client for MCP HTTP endpoints using an HTTP auth bridge grant.
factory
-
McpStreamableHttpClient.withBearerToken(Uri endpoint, String bearerToken, {HttpClient? httpClient, McpHttpClientFactory? subscriptionHttpClientFactory, Map<
String, String> headers = const <String, String>{}, McpJsonMap? clientInfo, McpJsonMap clientCapabilities = const <String, Object?>{}, String defaultProtocolVersion = latestSessionProtocolVersion, Duration requestTimeout = defaultRequestTimeout, int maxRequestBytes = defaultMaxRequestBytes, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) - Creates a client for bearer-protected MCP HTTP endpoints.
-
McpStreamableHttpClient.withOAuthToken(Uri endpoint, McpOAuthTokenGrant grant, {HttpClient? httpClient, McpHttpClientFactory? subscriptionHttpClientFactory, Map<
String, String> headers = const <String, String>{}, McpJsonMap? clientInfo, McpJsonMap clientCapabilities = const <String, Object?>{}, String defaultProtocolVersion = latestSessionProtocolVersion, Duration requestTimeout = defaultRequestTimeout, int maxRequestBytes = defaultMaxRequestBytes, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) -
Creates a client authorized by a validated OAuth token
grant.factory
Properties
- clientCapabilities → McpJsonMap
-
Client capabilities sent during MCP initialization.
final
- clientInfo → McpJsonMap?
-
Client identity sent during MCP initialization, when configured.
final
- defaultProtocolVersion → String
-
Protocol revision used before a server negotiates another revision.
final
- endpoint → Uri
-
Absolute Streamable HTTP endpoint used by this client.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Default HTTP headers applied to outgoing MCP requests.
final
- lastEventId ↔ String?
-
Last accepted SSE event identifier used when resuming a stream.
getter/setter pair
- maxRequestBytes → int
-
Maximum raw byte length for each encoded JSON request body.
final
- maxResponseBytes → int
-
Maximum raw byte length for each buffered HTTP response or SSE event.
final
- protocolVersion ↔ String
-
MCP protocol revision currently used for requests.
getter/setter pair
- requestTimeout → Duration
-
Total deadline for one POST, GET, DELETE, or listener-setup exchange.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionId ↔ String?
-
Active MCP session identifier, or
nullfor a stateless client.getter/setter pair
Methods
-
callConnectanumMethod(
String method, {Object? id, McpJsonMap params = const <String, Object?>{}, bool streamable = true, bool includeSession = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Calls a Connectanum JSON method through the active MCP session.
-
callConnectanumMethodDirect(
String method, {Object? id, McpJsonMap params = const <String, Object?>{}, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Calls a Connectanum JSON method through the direct API.
-
callConnectanumToolDirect(
String name, {Object? id, McpJsonMap arguments = const <String, Object?>{}, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Calls a Connectanum JSON tool through the direct API.
-
callTool(
String name, {Object? id, McpJsonMap arguments = const <String, Object?>{}, bool streamable = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Calls an MCP tool through the active session.
-
callToolDirect(
String name, {Object? id, McpJsonMap arguments = const <String, Object?>{}, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Calls an MCP tool through the direct JSON API.
-
callToolDirectWithFormElicitation(
String name, {required McpFormElicitationHandler onElicitation, Object? id, McpJsonMap arguments = const <String, Object?>{}, String? protocolVersion, Map< String, String> headers = const <String, String>{}, int maxInputRequiredRounds = 8}) → Future<McpJsonMap> -
Calls a modern stateless tool directly and completes bounded form input
rounds through
onElicitation. -
callToolWithFormElicitation(
String name, {required McpFormElicitationHandler onElicitation, Object? id, McpJsonMap arguments = const <String, Object?>{}, bool streamable = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}, int maxInputRequiredRounds = 8}) → Future<McpJsonMap> -
Calls a modern stateless tool and completes bounded form input rounds
through
onElicitation. -
callWampMetaProcedure(
String procedure, {Object? id, List< Object?> ? arguments, McpJsonMap? argumentsKeywords, bool streamable = true, bool directJson = false, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
callWampMetaProcedureDirect(
String procedure, {Object? id, List< Object?> ? arguments, McpJsonMap? argumentsKeywords, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
close(
{bool force = false}) → void - Permanently closes this MCP client and rejects subsequent network work.
-
complete(
McpCompletionRequest completionRequest, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpCompletionResult> - Requests typed suggestions for a prompt or resource-template argument.
-
completeDirect(
McpCompletionRequest completionRequest, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpCompletionResult> - Requests completion without reading or mutating Streamable session state.
-
countWampRegistrationCallees(
int registrationId, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
countWampRegistrationCalleesDirect(
int registrationId, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
countWampSessions(
{Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
countWampSessionsDirect(
{Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
countWampSubscriptionSubscribers(
int subscriptionId, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
countWampSubscriptionSubscribersDirect(
int subscriptionId, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
createAuthorizationRequest(
{required McpAuthorizationServerMetadata authorizationServer, required String clientId, required Uri redirectUri, Iterable< String> scopes = const <String>[], McpPkcePair? pkce}) → McpAuthorizationRequest - Creates an OAuth authorization-code request for this MCP endpoint.
-
createDiscoveredAuthorizationRequest(
{required McpProtectedResourceDiscovery protectedResource, required McpAuthorizationServerDiscovery authorizationServer, required String clientId, required Uri redirectUri, Iterable< String> additionalScopes = const <String>[], McpPkcePair? pkce}) → McpAuthorizationRequest - Creates an initial OAuth request bound to validated MCP discovery.
-
createStepUpAuthorizationRequest(
{required McpOAuthTokenGrant currentGrant, required McpStreamableHttpException authorizationFailure, required Uri redirectUri, Iterable< String> previouslyRequestedScopes = const <String>[], McpPkcePair? pkce}) → McpAuthorizationRequest - Builds a resource-bound OAuth request for an MCP scope challenge.
-
deleteSession(
{Map< String, String> headers = const <String, String>{}}) → Future<void> - Terminates the active server-side MCP session and clears local state.
-
describeWampApi(
String uri, {Object? id, String? kind, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
describeWampApiDirect(
String uri, {Object? id, String? kind, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
discover(
{Object? id, Map< String, String> headers = const <String, String>{}}) → Future<McpStatelessDiscoveryResult> - Discovers an MCP 2026 server without creating a protocol session.
-
discoverAuthorizationServerMetadata(
Uri issuer, {Map< String, String> headers = const <String, String>{}, int maxMetadataBytes = 1024 * 1024, Duration timeout = const Duration(seconds: 10)}) → Future<McpAuthorizationServerDiscovery> - Discovers validated OAuth metadata for an advertised authorization server.
-
discoverProtectedResourceMetadata(
{Map< String, String> headers = const <String, String>{}, int maxMetadataBytes = 1024 * 1024, Duration timeout = const Duration(seconds: 10)}) → Future<McpProtectedResourceDiscovery> - Discovers OAuth Protected Resource Metadata without using session state.
-
exchangeAuthorizationCode(
McpAuthorizationCode authorizationCode, {required McpOAuthClientAuthentication clientAuthentication, Map< String, String> headers = const <String, String>{}, Duration timeout = const Duration(seconds: 30), int maxResponseBytes = 64 * 1024}) → Future<McpOAuthTokenGrant> - Exchanges an OAuth authorization code for an access-token grant.
-
getPrompt(
String name, {Object? id, Map< String, String> arguments = const <String, String>{}, bool streamable = true, bool directJson = false, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Resolves a prompt through the active MCP session.
-
getPromptDirect(
String name, {Object? id, Map< String, String> arguments = const <String, String>{}, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Resolves a prompt through the direct JSON API.
-
getWampRegistration(
int registrationId, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
getWampRegistrationDirect(
int registrationId, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
getWampSession(
int sessionId, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
getWampSessionDirect(
int sessionId, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
getWampSubscription(
int subscriptionId, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
getWampSubscriptionDirect(
int subscriptionId, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
initialize(
{Object? id = 'initialize', McpJsonMap capabilities = const <String, Object?>{}, McpJsonMap clientInfo = const <String, Object?>{'name' : 'connectanum_client', 'version' : '3.0.0-beta.5'}, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Initializes a session-based MCP connection and captures its session ID.
-
listConnectanumToolsDirect(
{Object? id, String? cursor, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableToolListPage> - Lists Connectanum JSON tools from the direct API catalog.
-
listen(
{Object? id, bool toolsListChanged = false, bool promptsListChanged = false, bool resourcesListChanged = false, Iterable< String> resourceSubscriptions = const <String>[], Map<String, String> headers = const <String, String>{}}) → Future<McpStreamableSubscription> - Opens a resumable Streamable HTTP listener for server notifications.
-
listPrompts(
{Object? id, String? cursor, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamablePromptListPage> - Lists one page of prompts through the active MCP session.
-
listPromptsDirect(
{Object? id, String? cursor, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamablePromptListPage> - Lists one page of prompts through the direct JSON API.
-
listResources(
{Object? id, String? cursor, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableResourceListPage> - Lists one page of resources through the active MCP session.
-
listResourcesDirect(
{Object? id, String? cursor, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableResourceListPage> - Lists one page of resources through the direct JSON API.
-
listResourceTemplates(
{Object? id, String? cursor, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableResourceTemplateListPage> - Lists one page of resource templates through the MCP session.
-
listResourceTemplatesDirect(
{Object? id, String? cursor, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableResourceTemplateListPage> - Lists one page of resource templates through the direct JSON API.
-
listTools(
{Object? id, String? cursor, bool streamable = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableToolListPage> - Lists one page of tools through the active MCP session.
-
listToolsDirect(
{Object? id, String? cursor, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableToolListPage> - Lists one page of tools through the direct JSON API.
-
listWampApi(
{Object? id, String? kind, String? tag, String? cursor, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampApiDirect(
{Object? id, String? kind, String? tag, String? cursor, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampRegistrationCallees(
int registrationId, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampRegistrationCalleesDirect(
int registrationId, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampRegistrations(
{Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampRegistrationsDirect(
{Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampSessions(
{Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampSessionsDirect(
{Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampSubscriptions(
{Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampSubscriptionsDirect(
{Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampSubscriptionSubscribers(
int subscriptionId, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
listWampSubscriptionSubscribersDirect(
int subscriptionId, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
lookupWampRegistration(
String procedure, {Object? id, String? match, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
lookupWampRegistrationDirect(
String procedure, {Object? id, String? match, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
lookupWampSubscription(
String topic, {Object? id, String? match, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
lookupWampSubscriptionDirect(
String topic, {Object? id, String? match, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
matchWampRegistration(
String procedure, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
matchWampRegistrationDirect(
String procedure, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
matchWampSubscription(
String topic, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
matchWampSubscriptionDirect(
String topic, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampMetaCallResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notification(
String method, {McpJsonMap? params, bool streamable = true, bool includeSession = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Sends an arbitrary JSON-RPC notification through the MCP session.
-
notificationDirect(
String method, {McpJsonMap? params, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Sends an arbitrary JSON-RPC notification through the direct API.
-
notifyConnectanumMethod(
String method, {McpJsonMap params = const <String, Object?>{}, bool streamable = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Sends a Connectanum JSON method notification through the MCP session.
-
notifyConnectanumMethodDirect(
String method, {McpJsonMap params = const <String, Object?>{}, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Sends a Connectanum JSON method notification through the direct API.
-
notifyConnectanumToolDirect(
String name, {McpJsonMap arguments = const <String, Object?>{}, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Sends a Connectanum JSON tool notification through the direct API.
-
notifyInitialized(
{Map< String, String> headers = const <String, String>{}}) → Future<void> -
Sends the MCP
notifications/initializedlifecycle notification. -
notifyTool(
String name, {McpJsonMap arguments = const <String, Object?>{}, bool streamable = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Invokes an MCP tool as a notification through the active session.
-
notifyToolDirect(
String name, {McpJsonMap arguments = const <String, Object?>{}, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Invokes an MCP tool notification through the direct JSON API.
-
notifyWampEvent(
String topic, {List< Object?> ? arguments, McpJsonMap? argumentsKeywords, McpJsonMap? options, bool streamable = true, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<void> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
notifyWampEventDirect(
String topic, {List< Object?> ? arguments, McpJsonMap? argumentsKeywords, McpJsonMap? options, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<void> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
ping(
{Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Pings the active MCP session.
-
pingDirect(
{Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Pings the endpoint through the direct JSON API.
-
poll(
{String? lastEventId, Map< String, String> headers = const <String, String>{}}) → Future<List< McpSseEvent> > - Polls pending Streamable HTTP events for the active session.
-
pollWampEvents(
String handle, {Object? id, int? limit, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampEventBatch> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
pollWampEventsDirect(
String handle, {Object? id, int? limit, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampEventBatch> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
post(
McpJsonMap message, {bool streamable = true, bool includeSession = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap?> - Posts one JSON-RPC message through the active MCP session.
-
postBatch(
List< McpJsonMap> messages, {bool streamable = true, bool includeSession = true, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<List< McpJsonMap> ?> - Posts a JSON-RPC batch through the active MCP session.
-
postBatchDirect(
List< McpJsonMap> messages, {String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<List< McpJsonMap> ?> - Posts a JSON-RPC batch through the direct JSON API.
-
postDirect(
McpJsonMap message, {String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap?> - Posts one JSON-RPC message through the direct JSON API.
-
publishWampEvent(
String topic, {Object? id, List< Object?> ? arguments, McpJsonMap? argumentsKeywords, bool? acknowledge, McpJsonMap? options, bool streamable = true, bool directJson = false, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<McpStreamableWampPublicationResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
publishWampEventDirect(
String topic, {Object? id, List< Object?> ? arguments, McpJsonMap? argumentsKeywords, bool? acknowledge, McpJsonMap? options, String? protocolVersion, Map<String, String> headers = const <String, String>{}}) → Future<McpStreamableWampPublicationResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
readResource(
String uri, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<List< McpJsonMap> > - Reads a resource through the active MCP session.
-
readResourceDirect(
String uri, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<List< McpJsonMap> > - Reads a resource through the direct JSON API.
-
refreshOAuthToken(
McpOAuthTokenGrant grant, {required McpOAuthClientAuthentication clientAuthentication, Iterable< String> ? scopes, Map<String, String> headers = const <String, String>{}, Duration timeout = const Duration(seconds: 30), int maxResponseBytes = 64 * 1024}) → Future<McpOAuthTokenGrant> - Refreshes a resource-bound OAuth grant without changing MCP session state.
-
registerOAuthClient(
McpAuthorizationServerMetadata authorizationServer, {required McpOAuthDynamicClientRegistrationRequest registration, String? initialAccessToken, Map< String, String> headers = const <String, String>{}, Duration timeout = const Duration(seconds: 30), int maxResponseBytes = 64 * 1024}) → Future<McpOAuthDynamicClientRegistration> - Registers an OAuth client with the discovered authorization server.
-
replaceAuthGrant(
ConnectanumHttpAuthGrant grant) → void - Replaces the router HTTP-auth grant used for subsequent MCP requests.
-
replaceOAuthToken(
McpOAuthTokenGrant grant) → void - Replaces the OAuth access token used for subsequent MCP HTTP requests.
-
request(
String method, {Object? id, McpJsonMap? params, bool streamable = true, bool includeSession = true, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Sends a stateful JSON-RPC request using the active MCP session.
-
requestDirect(
String method, {Object? id, McpJsonMap? params, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpJsonMap> - Sends a direct JSON API request without MCP session headers.
-
revokeOAuthToken(
McpOAuthTokenGrant grant, {required McpOAuthClientAuthentication clientAuthentication, McpOAuthTokenKind tokenKind = McpOAuthTokenKind.refreshToken, Map< String, String> headers = const <String, String>{}, Duration timeout = const Duration(seconds: 30), int maxResponseBytes = 64 * 1024}) → Future<void> - Revokes one OAuth grant credential without changing MCP session state.
-
subscribeResource(
String uri, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Subscribes the active MCP session to resource updates.
-
subscribeWampTopic(
String topic, {Object? id, int? queueLimit, McpJsonMap? options, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampSubscriptionResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
subscribeWampTopicDirect(
String topic, {Object? id, int? queueLimit, McpJsonMap? options, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampSubscriptionResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribeResource(
String uri, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<void> - Unsubscribes the active MCP session from resource updates.
-
unsubscribeWampTopic(
String handle, {Object? id, bool streamable = true, bool directJson = false, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampUnsubscribeResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
-
unsubscribeWampTopicDirect(
String handle, {Object? id, String? protocolVersion, Map< String, String> headers = const <String, String>{}}) → Future<McpStreamableWampUnsubscribeResult> -
Available on McpStreamableHttpClient, provided by the McpStreamableConnectanumWampTools extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
discoverHttpAuthClient(
Uri endpoint, {required String realm, HttpClient? httpClient, Map< String, String> headers = const <String, String>{}, Duration requestTimeout = defaultRequestTimeout, int maxResponseBytes = defaultMaxResponseBytes, bool closeHttpClient = false}) → Future<ConnectanumHttpAuthClient> - Discovers a same-origin HTTP auth bridge advertised by a protected MCP endpoint.
Constants
- defaultMaxRequestBytes → const int
- Default maximum raw byte length for encoded JSON request bodies.
- defaultMaxResponseBytes → const int
- Default maximum raw byte length for buffered responses and SSE events.
- defaultRequestTimeout → const Duration
- Default total deadline for one MCP HTTP exchange.
- latestProtocolVersion → const String
- Latest supported stateless MCP protocol revision.
- latestSessionProtocolVersion → const String
- Latest supported session-based MCP protocol revision.