Longarm Docs
This page is the quick entry point for longarm documentation. Use these pages when you need to control an Android device from a script, desktop tool, test harness, or MCP-compatible agent.
Docs pages
What longarm does
longarm runs on an Android device and exposes:
- an HTTP REST API for direct remote control
- a streamable HTTP MCP server for agent and tool workflows
- saved and reusable batch tasks
Main supported actions include:
- tap and long press
- Plus gestures such as swipe, pinch, two-finger swipe, and rotate
- screenshots
- app launch and custom Android intents
- optional UI inspection and semantic UI actions
First-time setup
- Install and open
longarm. - Enable the Android Accessibility Service for
longarm. - Allow overlay permission if you want the floating bubble.
- In Settings, review the HTTP port, MCP port, bearer-token authentication, bind address, and UI inspection options.
- Start the HTTP server and/or MCP server from the app.
Security model
- By default,
longarmexpectsAuthorization: Bearer <token>. - If authentication is disabled, anyone on the reachable network can call the server.
- UI inspection is only available when bearer-token authentication remains enabled and
Allow UI inspectionis turned on.
REST API
The HTTP server exposes endpoints under /api/... for gestures, screenshots, app launching, Android intents, UI inspection, and batch automation.
MCP
longarm also exposes a streamable HTTP MCP server so compatible agents and tools can call Android control actions directly.
Batch tasks
Batch tasks save reusable multi-step Android automation flows that can run from the app, REST API, or MCP.
Detailed logs and history
longarm separates REST/MCP request logs from batch-run history so you can inspect both low-level calls and complete workflow runs.
Read the logs and history docs.
Recommended workflow
- Start the HTTP or MCP server.
- Copy the host and port shown in the app.
- Use the REST API for direct scripts, or MCP for agent integration.
- Save repeated flows as batch tasks.
- Check the Logs tab and Batch History tab inside
longarm.