molerat
An accessibility & agentic layer for Rust UI applications 🦫
Quickstart
Add molerat to your app and publish a semantic view alongside your existing UI:
use Molerat;
let mut molerat = new;
molerat.publish;
If you have actions in your app, define an enum and return them from your UI handlers:
let mut molerat = new;
molerat.publish;
To handle the incoming actions:
for message in molerat.messages
Integrations
MCP
[!NOTE] MCP (Model Context Protocol) is a protocol for exposing application state to agents.
Enable mcp feature to expose the UI to agents through MCP:
MCP clients connect through the companion molerat-mcp stdio bridge. Install it with:
Register the installed binary with your MCP client.
And then you can change your constructor to use the MCP bridge:
let mut molerat = new_mcp?;
AT-SPI
[!NOTE] AT-SPI (Assistive Technology Service Provider Interface) is a protocol for exposing application state to Unix desktop accessibility clients.
Enable atspi feature to expose the UI to agents through AT-SPI:
let mut molerat = new_atspi;
Nothing else is needed! molerat exposes your UI on the Unix accessibility bus; handle requested actions through molerat.messages().
For Ratatui applications
molerat is not designed for any specific UI framework. However, it has first-class integration with Ratatui!
See the Ratatui migration guide and examples.
Examples
Here is knife, a reverse-engineering TUI solving a crackme challenge using molerat:
https://github.com/user-attachments/assets/586710de-214c-468c-91b7-0126d7a25592
Here is BugStalker, a Rust debugger debugging an application using molerat:
https://github.com/user-attachments/assets/ff256f9a-4f7b-4374-a7d3-5d91e2ebec55
License
Licensed under either of Apache License Version 2.0 or The MIT License at your option 🐶
🦀 ノ( º _ º ノ) - respect crables!
Copyright
Copyright © 2026, Orhun Parmaksız