LogoLogo
  • πŸŽ‰Welcome To Fabelis.AI
  • ❓What Is Fabelis?
  • πŸ›£οΈRoadmap
  • 🀝How To Contribute
  • Playground
    • πŸ›What is the Playground?
    • Chatroom
    • Tool Configuration
    • Character
    • Settings
  • MCP
    • Overview
    • Run a Client
  • Create a Server
  • Active Backends
  • AGENT
    • πŸƒHow To Run
    • 🏌️Character File
    • CLI Chatbot
    • Twitter Agent
    • πŸ‡ΊπŸ‡ΈTruth Social
    • Discord Bot
    • Telegram Bot
  • What We Support
  • Environment
  • Support
Powered by GitBook
On this page
  1. MCP

Run a Client

PreviousOverviewNextCreate a Server

Last updated 3 months ago

The best place to find an example is the main repo

// 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);
https://github.com/fabelis/mcp-core/tree/main/examples/client