Skip to content

Server Mode

MobileCLI can run as a server, exposing all device operations via JSON-RPC over HTTP and WebSocket. This is how Mobile MCP integrates with it.

The full JSON-RPC API specification is available at mobile-next/mobile-openrpc.

Terminal window
mobilecli server start --listen localhost:12000 --cors

Send JSON-RPC requests to the server:

Terminal window
curl -X POST http://localhost:12000/jsonrpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"devices.list","id":1}'

Connect via WebSocket for real-time interactions and streaming:

ws://localhost:12000/ws
InterfaceBest for
CLIScripts, CI/CD, one-off commands
HTTP POSTRequest/response workflows, simple automation
WebSocketReal-time control, screen streaming, long-lived sessions