offeryn
by avahowell·★ 37·Score 38
Rust-based MCP server implementation with tool generation macros and multiple transport options.
Overview
Offeryn is a Rust implementation of the Model Context Protocol that allows developers to easily create and expose tools to AI agents. It features a procedural macro for automatic tool generation from Rust code, handles JSON schema creation based on Rust types, and supports both stdio and SSE transport methods. The project demonstrates clean code structure with clear examples showing how to implement and register calculator tools.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose offeryn when you need to build MCP servers in Rust, especially when you value the performance and safety guarantees Rust provides.
When NOT to choose this
Don't choose offeryn if you need full MCP feature coverage (resources, prompts, WebSocket) or prefer developing in other languages.
Tools this server exposes
4 tools extracted from the READMEcalculator_add(a: i64, b: i64) -> i64Add two numbers
calculator_subtract(a: i64, b: i64) -> i64Subtract two numbers
calculator_multiply(a: i64, b: i64) -> i64Multiply two numbers
calculator_divide(a: i64, b: i64) -> Result<f64, String>Divide two numbers
Comparable tools
Installation
Installation
Add to your Cargo.toml:
[dependencies]
offeryn = "0.1.0"Claude Desktop Configuration
Add to your Claude Desktop configuration:
{
"mcpServers": {
"offeryn-calculator": {
"command": "path/to/your/calculator-binary",
"args": []
}
}
}For SSE transport, use an MCP client that supports SSE mode and connect to the specified address.
FAQ
- What is the purpose of the #[mcp_tool] macro?
- The #[mcp_tool] procedural macro automatically generates MCP-compatible tool methods from Rust functions, including JSON schema generation and proper error handling.
- Which transport methods are supported?
- Currently supports stdio and Server-Sent Events (SSE) transports. WebSocket transport is planned for future releases.
On Hacker News
Recent discussion from the developer community.
- Story by avhwl · 2025-01-24
Compare offeryn with
Last updated · Auto-generated from public README + GitHub signals.