mcpClient

suspend fun mcpClient(clientInfo: Implementation, clientOptions: ClientOptions = ClientOptions(), transport: Transport): Client(source)

Initializes and connects an MCP client using the provided clientInfo Implementation, client options, and transport mechanism.

Return

An instance of Client that is connected and ready for use with the specified transport.

Parameters

clientInfo

The implementation details of the MCP client, including its name, version, and other metadata.

clientOptions

Optional client configuration settings, such as supported capabilities and strict enforcement options. Defaults to a new instance of ClientOptions.

transport

The transport mechanism used for communication.