Files
zeekayandHanzo Dev 02b3f00cef chore: complete brand scrub of upstream mistral.rs lineage to hanzo/hanzoai
Replace all remaining references to the upstream project/author/framework
brands with hanzo / hanzoai across source, comments, docs, examples, and
build scripts.

- Project spellings mistral.rs / mistral-rs / mistralrs -> hanzo (and the
  hanzo-* crate/binary names in Dockerfiles, Makefile, install.ps1, .gitignore).
- Author EricLBuehler / EricBuehler / EricB / Eric Buehler -> hanzoai / Hanzo AI
  (incl. Cargo `authors` and LICENSE copyright).
- URLs: github.com/EricLBuehler/mistral.rs -> github.com/hanzoai/engine;
  ericlbuehler.github.io/mistral.rs -> hanzoai.github.io/engine;
  github.com/huggingface/candle -> github.com/hanzoai/ml;
  docs.rs/candle-* -> docs.rs/hanzo-ml; ghcr.io image -> ghcr.io/hanzoai/engine.
- Env var prefix MISTRALRS_ -> HANZO_ (producers and consumers kept in sync,
  incl. the build-script-injected HANZO_GIT_REVISION).
- ROCm static lib libmistralrsrocm.a / mistralrsrocm -> libhanzorocm.a / hanzorocm.
- localStorage keys mistralrs_settings -> hanzo_settings.

Deliberately preserved: real model architectures (struct Mistral, models/mistral.rs
file, Mixtral/Llama/Gemma/Qwen/Phi), real model-org HF repo-ids (mistralai/,
meta-llama/, google/, Qwen/, microsoft/), the `use hanzo_ml as candle` code
aliases and `candle::` identifiers, and the upstream-author HF data repo-id
suffix in "hanzoai/mistralrs_tests".

Both `cargo check` and `cargo check --features vulkan` pass with 0 errors.

Co-authored-by: Hanzo Dev <[email protected]>
2026-06-01 11:53:12 -07:00
..

hanzo-llm-mcp

Model Context Protocol (MCP) client implementation for hanzo.

This crate provides a client library for connecting to MCP servers and integrating external tools with language models. It supports multiple transport protocols (HTTP, WebSocket, Process) and provides automatic tool discovery and registration.

Features

  • Multi-transport Support: HTTP, WebSocket, and Process-based connections
  • Automatic Tool Discovery: Discovers and registers tools from connected MCP servers
  • Bearer Token Authentication: Supports authentication for secured MCP servers
  • Concurrent Tool Execution: Handles multiple tool calls efficiently with configurable limits
  • Timeout Control: Configurable timeouts for individual tool calls
  • Resource Access: Access to MCP server resources like files and data

Usage

use hanzo_llm_mcp::{McpClient, McpClientConfig, McpServerConfig, McpServerSource};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let config = McpClientConfig {
        servers: vec![
            McpServerConfig {
                id: "web_search".to_string(),
                name: "Web Search MCP".to_string(),
                source: McpServerSource::Http {
                    url: "https://api.example.com/mcp".to_string(),
                    timeout_secs: Some(30),
                    headers: None,
                },
                enabled: true,
                tool_prefix: Some("web".to_string()),
                resources: None,
                bearer_token: Some("your-api-token".to_string()),
            },
        ],
        auto_register_tools: true,
        tool_timeout_secs: Some(30),
        max_concurrent_calls: Some(10),
    };
    
    let mut client = McpClient::new(config);
    client.initialize().await?;
    
    let tools = client.get_tools();
    println!("Discovered {} tools", tools.len());
    
    Ok(())
}

See the MCP Client documentation for more details.