# Agentic - MCP and A2A Support Library in Rust
<div align="center">
<a href="https://crates.io/crates/agentic"><img src="https://img.shields.io/crates/v/agentic.svg" /></a>
<a href="https://github.com/jeremychone/rust-agentic"><img alt="Static Badge" src="https://img.shields.io/badge/GitHub-Repo?color=%23336699"></a>
</div>
**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](examples/client-c01-simple.rs).
### 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](https://crates.io/crates/rpc-router) for JSON-RPC support and will use the [genai](https://crates.io/crates/genai) crate for multi-AI provider/model support.
```rust
// -- 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](https://aipack.ai) runtime to become an MCP Host, Client, and Server(s), basically allowing AI Packs to use MCP Service or even be MCP services themselves.
- Discord https://discord.gg/6KkpQBKGFS