October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Android

A Coding Agent Added Jetpack Compose Support to My Android Renderer MCP. I Wouldn’t Have Started This Task Myself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A coding agent added Jetpack Compose rendering to Evgeny Khramov’s local Android UI Renderer MCP without requiring a project-specific adapter. The tool now accepts a top-level composable and visual-state arguments, then returns both a PNG and a queryable semantics tree. Khramov describes the work as a project case study—not a benchmark—and says he specified the result’s required property while the agent handled research, implementation, debugging, tests and a reproducible demo.

What the Android UI Renderer MCP does

Khramov describes Android UI Renderer MCP as a local server that renders Android UI without an emulator or physical device. Before Compose support, it could render classic Android interfaces, including XML/View layouts, RecyclerView, Activity and Fragment content, overlays and screen configurations. Its output includes an image and a component tree an agent can query for details such as bounds, text and state.

The central constraint for the Compose addition was that an app developer should not first have to write a special renderer entry point. The new render_compose tool instead targets a named composable already in the app. This makes the feature useful for inspecting explicitly supplied UI states, without making it a general-purpose runner for an app’s full runtime behavior.

How render_compose works

The caller supplies a fully qualified top-level composable function name, named JSON arguments, and rendering dimensions and density. As Khramov describes the implementation, the renderer:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Locates the Kotlin function and parses its signature.
  2. Checks the supplied arguments and builds typed values, including supported forms such as nullable values, enums, data classes, mutable properties, lists and sets.
  3. Generates a Kotlin call, filling omitted callback parameters with no-op lambdas.
  4. Resolves an app theme or uses an explicit wrapper.
  5. Creates a temporary Kotlin probe under .android-ui-renderer, then runs it with Gradle and Robolectric to draw a ComposeView to a PNG.
  6. Serializes the resulting Compose semantics structure alongside the image.

The temporary probe is generated outside the app’s own source files, according to the author’s account. The approach is designed for a composable whose visual state is passed as arguments; it does not load live application data or recreate an app’s production dependency graph.

Why the first successful image was not enough

The first real Compose render produced an image, but the next stage failed: the existing tree serializer expected a className property that a Compose semantics node did not provide. The renderer needed a fallback class name before it could serialize a usable tree.

That failure exposed an important requirement in this project. An image lets a person see a screen, but the MCP’s agent workflow also depends on structured data it can inspect. The resulting Compose semantics tree includes bounds, text, content descriptions, enabled, clickable, selected and checked state, plus child nodes. It is a semantics representation, not an Android View tree, and its IDs are synthetic.

A separate Gradle problem affected the demo

The sample app also hit a build-configuration issue unrelated to Compose rendering itself. The renderer injects test dependencies through a Gradle init script, but the sample project’s strict repository policy blocked adding the temporary Robolectric dependency that way. Khramov says the sample’s repository mode was changed to PREFER_PROJECT, with a comment explaining why the temporary test dependency was needed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This distinction matters when interpreting the fix: the reported obstacle was the sample project’s repository configuration, not an incompatibility in the Compose API.

What the author used to check the implementation

To go beyond a toy composable, Khramov says he had the agent clone an open-source Jetpack Compose sample and create a parallel sample-compose/ app. The original and parallel apps shared a book library and seven scenarios:

  • A book row.
  • A long title at font scale 1.3.
  • A list.
  • A master-detail view.
  • A full-screen view.
  • A loading state.
  • A Russian dark theme.

The case study says both stacks were captured at 1920 × 1200 px and 240 dpi after a follow-up fixed an earlier canvas-size mismatch. These were equivalent UI states rendered through different mechanisms; Khramov explicitly does not present the exercise as a pixel-perfect comparison between XML and Compose.

He also reports unit tests covering enums, data classes, mutable state and callbacks, as well as a real Compose component run and the demo scenarios. These are the author’s reported checks, not independently reproduced results.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the agent did—and what the author contributed

Khramov’s account is not that the task became effortless. He describes assigning the agent the work of researching the implementation, building it, debugging failures, writing tests and preparing a reproducible demo, while he defined the required outcome and checked whether it met that requirement. His summary was: “I specified a property the result had to have, and left the research and implementation to the agent.”

He reports a timeline of about 1 hour 43 minutes for this project: a first note at 12:26, a rejected mandatory project-side entry point at 12:41, a first real render at about 13:00, a main commit at 14:05 and a follow-up at 14:09. That is Khramov’s account of one task, not a controlled comparison or evidence of how long a person would take. He says he probably would not have started researching the feature on his own: “I didn’t know how to implement Compose rendering, and wouldn’t have started researching it on my own.”

Where this fits among Android’s agent features

This project is a developer tool for rendering an app’s Compose UI so an agent can inspect it. Google’s Android documentation describes different capabilities: AppFunctions is a platform API, with a Jetpack library, for exposing discrete app capabilities that agents can discover and execute; the same overview describes remote MCP servers as a complementary server-side integration path. Google’s A2UI concerns structured agent-to-UI messages rendered as native Jetpack Compose and Material 3 components.

Those are adjacent parts of the Android agent ecosystem, not the same software as Khramov’s local UI Renderer MCP. The renderer inspects app UI; AppFunctions exposes app capabilities, remote MCP offers a server-side integration route, and A2UI renders agent-generated interface messages.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Limits of the implementation

  • One composable, not a full app journey: the described path targets a top-level composable rather than production navigation, dependency injection or live data loading.
  • Explicit state, not interaction simulation: visual state is provided as arguments, and missing callbacks become no-op lambdas. The renderer does not simulate the actions behind those callbacks.
  • Signature parsing has edge cases: the implementation uses a custom regex-based parser rather than the Kotlin compiler API. Khramov identifies complex overloads, type aliases and unusual annotations as cases that may need more work.
  • No physical-device fidelity claim: the author has not verified pixel-perfect agreement with a physical device.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.