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 athttps://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.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.Available Tools
Every action is its own tool, named after what it does, for examplemanage_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 withget. - To retry a purchase safely, send the same
clientRequestIdagain. You are not charged twice.
Self-hosting
To run the MCP server yourself, follow the setup guide. A self-hosted server uses thefull profile by default.
Changes
If you built an integration on an older version, check the changelog. For example, the iOS device type is nowios_phone.
Talk to Mobilerun Agents
Theassistant_* 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.Client Setup
Cursor
Add the MCP configuration to your Cursor settings:- Open Cursor Settings
- Navigate to the MCP section
- Add the Mobilerun server with the URL
https://cloud.mobilerun.ai/api/mcp - Restart Cursor to connect
Claude Desktop and claude.ai
Add a custom connector with the URLhttps://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:
- List available devices
- Create and run the task
- 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.