Skip to main content
LangChain is a framework for building tool-using agents. Mobilerun gives a LangChain agent tools for working with phones.

Setup

  1. Set up a phone, install LangChain and its MCP adapter, and create a Mobilerun API key. Install the adapter for the example’s language:
  2. Configure the Mobilerun server (@langchain/mcp-adapters for TypeScript, langchain-mcp-adapters for Python):
  1. Set MOBILERUN_API_KEY and model credentials in the process environment. Use the example inside an async function and pass tools to your LangChain agent. Keep keys server-side and configure action approvals.

First task

List my Mobilerun devices and take a screenshot of the ready device.
See MCP Server for available tools. See LangChain’s MCP documentation for agent construction and session behavior.