SessionMode Property
Definition
- Assemblies
- Codebelt.Extensions.Swashbuckle.AspNetCore.ModelContextProtocol.dll
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.