Type something to search...

Servidor MCP de longarm

Volver a la documentación de longarm

longarm expone un servidor MCP por HTTP streamable para integraciones con agentes.

Endpoint

http://<host>:<mcpPort>/mcp

Comprobación de estado:

  • GET /mcp

Autenticación

Si la autenticación por token está activada, las solicitudes MCP deben incluir:

Authorization: Bearer <token>

Detalles del protocolo

  • transporte: HTTP streamable sobre POST /mcp
  • JSON-RPC version: 2.0
  • métodos soportados: initialize, ping, tools/list, tools/call
  • las respuestas de initialize incluyen un encabezado Mcp-Session-Id

Llamada mínima

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "open_app",
    "arguments": {
      "packageName": "com.android.settings"
    }
  }
}

Herramientas disponibles

Siempre disponibles:

  • screen_info
  • tap
  • long_press
  • open_app
  • open_intent
  • batch_list
  • batch_get
  • batch_save
  • batch_delete
  • batch_run
  • batch_run_inline
  • batch_status
  • batch_history_list
  • batch_history_get
  • batch_history_export
  • batch_history_delete

Solo Plus:

  • swipe
  • pinch
  • two_finger_swipe
  • rotate

Con inspección de UI y autenticación habilitadas:

  • ui_tree
  • ui_find
  • ui_wait
  • ui_action
  • ui_set_text
  • ui_scroll

Las llamadas MCP aparecen en Logs con método MCP y rutas como tools/call/open_app.