MCPServerInitialization class final
The client context an MCP server is initialized with.
Legacy transports provide this once per connection after negotiating a
protocol version. Request-scoped transports provide it once per request.
Clients pass one to ServerConnection.initializeAcrossVersions.
Constructors
- MCPServerInitialization({required ProtocolVersion protocolVersion, required ClientCapabilities clientCapabilities, Implementation? clientInfo, LoggingLevel? logLevel})
-
Creates the context a server is initialized with.
const
Properties
- clientCapabilities → ClientCapabilities
-
The capabilities declared by the client.
final
- clientInfo → Implementation?
-
The implementation information declared by the client, if any.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- logLevel → LoggingLevel?
-
The log level the client asked for on this request, if any.
final
- protocolVersion → ProtocolVersion
-
The protocol version used for this connection or request.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited