#mcp #openai #agent #ollama #system #agent2-agent

agentic

Support library for building Agentic MCP and Agent2Agent based systems

3 releases

Uses new Rust 2024

new 0.0.3 Apr 30, 2025
0.0.2 Apr 19, 2025
0.0.1 Jun 4, 2024

#249 in Machine learning

Download history 4/week @ 2025-02-26 149/week @ 2025-04-16 12/week @ 2025-04-23

161 downloads per month

MIT/Apache

120KB
2.5K SLoC

Agentic - MCP and A2A Support Library in Rust

Static Badge

IN PROGRESS: Building this as we speak...

The agentic crate in Rust provides essential building blocks for developing agentic applications and systems through an ergonomic API for core components such as MCP and Agent-to-Agent support.

version 0.0.3 is starting to have a solid representation of all the major MCP types and a first pass at the MCP Client interface for most MCP requests and responses. See examples/c01-client-simple.

Goal

The two main submodules are:

  • agentic::mcp provides support for the MCP Client and Server.
  • agentic::a2a (coming later) provides support for A2A Client and Server protocols.

The Agentic crate uses rpc-router for JSON-RPC support and will use the genai crate for multi-AI provider/model support.

// -- Create MCP Client
let mut client = Client::new("Demo Client", "0.1.0");
let transport = ClientStdioTransportConfig::new(
    // cmd and args
    "npx",
    ["-y", "@modelcontextprotocol/server-puppeteer"],
    None,
);

// -- Connect
client.connect(transport).await?;

// -- List tools
let res = client.send_request(ListToolsParams::default()).await?;

let list_tools = res.result;

// -- Print tool names
for tool in list_tools.tools.iter() {
    println!("->> {}", tool.name);
}

For now, most MCP requests/responses are supported over Stdio (SSE support is coming later).

Next steps for MCP Support

  • MCP Client (agentic::mcp::client::Client)
    • Add full support for notifications (right now we have the types, but not end-to-end)
    • Add genai support for tooling AI prompting
    • Add support for sampling
    • Add SSE ClientSseTransport

Once MCP Client support is more complete, we will add MCP Server.

  • MCP Server (agentic::mcp::server::Server)
    • First ServerStdioTransport
    • Support most of the workflow
    • Then add ServerSseTransport (probably with Axum)

Aipack Integration

One of the key goals of this library is to enable the AIPACK runtime to become an MCP Host, Client, and Server(s), basically allowing AI Packs to use MCP Service or even be MCP services themselves.

Dependencies

~7–17MB
~166K SLoC