Skip to the article
Senu 日本語

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

Library guide

How to declare an operation, authenticate callers, expose MCP tools, deploy and test. Start here if you already write Rust.

  1. What Senu is and when to use it
  2. Declare an operation
  3. Authenticate callers
  4. Expose operations as MCP tools
  5. Deploy and operate
  6. Test with the contract
  7. 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.

  1. Start here: what you will build
  2. Install Rust and get the code
  3. Your first page in the browser
  4. Write your first note
  5. When Senu says no
  6. Your first Rust function
  7. What you built, and where to go next

Notes

Sample notes, and the place where the course has you add your own.

  1. A sample field note

Appendices

Optional tours of the demo catalogue, its JSON API and MCP.

  1. Appendix: the project catalogue (optional)
  2. Appendix: Senu over MCP (optional)