Longarm MCP Server
longarm exposes a streamable HTTP MCP server for agent integrations.
Endpoint
http://<host>:<mcpPort>/mcp
Health check:
GET /mcp
Example response:
{ "status": "running", "transport": "mcp" }
Authentication
If token auth is enabled, MCP requests must include:
Authorization: Bearer <token>
Protocol details
- transport: streamable HTTP over
POST /mcp - JSON-RPC version:
2.0 - supported RPC methods:
initialize,ping,tools/list,tools/call initializeresponses include anMcp-Session-Idheader
Minimal calls
initialize
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": {
"name": "example-client",
"version": "1.0.0"
}
}
}
tools/list
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}
tools/call
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "open_app",
"arguments": {
"packageName": "com.android.settings"
}
}
}
Tool availability
Always available:
screen_infotaplong_pressopen_appopen_intentbatch_listbatch_getbatch_savebatch_deletebatch_runbatch_run_inlinebatch_statusbatch_history_listbatch_history_getbatch_history_exportbatch_history_delete
Plus only:
swipepinchtwo_finger_swiperotate
Only when UI inspection is enabled and auth remains enabled:
ui_treeui_findui_waitui_actionui_set_textui_scroll
Result shape
Tool calls return content, structuredContent, and isError when the tool-level result failed.
{
"content": [
{
"type": "text",
"text": "{\"success\":true}"
}
],
"structuredContent": {
"success": true
}
}
MCP tool calls also appear in the Logs view with method MCP and paths such as tools/call/open_app.