Skip to content

Mobile MCP: let AI agents drive your iOS and Android apps. MCP server for simulators, emulators and real devices. Works with Claude Code, Codex, Cursor and any MCP client.

feat: add server instructions describing the device workflow

gmegidish291a6be663e9
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 96ff096..a395aa0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,6 @@
## Unreleased
+* Feat: Server instructions telling clients to pick a device first, read the screen via `mobile_list_elements_on_screen`, batch round-trips, and release remote devices when done ([#445](https://github.com/mobile-next/mobile-mcp/pull/445))
+* Chore: Log the mobile-mcp and MCP SDK versions on stdio startup ([#445](https://github.com/mobile-next/mobile-mcp/pull/445))
* Chore: Migrate to the MCP TypeScript SDK v2 package split (`@modelcontextprotocol/server`, `/node`, `/express`); no protocol or transport change, v1 clients keep working ([#445](https://github.com/mobile-next/mobile-mcp/pull/445), based on [#400](https://github.com/mobile-next/mobile-mcp/pull/400) by [@anxkhn](https://github.com/anxkhn))
## [1.0.4](https://github.com/mobile-next/mobile-mcp/releases/tag/1.0.4) (2026-09-13)
diff --git a/src/server.ts b/src/server.ts
index 10f5a2b..732910a 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -67,11 +67,32 @@ export const getSdkVersion = (): string => {
}
};
+const SERVER_INSTRUCTIONS = `Drive a real or simulated iOS/Android device.
+
+Start with mobile_list_available_devices and pass the chosen device id to every
+later call - there is no implicit "current device". Use a remote device only
+when local ones do not fit or when requested by the user. Remote devices cost
+money and take time to allocate and release. Release when done using, so the
+remote device cleans and returns to pool.
+
+Read the screen with mobile_list_elements_on_screen, not screenshots: it returns
+refs, coordinates and labels, and tapping by ref survives layout differences
+between devices. Fall back to mobile_take_screenshot only for elements missing
+from the hierarchy, or to judge visual appearance.
+
+Each call is a device round-trip. Group known sequences (tap, type, tap) into
+mobile_batch_commands instead of issuing them one at a time.
+
+Prefer mobile_open_url or mobile_launch_app over navigating through the UI to
+reach a screen.`;
+
export const createMcpServer = (): McpServer => {
const server = new McpServer({
name: "mobile-mcp",
version: getAgentVersion(),
+ }, {
+ instructions: SERVER_INSTRUCTIONS,
});