| Crates.io | agenterra-rmcp |
| lib.rs | agenterra-rmcp |
| version | 0.1.5 |
| created_at | 2025-06-25 00:27:04.107042+00 |
| updated_at | 2025-06-25 00:27:04.107042+00 |
| description | Agenterra fork of Rust SDK for Model Context Protocol |
| homepage | https://github.com/clafollett/agenterra-rmcp |
| repository | https://github.com/clafollett/agenterra-rmcp/ |
| max_upload_size | |
| id | 1725150 |
| size | 605,948 |
An Agenterra fork of the official Rust Model Context Protocol SDK implementation with tokio async runtime.
Note: This is a fork of the official Rust SDK for the Model Context Protocol. We maintain this fork to provide a stable, published version on crates.io while staying in sync with upstream changes.
This project is based on the official Model Context Protocol Rust SDK developed by Anthropic and the MCP community. The original repository can be found at: https://github.com/modelcontextprotocol/rust-sdk
All credit for the core implementation goes to the original authors. This fork exists to:
Provide published crates on crates.io under the agenterra-rmcp namespace
Enable easier integration for projects that need a stable, versioned dependency
Maintain compatibility with upstream changes
This repository contains the following crates:
agenterra-rmcp = { version = "0.1", features = ["server"] }
## or from git
agenterra-rmcp = { git = "https://github.com/agenterra/agenterra-rmcp", branch = "main" }
Basic dependencies:
use agenterra_rmcp::{ServiceExt, transport::{TokioChildProcess, ConfigureCommandExt}};
use tokio::process::Command;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = ().serve(TokioChildProcess::new(Command::new("npx").configure(|cmd| {
cmd.arg("-y").arg("@modelcontextprotocol/server-everything");
}))?).await?;
Ok(())
}
use tokio::io::{stdin, stdout};
let transport = (stdin(), stdout());
You can easily build a service by using ServerHandler or ClientHandler.
let service = common::counter::Counter::new();
// this call will finish the initialization process
let server = service.serve(transport).await?;
Once the server is initialized, you can send requests or notifications:
// request
let roots = server.list_roots().await?;
// or send notification
server.notify_cancelled(...).await?;
let quit_reason = server.waiting().await?;
// or cancel it
let quit_reason = server.cancel().await?;
See examples
See oauth_support for details.
See docs/CONTRIBUTE.MD to get some tips for contributing.
If you want to use dev container, see docs/DEVCONTAINER.md for instructions on using Dev Container for development.