McpServerConfig class

Configuration for creating MCP servers

Annotations
  • @immutable

Constructors

McpServerConfig({required String name, required String version, ServerCapabilities capabilities = const ServerCapabilities(), bool enableDebugLogging = false, int maxConnections = 100, Duration requestTimeout = const Duration(seconds: 30), bool enableMetrics = false})
const

Properties

capabilities ServerCapabilities
The capabilities supported by the server
final
enableDebugLogging bool
Whether to enable debug logging
final
enableMetrics bool
Whether to enable performance metrics
final
hashCode int
The hash code for this object.
no setteroverride
maxConnections int
Maximum number of concurrent connections
final
name String
The name of the server application
final
requestTimeout Duration
Timeout for client requests
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version String
The version of the server application
final

Methods

copyWith({String? name, String? version, ServerCapabilities? capabilities, bool? enableDebugLogging, int? maxConnections, Duration? requestTimeout, bool? enableMetrics}) McpServerConfig
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