Offeryn Rust MCP

v1.0.0Developer Toolsstable

Build tools for LLMs in Rust using Model Context Protocol

aillmllmsmcpmodel-context-protocol
Share:
37
Stars
0
Downloads
0
Weekly
0/5

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

Rust MCP server development
avahowell

Maintainer

LicenseMIT
Languagerust
Versionv1.0.0
UpdatedJan 8, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx offeryn

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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"] }
2

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) }
    }
}
3

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();
}
4

Build the binary

Compile your Rust MCP server to a native binary.

cargo build --release
5

Configure 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"
    }
  }
}
6

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.

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.

Quick Config Preview

{ "mcpServers": { "offeryn": { "command": "npx", "args": ["-y", "offeryn"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides