TsgcWSAPIServer_MCP › Methods › CloseSubscriptions
Gracefully closes every open subscriptions/listen stream.
procedure CloseSubscriptions;
Every subscription opened by a 2026-07-28 client receives its final response and the stream is closed, so the client knows the subscription ended on purpose. The method waits up to 3 seconds for the streams to finish. Call it before setting Server.Active to False; the component destructor calls it too. See Subscriptions.
MCPServer.CloseSubscriptions;
MCPServer.Server.Active := False;