// Clients can be configured in just a few lines!
let transport = ClientSseTransport::builder("https://my.mcpdomain.com".to_string()).build();
transport.open().await?;
let mcp_client = Arc::new(McpClient::builder(transport).use_strict().build());
let mcp_client_clone = mcp_client.clone();
tokio::spawn(async move { mcp_client_clone.start().await });
mcp_client
.initialize(Implementation {
name: "mcp-client".to_string(),
version: "0.1.0".to_string(),
})
.await?;
let tools = mcp_client.list_tools(None, None).await?.tools;
println!("Tools: {:?}", tools);