1. Conduid
  2. Developer Tools
  3. Kuri
MCP server · Developer Tools

Kuri

Ergonomic framework to write MCP Servers in Rust

Unclaimed last commit a year ago devtools
39Low

Scored 7 months ago · breakdown

About Kuri

Kuri is an MCP server published by itsaphel in the Developer Tools category: ergonomic framework to write MCP Servers in Rust.

The repository has 12 stars and 1 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/itsaphel/kuri

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Kuri

Powered by Claude · Grounded in docs

I know everything about Kuri. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

kuri (栗 or くり)

kuri is a framework to build Model Context Protocol (MCP) servers, focused on developer ergonomics and clarity.

Build status Crates.io Documentation

MCP allows an LLM to execute predefined functions (called 'tools'), which allow it to fetch data and have side effects (ie: interact with the outside world). The LLM just needs to provide the input arguments of the function, which is then executed and the response is returned to the model. These tools are provided by "MCP servers", which can be ran locally, and a single server can provide multiple tools.

Design philosophy

Rust is an excellent language to write reliable MCP servers, with its strong type system and correctness guarantees. kuri aims to make MCP server programming in Rust extremely pleasant, to facilitate using Rust for building MCP servers. Our design goals are:

  • Ergonomic developer experience: MCP server programming should feel like normal Rust programming. Tools and prompts are just plain async Rust functions.
  • Minimal use of macros (#[tool], #[prompt]): only for attaching tool and argument descriptions, not complex code generation.
  • Minimal boilerplate: focus on your application logic, not on serialisation or MCP protocol routing.
  • Take advantage of the tower ecosystem of middleware, services and utilities. Get timeouts, tracing, panic-handling, and more for free, and re-use components from axum, tonic and hyper.

The above is some of what sets us apart from other MCP server crates. We're focused on doing one thing, and doing it really well. And there's no magic complex macros, your application code remains self-explanatory, and kuri's internals are clean to read and understand. kuri also builds on tower, allowing you to re-use a rich ecosystem of middleware and layers.

Example

use kuri::{MCPServiceBuilder, ServiceExt, ToolError, prompt, serve, tool, transport::StdioTransport};
use schemars::JsonSchema;
use serde::Deserialize;

#[derive(Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub enum Operation {
    Add,
    Subtract,
    Multiply,
    Divide,
}

// A pure function that takes three inputs and returns an integer. Descriptions
// for the tool and its parameters help the model decide which tool to use, and
// correctly supply the tool's parameters.
#[tool(
    description = "Perform basic arithmetic operations",
    params(
        x = "First number in the calculation",
        y = "Second number in the calculation",
        operation = "The operation to perform (add, subtract, multiply, divide)"
    )
)]
async fn calculator(x: i32, y: i32, operation: Operation) -> Result<i32, ToolError> {
    match operation {
        Operation::Add => Ok(x + y),
        Operation::Subtract => Ok(x - y),
        Operation::Multiply => Ok(x * y),
        Operation::Divide => {
            if y == 0 {
                Err(ToolError::ExecutionError("Division by zero".to_string()))
            } else {
                Ok(x / y)
            }
        }
    }
}

// Creates a prompt template for text summarisation. The application provides
// the text to summarise, and an optional format parameter (denoted using Rust's
// `Option` type). kuri tells the model that `format` may be omitted.
#[prompt(
    description = "Generates a prompt for summarising text",
    params(
        text = "The text to summarise",
        format = "Optional format for the summary (eg: 'bullet points' or 'Shakespeare')"
    )
)]
async fn summarise_text(text: String, format: Option<String>) -> String {
    let format_instruction = match format {
        Some(f) => format!(" in the format of {}", f),
        None => String::new(),
    };

    format!(
        "Please summarize the following text{}:\n\n{}",
        format_instruction, text
    )
}

#[tokio::main]
async fn main() -> Result<(), TransportError> {
    // Create the MCP service with the server's name
    let service = MCPServiceBuilder::new("kuri's test server".to_string())
        // Register the tool and prompt
        .with_tool(Calculator)
        .with_prompt(SummariseText)
        .build();

    // Serve over the stdio transport
    serve(service.into_request_service(), StdioTransport::new()).await
}

More in the examples

To get started, add kuri and some necessary dependencies to your Cargo.toml:

[dependencies]
kuri = "0.1"
async-trait = "0.1"
schemars = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["full"] }

MCP specification support

  • Core lifecycle: connection initialisation, capability negotiation, and session control
  • Tools: Feature complete with tests
  • Prompts: Mostly complete with tests
  • Resources
  • Transports
  • Extra (optional) features

Our current priorities are adding HTTP transport support, stabilising the API, and ensuring full support of the core specification.

Contributing

The goal of this project is to build a pleasant, ergonomic, idiomatic Rust library for building MCP Servers. It's in an early phase, so the structure can still change. If you enjoy any of Rust, MCP, building crates, or network protocols (maybe you're into protohackers!), we'd love to have you! Get involved in the repo, or reach out by email if you want to chat!

If you've used this framework for your project: thanks for trying it out! I'd love to hear about your experience!

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Kuri

How do I install Kuri?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Kuri safe to use with an AI agent?

Its trust score is 39 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Kuri still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.