Table of Contents

Class InitializeRequestParams

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents the parameters used with a Initialize request sent by a client to a server during the protocol handshake.

public class InitializeRequestParams : RequestParams
Inheritance
InitializeRequestParams
Inherited Members

Remarks

The InitializeRequestParams is the first message sent in the Model Context Protocol communication flow. It establishes the connection between client and server, negotiates the protocol version, and declares the client's capabilities.

After sending this request, the client should wait for an InitializeResult response before sending an InitializedNotification notification to complete the handshake.

See the schema for details.

Properties

Capabilities

Gets or sets the client's capabilities.

[JsonPropertyName("capabilities")]
public ClientCapabilities? Capabilities { get; init; }

Property Value

ClientCapabilities

Remarks

Capabilities define the features the client supports, such as "sampling" or "roots".

ClientInfo

Gets or sets information about the client implementation, including its name and version.

[JsonPropertyName("clientInfo")]
public required Implementation ClientInfo { get; init; }

Property Value

Implementation

Remarks

This information is required during the initialization handshake to identify the client. Servers may use this information for logging, debugging, or compatibility checks.

ProtocolVersion

Gets or sets the version of the Model Context Protocol that the client wants to use.

[JsonPropertyName("protocolVersion")]
public required string ProtocolVersion { get; init; }

Property Value

string

Remarks

Protocol version is specified using a date-based versioning scheme in the format "YYYY-MM-DD". The client and server must agree on a protocol version to communicate successfully.

During initialization, the server will check if it supports this requested version. If there's a mismatch, the server will reject the connection with a version mismatch error.

See the protocol specification for version details.