Skip to content

jeremychone/rust-agentic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Support library for building Agentic MCP and Agent2Agent-based services.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages