ScreenSync MCP guide

Testing Kotlin Multiplatform Android Apps with Claude Code

Test Kotlin Multiplatform and Compose Multiplatform Android apps on physical phones with Claude Code and ScreenSync MCP using live UI trees and logcat.

3D render of an Android phone connected to a laptop with glowing purple fiber lines representing Kotlin Multiplatform testing with Claude Code and ScreenSync MCP

Kotlin Multiplatform (KMP) and Compose Multiplatform (CMP) teams routinely hit a frustrating validation gap: shared unit suites in commonTest pass cleanly on a developer laptop, yet the compiled Android APK breaks on physical hardware. When shared Kotlin code calls into androidMain expect/actual bindings—such as ActivityResultContracts, SQLDelight or Room native drivers, runtime permissions, biometric prompts, or WindowInsets keyboard resizing—headless JVM Desktop runners mock away the exact Android operating system boundaries where production bugs live.

Running :composeApp:connectedDebugAndroidTest on a local emulator catches part of that gap, but emulators rarely reproduce OEM-specific rendering quirks, real thermal throttling, physical sensor latency, or live software keyboard overlays. Bridging that last mile requires giving your coding agent direct visibility into and control over an actual Android handset.

Using the Model Context Protocol (MCP), Claude Code and other MCP-compatible coding clients can inspect live screens, traverse Android UI hierarchies, inject deterministic touch events, and read logcat telemetry directly from real Android hardware. By pairing ScreenSync MCP with your KMP repository, you can turn slow, manual APK deploy-and-tap cycles into an autonomous compile, install, verify, and fix loop.

Key Takeaways

  • Hardware Verification for expect/actual Code: ScreenSync MCP connects Claude Code directly to physical Android devices (Android 7.0 or later), exposing real androidMain runtime behavior that JVM commonTest suites cannot observe.
  • Root-Free MediaProjection Capture: Screen capture runs natively through Android's MediaProjection API after per-session user consent, requiring zero root access and zero ADB overhead for visual perception at roughly 94 ms median LAN mirror latency.
  • Deterministic ADB Device Control: Control tools—including control_tap, control_swipe, and control_type—execute deterministically through Android Debug Bridge (ADB) over USB or wireless debugging to drive Compose Multiplatform screens.
  • Structural UI Tree Plus Vision Perception: Combining get_ui_hierarchy with get_latest_screenshot prevents coordinate drift across screen densities and lets Claude Code verify both Modifier.testTag semantics and visual Skia/Canvas layout alignment.
  • Live Crash and Telemetry Correlation: Claude Code queries get_logcat and record_screen directly after running ./gradlew :composeApp:installDebug, tracing CoroutineExceptionHandler or SQLiteException stack frames straight back to commonMain or androidMain.
  • Unified Mobile and Web Testing Surface: ScreenSync MCP exposes 226 MCP tools in total—29 phone and desktop tools plus 197 web_* browser tools—allowing agents to validate both native Android builds and companion web or Compose for Web tabs while keeping frames on your local network.

Why Shared KMP commonTest Suites Miss Real Android Failures

Shared commonTest suites executed via runComposeUiTest validate business state and Composable layout logic inside an isolated host runtime, but they cannot execute real Android Binder transactions, ContentResolver queries, or OEM InputMethodManager keyboard transitions. Physical Android hardware verification closes this gap by exercising compiled androidMain implementations under real OS constraints.

JetBrains designed Compose Multiplatform's runComposeUiTest API so developers can write assertions once in commonTest and execute them on JVM Desktop in seconds without booting an emulator. That speed makes commonTest ideal for verifying StateFlow reducers, screen state transitions, and semantic node visibility under mocked repositories:

// composeApp/src/commonTest/kotlin/ui/CheckoutSummaryTest.kt
package ui

import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.onAllNodesWithTag
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.runComposeUiTest
import kotlin.test.Test

class CheckoutSummaryTest {

    @OptIn(ExperimentalTestApi::class)
    @Test
    fun confirmButton_displaysReceiptAfterAsyncSync() = runComposeUiTest {
        setContent {
            CheckoutSummaryScreen(repository = FakeCheckoutRepository())
        }

        onNodeWithTag("confirm_order_button").assertIsDisplayed().performClick()

        waitUntil(timeoutMillis = 5_000) {
            onAllNodesWithTag("receipt_card").fetchSemanticsNodes().isNotEmpty()
        }

        onNodeWithTag("receipt_card").assertIsDisplayed()
    }
}

The limitation appears the moment your KMP module crosses into platform-specific territory. A FakeCheckoutRepository in commonTest will never uncover an androidMain actual function that passes an ungranted URI into an external intent, blocks the main thread during SQLite WAL initialization, or loses transient state during Android process death. Even inside the UI layer, Compose Multiplatform renders via Skia on Desktop and iOS, whereas Android runs against Android's Canvas and hardware-accelerated RenderNode pipeline—subtle text-wrapping, font-padding, and WindowInsets.ime keyboard overlap bugs only surface on Android itself.

Validation Dimension commonTest (runComposeUiTest on JVM) Android Emulator Instrumentation Real Android Phone + ScreenSync MCP
Execution Speed Fast (sub-second startup, no APK build) Moderate (emulator boot + APK install) Fast iterative loop via installDebug + live LAN mirror
expect/actual Coverage Stubbed or faked interfaces only Virtualized HAL and x86/ARM ABI Full physical ARM silicon and real Android HAL
System Process Boundaries None (single host JVM process) Partial (emulator Play Services vary) Full system dialogs, permissions, OEM keyboards, share sheets
Visual Rendering Pipeline Skia Desktop backend SwiftShader / host GPU virtualization Native Android Canvas, real DPI scaling, OEM fonts
Capture & Control Mechanism Headless Compose test clock Espresso / UI Automator instrumentation MediaProjection capture (no root/ADB) + ADB control tools
Autonomous Code Remediation Static failure logs in terminal JUnit XML + emulator screenshots Live get_ui_hierarchy, get_latest_screenshot, get_logcat, and direct repo edits

To bridge this divide effectively, you keep fast behavioral assertions in commonTest while reserving physical hardware runs for androidMain integration points, layout density verification, and end-to-end navigation flows. For a deeper look at how Compose semantic trees behave on real devices, see our guide on testing Jetpack Compose apps with Claude Code and MCP.

Connecting Claude Code to a Real Android Phone via ScreenSync MCP

ScreenSync MCP connects Claude Code to a physical Android 7.0+ smartphone by pairing a local Node.js 18+ desktop hub over stdio with the free ScreenSync MCP Android app over your local network. Visual screen capture uses Android's MediaProjection API with no root and no ADB, while tap, swipe, and text actions route through ADB.

Before configuring your AI coding client, it helps to understand the strict separation of responsibilities inside ScreenSync MCP's architecture. You can also review the full architectural breakdown on the Screen MCP architecture overview and compare capabilities across Android MCP servers.

  1. Android Companion App (com.screensync.mcp, v2.5.7): Installed free from Google Play on any Android 7.0 or later device. When you start a session, Android prompts for explicit MediaProjection consent. Once granted, the app streams frames locally to your desktop hub without requiring root privileges or ADB for screen capture.
  2. Desktop Hub (v1.14.4): A free Node.js 18+ service running on Windows, macOS, or Linux (start-hub.bat or start-hub.sh). It exposes an HTTP listener on port 3000 for device pairing and frame ingestion while speaking standard MCP over stdio to your coding client.
  3. ADB Control Channel: All interactive control tools—such as control_tap, control_swipe, and control_type—run through ADB from the desktop hub over a USB cable or Android Wireless Debugging (adb pair / adb connect).
  4. Authentication and Discovery: The Android app pairs with your hub by scanning the hub's QR code or discovering it automatically via mDNS on your local area network (LAN). Every request is authenticated with a bearer token (SCREEN_SYNC_TOKEN).

Registering ScreenSync MCP in Claude Code and Other Clients

After unpacking the desktop hub archive and following the ScreenSync MCP setup guide, register the stdio server with Claude Code in one command:

claude mcp add screensync node "/path/to/hub/screensync-hub.js"

If you also use Claude Desktop alongside your IDE, add the server entry inside claude_desktop_config.json (accessible via Settings > Developer):

{
  "mcpServers": {
    "screensync": {
      "command": "node",
      "args": ["/path/to/hub/screensync-hub.js"],
      "env": {
        "SCREEN_SYNC_TOKEN": "your-generated-token"
      }
    }
  }
}

ScreenSync MCP works with any MCP client capable of spawning local stdio servers, including Claude Code, Claude Desktop, Cursor, and VS Code in agent mode (consult each editor's official MCP documentation for its config file path). Note that ChatGPT's web application requires remote HTTPS MCP endpoints and is not supported, and ScreenSync MCP targets Android devices (plus the desktop hub and Chrome/Edge browser extension)—it does not support iOS simulators or iPhones. In a KMP repository, however, fixing a state management, coroutine, or Compose layout bug discovered on Android immediately improves your shared commonMain codebase as well.

Preparing Your Gradle Module for Rapid Agent Loops

For Claude Code to iterate quickly on a Kotlin Multiplatform project, verify your composeApp/build.gradle.kts target configuration builds a clean debug APK without interactive keystore prompts:

// composeApp/build.gradle.kts
kotlin {
    androidTarget {
        compilations.all {
            kotlinOptions {
                jvmTarget = "17"
            }
        }
    }

    sourceSets {
        commonMain.dependencies {
            implementation(compose.runtime)
            implementation(compose.foundation)
            implementation(compose.material3)
            implementation(compose.ui)
        }
        androidMain.dependencies {
            implementation(libs.androidx.activity.compose)
        }
        commonTest.dependencies {
            implementation(kotlin("test"))
            @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
            implementation(compose.uiTest)
        }
    }
}

Once connected, verify your device appears in adb devices and confirm the ScreenSync Android app displays an active hub connection before handing the terminal prompt to Claude Code.

Auditing KMP expect/actual Implementations on Physical Silicon

Auditing KMP expect/actual declarations on real hardware catches platform contract mismatches that compile cleanly in Kotlin yet fail at Android runtime. Claude Code builds the APK, drives the androidMain trigger via ADB control tools, and inspects get_ui_hierarchy, get_latest_screenshot, and get_logcat to pinpoint defects.

Consider one of the most common expect/actual patterns in Kotlin Multiplatform apps: bridging shared code to Android system capabilities such as persistent local databases, secure preferences, or external document exports. In commonMain, the contract looks clean and platform-agnostic:

// composeApp/src/commonMain/kotlin/platform/ReportExporter.kt
package platform

expect class ReportExporter {
    suspend fun exportCsv(filename: String, csvBody: String): ExportResult
}

sealed interface ExportResult {
    data class Success(val locationLabel: String) : ExportResult
    data class Failure(val reason: String) : ExportResult
}

In androidMain, a developer writes the actual implementation using MediaStore or Context.cacheDir and an Android share Intent. Subtle defects frequently hide here: forgetting Intent.FLAG_ACTIVITY_NEW_TASK when launching from a non-Activity Context, failing to flush a BufferedWriter before handing off the URI, or running disk I/O on Dispatchers.Main and triggering strict policy drops.

// composeApp/src/androidMain/kotlin/platform/ReportExporter.android.kt
package platform

import android.content.Context
import android.content.Intent
import androidx.core.content.FileProvider
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.io.File

actual class ReportExporter(private val appContext: Context) {

    actual suspend fun exportCsv(filename: String, csvBody: String): ExportResult =
        withContext(Dispatchers.IO) {
            runCatching {
                val exportDir = File(appContext.cacheDir, "exports").apply { mkdirs() }
                val targetFile = File(exportDir, filename)
                targetFile.writeText(csvBody)

                val contentUri = FileProvider.getUriForFile(
                    appContext,
                    "${appContext.packageName}.fileprovider",
                    targetFile
                )

                val shareIntent = Intent(Intent.ACTION_SEND).apply {
                    type = "text/csv"
                    putExtra(Intent.EXTRA_STREAM, contentUri)
                    addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
                    addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                }

                val chooser = Intent.createChooser(shareIntent, "Export Report").apply {
                    addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                }
                appContext.startActivity(chooser)
                ExportResult.Success(targetFile.name)
            }.getOrElse { error ->
                ExportResult.Failure(error.message ?: "Unknown Android export failure")
            }
        }
}

When you ask Claude Code to verify this KMP feature on your plugged-in or wirelessly paired Android phone, the agent executes a closed-loop workflow using ScreenSync MCP's 29 phone and desktop tools:

ScreenSync MCP Tool Transport / Mechanism Latency & Scope Role in KMP Android Debugging
get_latest_screenshot Android MediaProjection API (no root, no ADB) ~94 ms median LAN mirror latency Verifies Skia-to-Android rendering, dark mode contrast, and clipped text
get_ui_hierarchy Android Accessibility / UI dump via hub Structural XML/JSON node tree Resolves exact bounding boxes, resource-id, and contentDescription
control_tap ADB over USB or wireless debugging Deterministic (x, y) tap Triggers Compose buttons, navigation tabs, and system dialog actions
control_swipe ADB over USB or wireless debugging Coordinate path gesture Scrolls LazyColumn feeds and tests pull-to-refresh or bottom sheets
control_type ADB over USB or wireless debugging Direct text injection Populates KMP form fields to stress-test TextField and IME behavior
get_logcat ADB log buffer query Real-time device log stream Captures AndroidRuntime, StrictMode, and SQLiteException traces
record_screen MediaProjection / hub recording Multi-frame video capture Documents multi-step transitions, animations, and race conditions
web_* (197 tools) Chrome/Edge MV3 browser extension Real desktop browser tab Verifies KMP Wasm/web builds or backend admin portals synced from mobile

Instead of guessing pixel coordinates blindly from screenshots, Claude Code calls get_ui_hierarchy first to locate the exact bounds of your Modifier.testTag("export_csv_button") node, invokes control_tap at its center, waits briefly, and calls get_latest_screenshot alongside get_ui_hierarchy to confirm the Android system chooser sheet actually rendered without throwing IllegalArgumentException inside FileProvider.getUriForFile(). For why combining structural node trees with visual frames eliminates coordinate hallucinations, read Android UI hierarchy vs computer vision to prevent AI drift.

Verifying Compose Multiplatform Semantics and Skia-to-Android Rendering

Compose Multiplatform widgets expose semantic metadata across targets, but Android requires testTagsAsResourceId = true at the root Semantics modifier so Modifier.testTag values map cleanly into get_ui_hierarchy resource IDs. Verifying both semantic trees and MediaProjection screenshots prevents layout regressions across OEM screen sizes.

A frequent stumbling block for KMP teams new to Android hardware automation is discovering that Modifier.testTag("login_email") in commonMain appears inside runComposeUiTest, yet vanishes from external Android UI tree dumps (uiautomator / get_ui_hierarchy). By default, Compose on Android keeps testTag values in an internal Compose semantics property rather than mapping them to Android's native View.id / resource-id attribute.

Enabling testTagsAsResourceId inside your androidMain root container makes every shared commonMain testTag immediately addressable by ScreenSync MCP's get_ui_hierarchy tool without polluting shared UI code with Android-only imports:

// composeApp/src/androidMain/kotlin/MainActivity.kt
package com.example.kmpapp

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTagsAsResourceId

class MainActivity : ComponentActivity() {
    @OptIn(ExperimentalComposeUiApi::class)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {
            Box(
                modifier = Modifier
                    .fillMaxSize()
                    .semantics { testTagsAsResourceId = true }
            ) {
                App() // Your shared commonMain Composable root
            }
        }
    }
}

With testTagsAsResourceId = true enabled, you can verify two high-risk Android-specific layout conditions that commonTest routinely misses:

1. Edge-to-Edge WindowInsets and Soft Keyboard Overlap

Calling enableEdgeToEdge() in MainActivity pushes your shared commonMain layout behind the Android status bar, navigation pill, and software keyboard (IME). When you direct Claude Code to tap an email input via control_tap and enter text with control_type, the physical IME pops up. Claude Code immediately calls get_latest_screenshot and checks whether your submit button is occluded behind the keyboard or whether Modifier.imePadding() properly shifts the scroll container on a real screen.

2. Font Scale, DPI Density, and OEM Typography Differences

Desktop commonTest renders with bundled desktop fonts at standard scaling. Physical Android devices often run OEM system fonts (SamsungOne, MiSans, Roboto) and user-configured accessibility font scales (1.3x or 1.5x). Using adb shell settings put system font_scale 1.3 followed by get_latest_screenshot, Claude Code inspects multi-line Compose Text nodes on your physical phone, spotting truncated labels (maxLines = 1 clipping) or misaligned Row weights before they reach production. You can explore more device-level validation patterns in our guide on testing Android apps on real mobile devices with Claude Code.

Autonomous Crash Triage: Correlating KMP Coroutines, Logcat, and Screen Recordings

Uncaught exceptions inside KMP CoroutineScope workers or androidMain database migrations often fail silently in background threads without crashing the UI immediately. Querying get_logcat alongside record_screen lets Claude Code correlate visual UI stalls directly with exact Kotlin stack traces and repair the underlying source code.

In Kotlin Multiplatform architectures, shared ViewModels and repositories frequently launch coroutines inside viewModelScope or custom CoroutineScope(SupervisorJob() + Dispatchers.Default) instances. If an androidMain driver—such as a SQLDelight AndroidSqliteDriver or Room KMP migration—throws an unhandled SQLiteException or IllegalStateException, the UI might freeze on an infinite loading spinner while the fatal stack trace prints only to Android's system log buffer.

During an autonomous test session, Claude Code executes a structured build-and-triage sequence from your terminal:

# 1. Build and deploy the Android debug variant from the KMP root
./gradlew :composeApp:installDebug

# 2. Launch the main launcher activity cleanly via ADB
adb shell am start -n com.example.kmpapp/.MainActivity

If the loading spinner never resolves after Claude Code taps a navigation item with control_tap, the agent does not waste tokens guessing. It calls get_logcat to pull recent crash and warning buffers, filtering for your package name or AndroidRuntime errors. When a crash or coroutine cancellation appears—for example, a missing Room KMP schema migration between commonMain entity versions or a TransactionTooLargeException after backgrounding—Claude Code reads the exact file path and line number from the logcat trace, inspects commonMain or androidMain, patches the Kotlin implementation, and runs ./gradlew :composeApp:installDebug again to verify the fix on the same device.

For KMP projects persisting structured data locally via Room Multiplatform or SQLDelight, pair your interactive agent sessions with dedicated migration checks covered in testing Android Room database migrations with Claude Code and MCP and lifecycle survival checks covered in testing Android process death with Claude Code and MCP.

Capturing Intermittent Flows with record_screen

When debugging animation jank, navigation back-stack flickers, or race conditions between MediaProjection frames and rapid user input, single snapshots can miss intermediate states. Calling record_screen lets Claude Code capture the visual sequence over the real device session so developers can review exactly how a multi-step KMP NavHost or Compose transition behaved on physical hardware.

Unified KMP Mobile and Web Verification with the Browser Extension

ScreenSync MCP pairs 29 phone and desktop tools with 197 web_* browser tools inside a single 226-tool MCP server, allowing Claude Code to test both an Android KMP app and a companion web dashboard or Compose for Web target. The Chrome/Edge MV3 extension runs inside your real browser tab with explicit human approval for sensitive actions.

Many Kotlin Multiplatform teams maintain a shared domain layer across an Android app and a web client (either a Compose Multiplatform wasmJsMain app, a Kotlin/JS frontend, or a React/Next.js admin dashboard backed by the same API contracts). Traditionally, verifying a change that spans both surfaces meant running one toolset for Android and a completely separate Playwright or Selenium harness for the browser.

ScreenSync MCP eliminates that context switch by combining:

  • 29 Phone and Desktop Tools: 12 control_* tools, 3 os_* tools, and 14 capture/hub tools (get_latest_screenshot, get_ui_hierarchy, get_logcat, record_screen, and hub state helpers).
  • *197 Browser Tools (`web_`):** Exposed through the free Chrome and Edge Manifest V3 (MV3) browser extension (version 1.14.4), letting Claude Code inspect DOM state, fill forms, read console errors, and verify network responses inside your authenticated browser session.
  • 17 MCP Prompts and 3 Resources: Built-in workflow templates and state resources accessible directly inside supporting MCP clients.

For example, suppose your KMP commonMain sync engine queues an offline expense record on Android, reconnects, and pushes it to your cloud API. Claude Code can drive the Android app with control_tap and control_type to submit the record, confirm the 201 Created sync message in get_logcat, and then immediately switch to your open Chrome tab via the web_* tools to verify the synced record renders accurately in your web portal—pausing for your explicit approval before executing any destructive or sensitive browser action. You can explore the browser extension setup and permission guardrails on the ScreenSync MCP browser extension page and in our guide on cross-platform AI workflows unifying mobile and browser MCP.

Security, Privacy, and Network Boundaries in Local MCP Testing

ScreenSync MCP streams Android MediaProjection frames directly from your phone to your local desktop hub over your LAN using SCREEN_SYNC_TOKEN bearer authentication, never routing screens through EpsolDev servers. However, any screenshot an AI agent requests via get_latest_screenshot is transmitted to that agent's model provider for analysis.

Mobile engineering teams evaluating MCP servers for proprietary KMP codebases need clear answers on where screen data travels. ScreenSync MCP follows a local-first network topology:

  1. Phone-to-Hub LAN Streaming: Captured frames travel across your local Wi-Fi or USB/LAN interface directly to the Node.js hub listening on port 3000. EpsolDev servers do not receive, proxy, or store your device screen stream (an optional Drive fallback exists only if explicitly configured).
  2. Bearer Token Gatekeeping: Hub endpoints validate the SCREEN_SYNC_TOKEN environment variable configured during QR or mDNS pairing, preventing unauthorized LAN hosts from issuing control_* commands or pulling frames.
  3. Consent Per Capture Session: Because Android's MediaProjection API enforces an explicit OS consent prompt whenever projection starts, no silent background screen recording can occur without user interaction on the device.
  4. Model Provider Transparency: Whenever Claude Code, Cursor, or VS Code calls get_latest_screenshot, the returned image bytes become part of your AI client's tool response and are sent to that client's configured LLM provider (such as Anthropic or OpenAI). Similarly, the Chrome/Edge extension presents human-approval prompts before executing risky browser actions.

To uphold strict data hygiene while testing KMP applications, use staging API keys, synthetic test accounts, and non-production datasets on your test handset whenever an AI coding agent has active screenshot access.

Production Checklist for KMP Android CI and Developer Loops

A reliable Kotlin Multiplatform release pipeline pairs fast commonTest unit assertions with Gradle Android instrumentation and targeted physical-device MCP verification before merging androidMain changes. Running this three-tier loop prevents both regressions in shared Kotlin logic and platform-specific Android UI or expect/actual breakages.

Before tagging a release or merging a major KMP dependency bump, walk Claude Code through this verification sequence:

  1. Run Shared JVM Tests First: Execute ./gradlew :composeApp:jvmTest (or testDebugUnitTest) to verify all commonMain business rules and runComposeUiTest assertions pass in seconds.
  2. Verify Root Semantics Mapping: Confirm Modifier.semantics { testTagsAsResourceId = true } wraps your MainActivity setContent block so every commonMain testTag resolves inside get_ui_hierarchy.
  3. Compile and Deploy to Real Silicon: Run ./gradlew :composeApp:installDebug targeting a physical Android 7.0+ handset connected via USB or Wireless Debugging, with the ScreenSync MCP app (v2.5.7) actively streaming to your desktop hub (v1.14.4).
  4. Exercise Critical expect/actual Paths: Prompt Claude Code to step through onboarding, authentication, permissions, file exports, and WindowInsets keyboard forms using get_ui_hierarchy, control_tap, control_type, and get_latest_screenshot.
  5. Audit get_logcat Cleanliness: Require zero uncaught coroutine exceptions, StrictMode violations, or SQLite lock warnings during cold start, backgrounding, and process restoration.
  6. Cross-Check Companion Web Flows (Optional): If your KMP project shares state with a web dashboard or Wasm client, validate end-to-end persistence in the same session using ScreenSync MCP's Chrome/Edge extension tools.

All three components—the ScreenSync MCP Android app on Google Play, the Node.js desktop hub, and the Chrome/Edge browser extension—are free to download and run locally. Visit ScreenSync MCP to grab the desktop hub and bring autonomous real-hardware verification into your Kotlin Multiplatform workflow today.

Next steps

FAQ

Questions, answered

Can Claude Code test Kotlin Multiplatform Android apps on a real phone?

Claude Code tests Kotlin Multiplatform Android apps on physical phones using ScreenSync MCP. Claude Code builds and installs the debug APK via Gradle, inspects Compose semantics through get_ui_hierarchy, drives taps and typing over ADB, verifies rendering via MediaProjection screenshots, and reads get_logcat crash traces.

Does ScreenSync MCP support iOS testing for Kotlin Multiplatform projects?

ScreenSync MCP supports Android devices (Android 7.0 or later) alongside the desktop hub and Chrome/Edge browser extension, and does not support iOS. However, fixing shared commonMain state, coroutine, or Compose layout bugs caught on real Android hardware improves your KMP codebase across every target.

Why are commonTest runComposeUiTest suites not enough for KMP Android apps?

Shared commonTest runComposeUiTest suites execute against mocked repositories in a host JVM runtime and bypass real Android OS boundaries. They cannot detect actual expect/actual failures, FileProvider URI errors, SQLite driver locks, WindowInsets keyboard overlaps, or OEM font and DPI rendering differences.

Does ScreenSync MCP require root access or ADB for Android screen capture?

ScreenSync MCP requires neither root access nor ADB to capture your Android phone screen. Display capture uses Android's native MediaProjection API after per-session user consent. Interactive control tools such as control_tap, control_swipe, and control_type run through ADB over USB or wireless debugging.

How do Compose Multiplatform testTags appear in get_ui_hierarchy on Android?

Compose Multiplatform testTags appear as Android resource IDs when you wrap your root Composable inside MainActivity with Modifier.semantics { testTagsAsResourceId = true }. Once enabled, get_ui_hierarchy exposes your shared commonMain testTag strings directly for deterministic node matching without Android-specific UI code.

How many tools does ScreenSync MCP provide for KMP mobile and web testing?

ScreenSync MCP provides 226 MCP tools in total, split into 29 phone and desktop tools (12 control_*, 3 os_*, and 14 capture/hub tools) plus 197 web_* browser tools, along with 17 prompts and 3 resources for unified native Android and browser verification.

Are Android screen frames sent to EpsolDev servers during KMP debugging?

Android screen frames stream directly from your phone to your local Node.js hub on port 3000 over your LAN using SCREEN_SYNC_TOKEN authentication, never passing through EpsolDev servers (Drive fallback is optional). Screenshots an AI agent requests are sent to that agent's model provider.

Which AI coding clients work with ScreenSync MCP for KMP development?

ScreenSync MCP works with MCP clients that run local stdio servers, including Claude Code, Claude Desktop, Cursor, and VS Code agent mode. ChatGPT's web application requires remote HTTPS MCP servers, so it is not supported for local stdio hub connections.

Written by

ScreenSync MCP team

The ScreenSync MCP team at EpsolDev builds the Android app, the desktop MCP hub and the browser extension that let AI agents see and control a real phone. These guides come out of that work.