Devicecloud

io.github.RubenGlez由 GitHub 账号 RubenGlez 发布v0.3.3更新于 Nov 7, 2026

Triage failing DeviceCloud Maestro test runs: fail reasons, screenshots, flaky-flow analytics

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

只读 MCP 服务器,把 DeviceCloud 上失败的 Maestro 测试运行(失败原因、截图、报告与不稳定流程分析)拉进编辑器供排查。

可以做什么
  • 一次调用诊断某次运行:失败流程、失败原因、耗时、自动下载的失败截图,以及通过/失败/不稳定汇总
  • 按时间窗口评估套件健康度,把流程归类为健康、不稳定、损坏或回归
  • 列出并按名称或日期筛选近期上传,读取整体与各流程状态及失败原因
  • 获取 JUnit XML 与 HTML 报告,并下载日志、截图、视频等原始产物
  • 查看各流程通过率分析,并深入查看单个流程文件的运行历史
适用场景
适用于 Maestro 流程通过 CI 在 DeviceCloud 上运行、希望助手直接读取失败证据并修复流程或应用代码而无需打开仪表盘的场景。也适合判断哪些不稳定或损坏的流程值得优先修复。
运行要求
需要 Node.js 22 或更高版本,通过 npx 按需运行,无需单独安装。需要 DeviceCloud API 密钥,通过环境变量 DEVICE_CLOUD_API_KEY 提供,并需在 shell 配置文件中导出以便子进程继承。需要访问 DeviceCloud REST API 的网络;解压 HTML 报告还需要 unzip 命令。
安装前请注意
需要 DeviceCloud API 密钥(DEVICE_CLOUD_API_KEY),密钥错误或已吊销会返回 HTTP 401 或 403。服务器对 DeviceCloud API 为只读,无法触发计费运行,但会把报告和产物下载到本地磁盘(默认 /tmp),并将密钥发送给 DeviceCloud。日志、截图等测试证据会进入助手的上下文。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Devicecloud,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

devicecloud-mcp

[npm version]

Triage failing DeviceCloud runs so your agent can fix them, without opening the dashboard.

When a DeviceCloud run goes red in CI, the reason why is buried in the web dashboard: the fail reason, the failure screenshot, the logs. This server pulls all of it straight into your editor, so your AI assistant (Claude Code, Cursor, Claude Desktop, etc.) can read the evidence, find the root cause, and fix the flow or app code. You commit, CI re-runs, and the dashboard stays closed.

DeviceCloud is a platform for running Maestro flows on real devices. Your CI triggers the runs; this server is how you debug the ones that fail.

It lets the assistant:

  • diagnose a run in one call: failed flows, fail reasons, failure-screenshot paths, and a passed/failed/flaky summary, ready to act on
  • rank suite health: classify every flow as healthy, flaky, broken, or regression over a window so you know what's worth fixing first
  • list recent uploads, filter by name (commit message + short SHA) or date
  • read per-flow status and failReason for any upload
  • pull the JUnit XML report
  • download and auto-unzip the HTML report (with failure screenshots highlighted)
  • download raw artifacts (logs, screenshots, video) as a zip
  • spot flaky vs genuinely-broken flows with per-flow pass-rate analytics
  • drill into run history for a specific flow file

The server is read-only against the DeviceCloud REST API: no dcd CLI dependency, and nothing an agent does can trigger billable runs. Triggering and re-running tests stay with your CI; cancelling a run stays in the dashboard.

Install

Requires Node.js 22+ — check with node --version. There's no separate install step; the server runs on demand via npx.

Add this to your MCP client config:

json
{  "mcpServers": {    "devicecloud": {      "command": "npx",      "args": ["-y", "devicecloud-mcp"],      "env": {        "DEVICE_CLOUD_API_KEY": "<your-key>"      }    }  }}

Get your API key at console.devicecloud.dev/settings.

Claude Code: add it with one command

Skip editing JSON — register the server in one step:

sh
claude mcp add devicecloud --env DEVICE_CLOUD_API_KEY=<your-key> -- npx -y devicecloud-mcp

Add -s user to make it available in every project instead of only the current one.

Configure your assistant

The config block above is the same for every client; only the file location differs.

Claude Code (project-scoped, .mcp.json)

Add to a .mcp.json at the root of any project where you want the tools available:

json
{  "mcpServers": {    "devicecloud": {      "command": "npx",      "args": ["-y", "devicecloud-mcp"],      "env": {        "DEVICE_CLOUD_API_KEY": "${DEVICE_CLOUD_API_KEY}"      }    }  }}

Then export the key from your shell profile so Claude Code's child process inherits it:

sh
# ~/.zshrc or ~/.bashrcexport DEVICE_CLOUD_API_KEY="<your-key>"

Setting it only in an interactive shell isn't enough; Claude Code spawns the MCP from its own environment, so the variable needs to be in the profile.

Claude Code (user-scoped, ~/.claude.json)

If you want it available everywhere instead of per-project, add the same devicecloud block under mcpServers in ~/.claude.json.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows). Restart Claude Desktop after saving; a tools icon appears in the chat input once the server connects.

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json at the project root (project-scoped).

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json.

Other MCP-compatible clients

Any client that supports stdio MCP servers uses the same { command, args, env } shape. Consult the client's docs for the config file location.

Note: OpenAI products (ChatGPT, Codex, the Assistants API) use their own tool protocol and do not support MCP servers.

Verify

After restarting your assistant:

List recent DeviceCloud uploads, limit 3.

You should see a JSON-shaped response with an uploads array. If instead you get DEVICE_CLOUD_API_KEY env var is required, the variable isn't reaching the spawned process; re-check that it's exported from your shell profile (not just the current shell).

Available tools

ToolPurpose
diagnose_runStart here. One-call triage of a run (uploadId or name): folds retries per flow and returns failed flows with fail reasons, durations, and auto-downloaded failure-screenshot paths, plus a passed/failed/flaky summary and suggested next steps. Set includeReport: false to skip the screenshot download; outputDir sets where the report extracts (default /tmp).
suite_healthClassify every flow over a lookback window into healthy, flaky, broken, or regression, ranked worst-first, so you can tell whether a failure is worth fixing before diving in. Regressions (passing, then recently failing) come first. Same filters as list_flow_analytics (platform, appId, days, startDate, endDate, tags).
list_uploadsList recent uploads. Filter by name (* wildcard), from, to, limit, offset.
get_upload_statusOverall status + per-test status, duration, failReason. Provide uploadId or name.
get_resultsPer-flow rows for one upload: id, test_file_name, status, fail_reason, duration_seconds, retry_of. Optional client-side status filter.
get_junit_reportRaw JUnit XML for an upload.
get_html_reportDownloads + auto-unzips the HTML report. Returns the extraction dir and an inventory with failureScreenshots[] highlighted (these are the highest-signal debugging artifact).
download_artifactsZip of raw artifacts (logs, screenshots, video). results: "FAILED" (default) or "ALL". Saves to /tmp by default; not auto-unzipped.
list_flow_analyticsPer-flow pass rate, run counts, avg duration over a lookback window (default 14 days). Useful to tell flakes from genuinely-broken flows.
get_flow_runsIndividual run history for one flow file (fileName required). Returns status, duration, failReason, and the uploadId each run belongs to. Use to drill into a specific flow after list_flow_analytics.

Upload-naming convention

Uploads are typically named after the commit or build that triggered them. A common convention is to include the short SHA:

fix(login): handle expired session (a1b2c3d4)

Filter with name = "*a1b2c3d4*" to find every upload for a specific commit. The wildcard is *, not %.

When uploads do and don't exist

DeviceCloud uploads are created when you trigger a run, via the CLI, a CI step, the GitHub Action, or the API directly. Whether a given commit has an upload depends entirely on your CI setup. If list_uploads returns nothing for a SHA you expect, the run probably wasn't triggered for that commit.

Troubleshooting

  • DEVICE_CLOUD_API_KEY env var is required: the variable isn't visible to the spawned MCP. Export it from ~/.zshrc / ~/.bashrc, restart your assistant.
  • unzip failed (from get_html_report): the unzip binary is missing or crashed. Install with brew install unzip (macOS ships with it; Linux usually does too).
  • HTTP 401 / 403: the API key is wrong or revoked. Regenerate it at console.devicecloud.dev/settings.
  • Empty list_uploads for your SHA: a run probably wasn't triggered for that commit. See "When uploads do and don't exist" above.

来源:README.md,提交 729d94d

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.3.3最新Nov 7, 2026
  2. v0.3.2Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分