Type something to search...

Longarm MCP 服务器

返回 longarm 文档

longarm 提供 streamable HTTP MCP 服务器,用于 Agent 集成。

端点

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

健康检查:

  • GET /mcp

认证

如果启用了 token 认证,MCP 请求必须包含:

Authorization: Bearer <token>

协议细节

  • 传输方式:通过 POST /mcp 使用 streamable HTTP
  • JSON-RPC version:2.0
  • 支持的方法:initializepingtools/listtools/call
  • initialize 响应会包含 Mcp-Session-Id

最小调用示例

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

可用工具

始终可用:

  • 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

Plus 专属:

  • swipe
  • pinch
  • two_finger_swipe
  • rotate

启用 UI 检查并保持认证开启时可用:

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

MCP 调用会显示在 Logs 中,方法为 MCP,路径类似 tools/call/open_app