McpClientConfig class

Configuration for creating MCP clients

Annotations
  • @immutable

Constructors

McpClientConfig({required String name, required String version, String? description, ClientCapabilities capabilities = const ClientCapabilities(), String? protocolVersion, int maxRetries = 3, Duration retryDelay = const Duration(seconds: 2), Duration requestTimeout = const Duration(seconds: 30), bool enableDebugLogging = false})
const

Properties

capabilities → ClientCapabilities
The capabilities supported by the client
final
description → String?
Spec 2025-11-25+: optional human-readable description of the client implementation, forwarded to clientInfo.description on initialize.
final
enableDebugLogging → bool
Whether to enable debug logging
final
hashCode → int
The hash code for this object.
no setteroverride
maxRetries → int
Maximum number of connection retry attempts
final
name → String
The name of the client application
final
protocolVersion → String?
Protocol revision to speak. Defaults to this build's default version.
final
requestTimeout → Duration
Timeout for individual requests
final
retryDelay → Duration
Delay between connection retry attempts
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version → String
The version of the client application
final

Methods

copyWith({String? name, String? version, String? description, ClientCapabilities? capabilities, String? protocolVersion, int? maxRetries, Duration? retryDelay, Duration? requestTimeout, bool? enableDebugLogging}) → McpClientConfig
Creates a copy of this config with the given fields replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override