Expand description
egui_mcp — an MCP server that drives a live egui app over the request/response
egui_inspection protocol, plus the building blocks to embed or extend it.
The egui-mcp binary (src/main.rs) is a thin wrapper around server::run, which serves
Server — the TCP attach / disconnect lifecycle plus the egui UI tools.
The library surface exists so another MCP server can keep its own connection logic while reusing the egui UI/inspection tool set:
Bridge::with_transportbuilds a bridge over anyTransport(e.g. a host’s own request/response channel);FramedTransportis the built-in byte-stream implementation.UiServer::newwraps that bridge as a UI server. Pair it with the router fromUiServer::router: mergerouter.list_all()into your ownlist_tools, and delegate non-connection calls toUiServer::dispatch.
Re-exports§
pub use bridge::BoxFuture;pub use bridge::Bridge;pub use bridge::FramedTransport;pub use bridge::PeerInfo;pub use bridge::Transport;pub use bridge::TreeSnapshot;pub use tools::Server;pub use tools::UiServer;
Modules§
- bridge
- Bridge between the MCP server and a running egui app, speaking the request/response
egui_inspectionprotocol. - server
- MCP server entry point, built on the official
rmcpSDK over stdio. - tools
- MCP tool definitions + dispatch, built on the official
rmcpSDK. - tree
- Helpers that flatten the accesskit tree into MCP-friendly shapes.