Class McpDiscoveryService
Hosted service that brings up registered MCP servers, runs the
initialize + tools/list handshake, and projects the discovered
tools into . Listens for
notifications/tools/list_changed and rebuilds descriptors when tools
mutate. For stdio transports, supervises the child process and restarts it
per .
public sealed class McpDiscoveryService : IHostedService, IAsyncDisposable
Inheritance
Implements
Methods
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or
public ValueTask DisposeAsync()
StartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
public Task StartAsync(CancellationToken cancellationToken)
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
public Task StopAsync(CancellationToken cancellationToken)