TsgcWSAPIServer_MCPProperties › TransportOptions

TransportOptions Property

Enable/disable the HTTP and HTTP Streamable transports exposed by the server.

Syntax

property TransportOptions: TsgcWSMCPServerTransport_Options read FTransportOptions write SetTransportOptions;

Default Value

Remarks

Selects which MCP transports are accepted by the component. Http.Enabled keeps the classic short-lived request/response model where every connection closes after the response is delivered. HttpStreamable.Enabled turns on a long-lived streaming channel that keeps the HTTP session open so notifications (notifications/*) and server-initiated requests (RequestRootsList, RequestSamplingCreateMessage, RequestElicitationCreate) can be pushed at any time; when enabled, the underlying server’s KeepAlive and Server-Sent-Events fallback are activated automatically. HttpStreamable.ValidateOrigin enforces that every subsequent request in a session reuses the original Origin header to mitigate cross-site attacks.

Example

MCPServer.TransportOptions.Http.Enabled := True;
MCPServer.TransportOptions.HttpStreamable.Enabled := True;
MCPServer.TransportOptions.HttpStreamable.ValidateOrigin := True;

Back to Properties