xinyi-eng/damai-mcp
Android Emulator MCP for ticket-grabbing automation (大麦 / 猫眼 / 飞猪). Control 雷电 / MuMu / 真机 from Claude Code / Cursor via standard MCP protocol.
618546abf434damai-mcp0.1.0 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 8 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
- Supply Chain: the dependency files state no exact versions the scanner could check, so it has no number
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 26 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
damai_open_concertNo tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files1 tool · damai_open_concert
Not all three are present in the tools the scanner traced.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (26: 26 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
assert_texttool 断言文字在指定时间内出现(不抛异常)。
断言文字在指定时间内出现(不抛异常)。
Args:
device_id: 设备 ID。
text: 要检测的文字。
exact: True=全等。
timeout: 等待秒数。connect_devicetool 通过 TCP 连接远程设备/模拟器。
通过 TCP 连接远程设备/模拟器。
Args:
host_port: 形如 "127.0.0.1:5555"(雷电模拟器默认)。damai_check_logintool 检查大麦是否在前台且已登录。
检查大麦是否在前台且已登录。
Args:
device_id: 设备 ID。
timeout: 等待秒数。damai_confirm_ordertool 点击「确认订单」按钮。
点击「确认订单」按钮。
Args:
device_id: 设备 ID。
timeout: 等待秒数。damai_grabtool 一站式抢票:等开票 → 抢档位 → 选观演人 → 提交订单。
一站式抢票:等开票 → 抢档位 → 选观演人 → 提交订单。
Args:
device_id: 设备 ID。
item_id: 大麦 item id。
price_index: 票档序号(1-based)。
viewer_names: 观演人姓名列表。
ticket_num: 张数。
open_time: 开票时间 "YYYY-MM-DD HH:MM:SS"(空=立即抢)。
preheat_seconds: 开票前多少秒开始预热(默认 30)。
max_runtime_sec: 整个流程最大耗时(默认 600 秒)。damai_grab_multitool 多账号/多设备并发抢票(asyncio.gather)。
多账号/多设备并发抢票(asyncio.gather)。
Args:
accounts: [{"device_id": "127.0.0.1:5555", "viewer_names": ["A"]}, ...]。
item_id: 大麦 item id。
price_index: 票档序号。
open_time: 开票时间。
preheat_seconds: 预热秒数。damai_open_concerttool 打开大麦演出详情页。Filesoutside text
打开大麦演出详情页。
Args:
device_id: 设备 ID。
item_id: 大麦 item id(数字字符串)。damai_paytool 点击「立即支付」按钮(后续需手动在大麦 APP 完成支付)。
点击「立即支付」按钮(后续需手动在大麦 APP 完成支付)。
Args:
device_id: 设备 ID。
timeout: 等待秒数。damai_select_pricetool 选择第 N 档票(从详情页的票价表)。
选择第 N 档票(从详情页的票价表)。
Args:
device_id: 设备 ID。
price_index: 1-based 票档序号。
timeout: 等待秒数。damai_select_viewerstool 勾选观演人。
勾选观演人。
Args:
device_id: 设备 ID。
viewer_names: 观演人姓名列表,如 ["杨安琪"]。
timeout: 等待秒数。device_infotool 获取设备的详细信息(型号、安卓版本、屏幕分辨率等)。
获取设备的详细信息(型号、安卓版本、屏幕分辨率等)。
Args:
device_id: 设备 ID。disconnect_devicetool 断开指定设备。
断开指定设备。
Args:
device_id: 设备序列号或 IP:端口。double_taptool 双击。
双击。
Args:
device_id: 设备 ID。
x, y: 坐标。
gap_ms: 两次点击间隔毫秒。dump_uitool 获取当前界面的 UI 层级。
获取当前界面的 UI 层级。
Args:
device_id: 设备 ID。
save_to: 保存 XML 快照到该路径,便于事后分析。find_resource_idtool 按 resource-id 查找 UI 元素。
按 resource-id 查找 UI 元素。
Args:
device_id: 设备 ID。
resource_id: resource-id(默认精确匹配)。
exact: True=全等,False=后缀匹配。
timeout: 等待秒数。find_texttool 按文字查找 UI 元素。
按文字查找 UI 元素。
Args:
device_id: 设备 ID。
text: 要查找的文字(默认精确匹配)。
exact: True=全等,False=子串匹配。
clickable_only: 只返回可点击元素。
timeout: 等待秒数。find_xpathtool 按 XPath 查找 UI 元素。
按 XPath 查找 UI 元素。
Args:
device_id: 设备 ID。
xpath: lxml 风格 XPath,例如 "//node[@text='立即购买']"。
timeout: 等待秒数。input_texttool 向当前焦点输入框输入文本(中文需要 ADBKeyBoard)。
向当前焦点输入框输入文本(中文需要 ADBKeyBoard)。
Args:
device_id: 设备 ID。
text: 要输入的文本。
delay_ms: 字符间隔(用于绕过风控)。list_devicestool 列出所有连接的 Android 设备/模拟器。
列出所有连接的 Android 设备/模拟器。
Args:
refresh: 跳过缓存,强制重新查询 `adb devices`。long_presstool 长按坐标。
长按坐标。
Args:
device_id: 设备 ID。
x, y: 坐标。
duration_ms: 按住时长(500-1000ms 可触发长按菜单)。press_keytool 按键。
按键。
Args:
device_id: 设备 ID。
key: 常用键名(home/back/menu/enter/delete/tab/up/down/left/right/
volume_up/volume_down/power)。scrolltool 整屏滚动。
整屏滚动。
Args:
device_id: 设备 ID。
direction: "up" | "down" | "left" | "right"。
distance_ratio: 滚动距离占屏幕短边的比例(0-1)。
duration_ms: 滚动时长。swipetool 从 (x1,y1) 拖动到 (x2,y2)。
从 (x1,y1) 拖动到 (x2,y2)。
Args:
device_id: 设备 ID。
x1, y1, x2, y2: 起止坐标。
duration_ms: 拖动时长。take_screenshottool 截图。
截图。
Args:
device_id: 设备 ID。
save_path: 保存路径(None 则不保存文件)。
return_base64: True 则返回 base64 字符串(用于 AI 看图)。
max_width: 缩放宽度(保持比例),None 不缩放。taptool 点击屏幕坐标。
点击屏幕坐标。
Args:
device_id: 设备 ID。
x: 像素 X 坐标。
y: 像素 Y 坐标。
duration_ms: 按住时长(>0 模拟长按)。wait_for_elementtool 等待元素出现,支持前缀:text= / resource-id= / xpath=。
等待元素出现,支持前缀:text= / resource-id= / xpath=。
Args:
device_id: 设备 ID。
selector: 选择器(带前缀)或裸文字。
timeout: 等待秒数。Text the model reads (26)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
list_devices tool
列出所有连接的 Android 设备/模拟器。
Args:
refresh: 跳过缓存,强制重新查询 `adb devices`。connect_device tool
通过 TCP 连接远程设备/模拟器。
Args:
host_port: 形如 "127.0.0.1:5555"(雷电模拟器默认)。disconnect_device tool
断开指定设备。
Args:
device_id: 设备序列号或 IP:端口。device_info tool
获取设备的详细信息(型号、安卓版本、屏幕分辨率等)。
Args:
device_id: 设备 ID。tap tool
点击屏幕坐标。
Args:
device_id: 设备 ID。
x: 像素 X 坐标。
y: 像素 Y 坐标。
duration_ms: 按住时长(>0 模拟长按)。double_tap tool
双击。
Args:
device_id: 设备 ID。
x, y: 坐标。
gap_ms: 两次点击间隔毫秒。long_press tool
长按坐标。
Args:
device_id: 设备 ID。
x, y: 坐标。
duration_ms: 按住时长(500-1000ms 可触发长按菜单)。swipe tool
从 (x1,y1) 拖动到 (x2,y2)。
Args:
device_id: 设备 ID。
x1, y1, x2, y2: 起止坐标。
duration_ms: 拖动时长。scroll tool
整屏滚动。
Args:
device_id: 设备 ID。
direction: "up" | "down" | "left" | "right"。
distance_ratio: 滚动距离占屏幕短边的比例(0-1)。
duration_ms: 滚动时长。input_text tool
向当前焦点输入框输入文本(中文需要 ADBKeyBoard)。
Args:
device_id: 设备 ID。
text: 要输入的文本。
delay_ms: 字符间隔(用于绕过风控)。press_key tool
按键。
Args:
device_id: 设备 ID。
key: 常用键名(home/back/menu/enter/delete/tab/up/down/left/right/
volume_up/volume_down/power)。take_screenshot tool
截图。
Args:
device_id: 设备 ID。
save_path: 保存路径(None 则不保存文件)。
return_base64: True 则返回 base64 字符串(用于 AI 看图)。
max_width: 缩放宽度(保持比例),None 不缩放。dump_ui tool
获取当前界面的 UI 层级。
Args:
device_id: 设备 ID。
save_to: 保存 XML 快照到该路径,便于事后分析。find_text tool
按文字查找 UI 元素。
Args:
device_id: 设备 ID。
text: 要查找的文字(默认精确匹配)。
exact: True=全等,False=子串匹配。
clickable_only: 只返回可点击元素。
timeout: 等待秒数。find_resource_id tool
按 resource-id 查找 UI 元素。
Args:
device_id: 设备 ID。
resource_id: resource-id(默认精确匹配)。
exact: True=全等,False=后缀匹配。
timeout: 等待秒数。find_xpath tool
按 XPath 查找 UI 元素。
Args:
device_id: 设备 ID。
xpath: lxml 风格 XPath,例如 "//node[@text='立即购买']"。
timeout: 等待秒数。wait_for_element tool
等待元素出现,支持前缀:text= / resource-id= / xpath=。
Args:
device_id: 设备 ID。
selector: 选择器(带前缀)或裸文字。
timeout: 等待秒数。assert_text tool
断言文字在指定时间内出现(不抛异常)。
Args:
device_id: 设备 ID。
text: 要检测的文字。
exact: True=全等。
timeout: 等待秒数。damai_check_login tool
检查大麦是否在前台且已登录。
Args:
device_id: 设备 ID。
timeout: 等待秒数。damai_open_concert tool
打开大麦演出详情页。
Args:
device_id: 设备 ID。
item_id: 大麦 item id(数字字符串)。damai_select_price tool
选择第 N 档票(从详情页的票价表)。
Args:
device_id: 设备 ID。
price_index: 1-based 票档序号。
timeout: 等待秒数。damai_select_viewers tool
勾选观演人。
Args:
device_id: 设备 ID。
viewer_names: 观演人姓名列表,如 ["杨安琪"]。
timeout: 等待秒数。damai_confirm_order tool
点击「确认订单」按钮。
Args:
device_id: 设备 ID。
timeout: 等待秒数。damai_pay tool
点击「立即支付」按钮(后续需手动在大麦 APP 完成支付)。
Args:
device_id: 设备 ID。
timeout: 等待秒数。damai_grab tool
一站式抢票:等开票 → 抢档位 → 选观演人 → 提交订单。
Args:
device_id: 设备 ID。
item_id: 大麦 item id。
price_index: 票档序号(1-based)。
viewer_names: 观演人姓名列表。
ticket_num: 张数。
open_time: 开票时间 "YYYY-MM-DD HH:MM:SS"(空=立即抢)。
preheat_seconds: 开票前多少秒开始预热(默认 30)。
max_runtime_sec: 整个流程最大耗时(默认 600 秒)。damai_grab_multi tool
多账号/多设备并发抢票(asyncio.gather)。
Args:
accounts: [{"device_id": "127.0.0.1:5555", "viewer_names": ["A"]}, ...]。
item_id: 大麦 item id。
price_index: 票档序号。
open_time: 开票时间。
preheat_seconds: 预热秒数。What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 26 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 26 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 26 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 26 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 26 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 26 capabilities; 26 more call code the scanner could not follow, where it may happen
- Tools that touch files1 of 26 capabilities touch files; 25 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 26 capabilities; 26 more call code the scanner could not follow, where it may happen
Where the code is: 26 handlers in 1 file at commit 618546abf434
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: pyproject.toml
- Lockfiles checked against OSVNothing could be resolved to exact versions; 1 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- MCP SDK versionmcp >=1.0
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 26 capabilities; 26 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | mcp >=1.0 |
| Servers in the code | 1 (damai-mcp) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-07-12 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 2 catalogs (glama, mcp_toplist) |
|---|---|
| License | NOASSERTION |
| Created | 2026-07-12 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.