mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
New binary crate that exposes an MCP (Model Context Protocol) server backed by the `egui_inspection` protocol. The server bridges a running egui peer — a spawned `egui_kittest` harness child process or an attached live `eframe` app — to MCP tool handlers that drive it. Components: - `bridge.rs`: spawns / attaches a peer over a unix socket, runs reader+writer Tokio tasks that pump `HarnessMessage` ↔ `InspectorCommand` and track the peer's `Hello`, latest frame, accesskit tree, and blocked / finished state. - `tools.rs`: `rmcp`-derived tool router with commands for stepping, event injection (click / type / scroll / hover / drag / keys), resizing, screenshot capture, accesskit tree queries, and lifecycle (launch / attach / kill). - `tree.rs`: accesskit-tree projection helpers shared by the tools. - `shim.rs` / `main.rs`: shim role that lets the same binary act as the child inspector for kittest harnesses, relaying bytes between the harness stdio and the MCP server's unix socket. - `server.rs`: rmcp stdio entry point. Live-app example added at `examples/egui_mcp/`.