Offeryn Rust MCP
Build tools for LLMs in Rust using Model Context Protocol
What is Offeryn Rust MCP?
Offeryn Rust MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to build tools for llms in rust using model context protocol
Build tools for LLMs in Rust using Model Context Protocol
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Build tools for LLMs in Rust using Model Context Protocol
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx offerynConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Offeryn Rust MCP
Offeryn is a Rust library and framework for building MCP (Model Context Protocol) servers that expose tools to LLMs like Claude. Using a simple #[mcp_tool] procedural macro, Rust developers can annotate structs with tool methods and have JSON Schema generation, parameter validation, and MCP protocol handling taken care of automatically. It supports both stdio transport (for Claude Desktop integration) and SSE transport (for web-based clients using Axum), making it suitable for high-performance, type-safe MCP server development in Rust.
Prerequisites
- Rust toolchain installed (stable channel, via rustup)
- Cargo build system (included with Rust)
- An MCP-compatible client such as Claude Desktop to test your server
- For SSE transport: Axum web framework dependency in Cargo.toml
Add offeryn to your Cargo.toml
Add offeryn as a dependency in your Rust project's Cargo.toml file.
[dependencies]
offeryn = { git = "https://github.com/avahowell/offeryn" }
tokio = { version = "1", features = ["full"] }Define your tools using the #[mcp_tool] macro
Annotate a struct with #[mcp_tool] and implement methods on it. Each method becomes a tool exposed to the LLM. Doc comments become tool descriptions, and method signatures become the JSON schema.
use offeryn::mcp_tool;
#[mcp_tool]
struct Calculator;
#[mcp_tool]
impl Calculator {
/// Add two numbers
fn add(&self, a: f64, b: f64) -> f64 {
a + b
}
/// Divide two numbers
fn divide(&self, a: f64, b: f64) -> Result<f64, String> {
if b == 0.0 { Err("Division by zero".to_string()) }
else { Ok(a / b) }
}
}Create the MCP server with stdio transport
Wire up the McpServer with your tools and run it with StdioTransport for Claude Desktop integration.
use offeryn::{McpServer, StdioTransport};
#[tokio::main]
async fn main() {
let mut server = McpServer::new("my-server", "1.0.0");
server.register_tools(Calculator);
let transport = StdioTransport::new();
server.run(transport).await.unwrap();
}Build the binary
Compile your Rust MCP server to a native binary.
cargo build --releaseConfigure Claude Desktop to use your server
Add the compiled binary to claude_desktop_config.json so Claude Desktop can launch and communicate with it.
{
"mcpServers": {
"my-rust-server": {
"command": "/path/to/your/project/target/release/my-server"
}
}
}Optionally use SSE transport for web clients
For HTTP-based MCP clients, use SseTransport with Axum to serve your tools over HTTP instead of stdio.
use offeryn::{McpServer, SseTransport};
use tokio::net::TcpListener;
#[tokio::main]
async fn main() {
let mut server = McpServer::new("my-server", "1.0.0");
server.register_tools(Calculator);
let router = SseTransport::create_router(&server);
let listener = TcpListener::bind("127.0.0.1:3000").await.unwrap();
axum::serve(listener, router).await.unwrap();
}Offeryn Rust MCP Examples
Client configuration
Example claude_desktop_config.json for a compiled offeryn-based MCP server binary.
{
"mcpServers": {
"my-rust-tools": {
"command": "/Users/yourname/my-mcp-project/target/release/my-mcp-server"
}
}
}Prompts to try
Example prompts once Claude Desktop is connected to an offeryn-based server with example Calculator tools.
- "Add 42 and 58"
- "Divide 100 by 7"
- "What tools do you have available from the Rust server?"
- "Calculate (15 * 3) + 22 using the available math tools"
- "What happens when you try to divide 5 by 0?"Troubleshooting Offeryn Rust MCP
Compilation errors with the #[mcp_tool] macro
Ensure you have the latest stable Rust toolchain ('rustup update stable'). The macro requires both the struct definition and the impl block to be annotated with #[mcp_tool]. Check that your method signatures use types that implement serde::Serialize and serde::Deserialize.
Claude Desktop does not connect to the binary
Use the absolute path to the compiled binary in claude_desktop_config.json (e.g., /Users/name/project/target/release/my-server). Run the binary manually in a terminal first to confirm it starts without errors. Also check that the binary has execute permissions: 'chmod +x target/release/my-server'.
SSE transport connection refused
Verify the TcpListener is bound to the correct address and port (default 127.0.0.1:3000). Ensure no other process is using that port ('lsof -i :3000'). For remote clients, change the bind address to 0.0.0.0:3000, and check firewall rules.
Frequently Asked Questions about Offeryn Rust MCP
What is Offeryn Rust MCP?
Offeryn Rust MCP is a Model Context Protocol (MCP) server that build tools for llms in rust using model context protocol It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Offeryn Rust MCP?
Follow the installation instructions on the Offeryn Rust MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Offeryn Rust MCP?
Offeryn Rust MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Offeryn Rust MCP free to use?
Yes, Offeryn Rust MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Offeryn Rust MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to Offeryn Rust MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Offeryn Rust MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Offeryn Rust MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.