ReadonlyclientUnique identifier for the client type. Used for logging and telemetry attribution.
OptionaldisconnectGracefully release resources held by the client.
This method is OPTIONAL. If provided, it is called by ConnectionStateManager during disconnect to allow the client to close sockets, drain pools, flush buffers, etc.
Implementations should:
Resolves when cleanup is complete
OptionalhealthPerforms a health check to verify connectivity.
This method is OPTIONAL. If not provided, the framework assumes the client is healthy when connected.
When provided, this method is called:
Implementations should:
Health check result with status and optional details
Generic service client interface for connection management.
This interface defines the minimum contract that any service client must implement to work with the MCP server framework's connection state management and tool execution.
Example