Longarm MCP 服务器
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 - 支持的方法:
initialize、ping、tools/list、tools/call initialize响应会包含Mcp-Session-Id头
最小调用示例
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "open_app",
"arguments": {
"packageName": "com.android.settings"
}
}
}
可用工具
始终可用:
screen_infotaplong_pressopen_appopen_intentbatch_listbatch_getbatch_savebatch_deletebatch_runbatch_run_inlinebatch_statusbatch_history_listbatch_history_getbatch_history_exportbatch_history_delete
Plus 专属:
swipepinchtwo_finger_swiperotate
启用 UI 检查并保持认证开启时可用:
ui_treeui_findui_waitui_actionui_set_textui_scroll
MCP 调用会显示在 Logs 中,方法为 MCP,路径类似 tools/call/open_app。