Skip to main 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.

Start the server

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

HTTP POST (JSON-RPC)

Send JSON-RPC requests to the server:

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

WebSocket (JSON-RPC)

Connect via WebSocket for real-time interactions and streaming:

ws://localhost:12000/ws

Use cases

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