McpServer
An opt-in, loopback-only MCP Streamable HTTP server for Android compositions.
No socket is opened until start. The caller owns Screen/camera permission and lifecycle; detach the Screen before stopping or disposing its mixer. No token or image is logged.
configureTools registers application-owned tools using the official MCP SDK. It is called for each stateless request; register handlers only, without performing operations here. Tool handlers must enforce their application's permission and threading requirements. The built-in names hello_android and capture_frame are reserved.
Constructors
Functions
Makes screen available to capture_frame. Does not start capture or own the Screen.
Invalidates captures from screen. Call before stopping or disposing its mixer. Schedule detachment/disposal on an independent lifecycle/controller thread, never inline in rendering/readback callbacks or on a thread synchronous readback waits for.