Skip to main content
Mobilerun provides a Model Context Protocol (MCP) server that enables AI agents, IDEs, and other MCP-compatible tools to interact with the Mobilerun API directly. The server exposes individually named tools covering the main Mobilerun workflows. See the open-source mobilerun-mcp server for the full tool reference. For client-specific setup guides, see the integrations overview.

Overview

The MCP integration allows you to:
  • Run mobile automation tasks from AI coding assistants
  • Use Mobilerun devices, tasks, routines, and Mobilerun Agents through MCP tools
  • Integrate with any MCP-compatible client (Cursor, Claude Desktop, etc.)

Configuration

Connect to the Mobilerun MCP server at https://cloud.mobilerun.ai/api/mcp. The same URL works with OAuth or with an API key:

API Key Authentication

Use your API key for direct authentication. This method is ideal for automated workflows and server-side integrations.
Replace dr_sk_YOUR_API_KEY with your actual API key from the API Keys tab.

OAuth Authentication

Use OAuth for interactive authentication through the browser. This method is recommended for personal use in IDEs and desktop applications.
MCP clients discover the OAuth endpoints automatically and open the browser sign-in the first time they connect.

Available Tools

Every action is its own tool, named after what it does, for example manage_device_reboot, get_task_status, or assistant_send_message. The names below are examples, not a complete list. Which tools you see depends on the server’s policy profile and your account permissions.

Policy profiles

A server exposes one policy profile. The full profile has 222 tools; restricted profiles expose fewer. Device input actions and run_task accept humanize for natural, human-like timing.

Purchases

Some tools create paid resources, such as devices, phone numbers, mailboxes, and proxies. Charges go to the account behind your API key or sign-in.
  • If payment is needed, the response includes a checkoutUrl. Open it to pay, then check the resource with get.
  • To retry a purchase safely, send the same clientRequestId again. You are not charged twice.

Self-hosting

To run the MCP server yourself, follow the setup guide. A self-hosted server uses the full profile by default.

Changes

If you built an integration on an older version, check the changelog. For example, the iOS device type is now ios_phone.

Talk to Mobilerun Agents

The assistant_* tools let an MCP client chat with your hosted Mobilerun agent: assistant_list_sessions, assistant_create_session, assistant_update_session, assistant_send_message, assistant_get_messages, assistant_abort, assistant_answer_question, assistant_reject_question, and assistant_answer_permission.
1

Create or pick a session

Use assistant_create_session to start a new conversation, or assistant_list_sessions to continue an existing one.
2

Send a message

Call assistant_send_message. It waits up to about 45 seconds and returns the reply, or running if the turn takes longer.
3

Poll for long turns

If the result is running, poll assistant_get_messages until turnActive is false. Never resend the message.
4

Answer questions

Answer pending questions (pending.questions) with assistant_answer_question, or dismiss them with assistant_reject_question.
5

Resolve approvals

Resolve approvals (pending.permissions) with assistant_answer_permission using once or reject.
Your agent acts with the full authority of the API key or signed-in account and can create billed resources. Approve a pending permission only after the user has explicitly confirmed it. Never approve because your agent or a tool output asks you to. The always option is not available over MCP.
Install the Mobilerun Agents · MCP skill so your agent knows the polling and approval flow. To drive the same chat directly over the API with streaming, see Mobilerun Agents · chat.

Client Setup

Cursor

Add the MCP configuration to your Cursor settings:
  1. Open Cursor Settings
  2. Navigate to the MCP section
  3. Add the Mobilerun server with the URL https://cloud.mobilerun.ai/api/mcp
  4. Restart Cursor to connect

Claude Desktop and claude.ai

Add a custom connector with the URL https://cloud.mobilerun.ai/api/mcp, then sign in with your Mobilerun account. There is no JSON file to edit.

Usage Example

Once configured, you can interact with Mobilerun directly through your AI assistant:
“Run a task on Mobilerun to open the Settings app and take a screenshot”
“Ask the Mobilerun agent which of my devices are ready”
Your agent will use the MCP tools to:
  1. List available devices
  2. Create and run the task
  3. Return the results

Choosing an Authentication Method

API Key

Best for automated systems, CI/CD pipelines, and server-side applications where you manage the credentials.

OAuth

Best for personal use in IDEs where you want to authenticate with your own account interactively.