neva is a Rust SDK for building Model Context Protocol clients and servers with ergonomic APIs, async transports, and typed primitives for tools, resources, prompts, and protocol flows.

It is designed for developers who want Rust-level performance and reliability without turning simple MCP integrations into framework-heavy boilerplate.

Design principles

  • Ergonomic APIs over ceremony
  • Typed tools, resources, and prompts
  • Stdio and Streamable HTTP transports
  • Authentication and authorization as first-class concerns
  • Spec alignment without exposing unnecessary protocol noise

Server

use neva::prelude::*;

#[tool(descr = "A say hello tool")]
async fn hello(name: String) -> String {
    format!("Hello, {name}!")
}

#[tokio::main]
async fn main() {
    App::new()
        .with_options(|opt| opt.with_stdio())
        .run()
        .await;
}

Client

use neva::prelude::*;

#[tokio::main]
async fn main() -> Result<(), Error> {
    let mut client = Client::new()
        .with_options(|opt| opt
            .with_stdio("cargo", ["run", "greeting-server"]));

    client.connect().await?;

    let args = ("name", "John");
    let result = client.call_tool("hello", args).await?;

    // Prints: "Hello John!"
    println!("{:?}", result.content);

    client.disconnect().await
}

Why it exists

Rust is a strong fit for MCP infrastructure: fast, reliable, portable, and efficient.

But Rust libraries too often make simple things feel unnecessarily difficult. neva takes the opposite direction: keep the protocol model explicit, but make the common path straightforward.

The goal is to make MCP client and server development in Rust feel natural — without forcing developers to fight the type system, assemble excessive boilerplate, or fall back to Python just to move faster.