Table of Contents

SessionMode Property

Definition

Namespace
Codebelt.Extensions.Swashbuckle.AspNetCore.ModelContextProtocol
Assemblies
Codebelt.Extensions.Swashbuckle.AspNetCore.ModelContextProtocol.dll
Source
src/Codebelt.Extensions.Swashbuckle.AspNetCore.ModelContextProtocol/McpDocumentOptions.cs

SessionMode

Gets or sets the Streamable HTTP session mode used by MapMcp.

public HttpServerSessionMode SessionMode { get; set; }

Property Value

HttpServerSessionMode

Defaults to ModelContextProtocol.AspNetCore.HttpServerSessionMode.Stateless, the modern MCP-compatible mode.

Remarks

Keep this value aligned with ModelContextProtocol.AspNetCore.HttpServerTransportOptions.SessionMode. Stateless mode exposes only the POST endpoint. Stateful and hybrid modes also expose the session GET and DELETE endpoints for initialize-handshake clients. The EnableLegacySse option requires a non-stateless mode.