Senu: one Rust function as a web page, a JSON API and an MCP tool
Senu is an open-source Rust library. You declare a read-only function once, with its permission and parameters, and Senu serves it as an HTML page, a JSON API and an MCP tool for AI assistants, with the same authentication order, the same errors and one contract test suite for all three. It is built on Axum, Askama and the official rmcp SDK.
Add it to a project
cargo add senu --no-default-features
Or build it from the Git tag instead of crates.io:
cargo add senu --git https://github.com/efg-technologies/senu --tag v0.2.0 --no-default-features
- Source on GitHub
- API reference on docs.rs
- Crate on crates.io
- llms.txt: this site as plain text for AI assistants
Library guide
How to declare an operation, authenticate callers, expose MCP tools, deploy and test. Start here if you already write Rust.
- What Senu is and when to use it
- Declare an operation
- Authenticate callers
- Expose operations as MCP tools
- Deploy and operate
- Test with the contract
- Questions and comparisons
Course: learn Rust with Senu
A course for complete beginners: you run this site on your own computer, add notes to it in Markdown, and then rebuild a small piece of the Rust code behind it. You need no Rust, only a little JavaScript.
- Start here: what you will build
- Install Rust and get the code
- Your first page in the browser
- Write your first note
- When Senu says no
- Your first Rust function
- What you built, and where to go next
Notes
Sample notes, and the place where the course has you add your own.
Appendices
Optional tours of the demo catalogue, its JSON API and MCP.