digital-ai-testing-mcp 1.2.3 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +133 -102
  2. package/dist/index.js +3 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/tools/application-tools.d.ts.map +1 -1
  5. package/dist/tools/application-tools.js +19 -13
  6. package/dist/tools/application-tools.js.map +1 -1
  7. package/dist/tools/boilerplate-tools.d.ts.map +1 -1
  8. package/dist/tools/boilerplate-tools.js +6 -3
  9. package/dist/tools/boilerplate-tools.js.map +1 -1
  10. package/dist/tools/debug-tools.d.ts.map +1 -1
  11. package/dist/tools/debug-tools.js +4 -1
  12. package/dist/tools/debug-tools.js.map +1 -1
  13. package/dist/tools/device-tools.js +5 -5
  14. package/dist/tools/device-tools.js.map +1 -1
  15. package/dist/tools/inspection-tools.d.ts.map +1 -1
  16. package/dist/tools/inspection-tools.js +4 -1
  17. package/dist/tools/inspection-tools.js.map +1 -1
  18. package/dist/tools/meta-tools.d.ts.map +1 -1
  19. package/dist/tools/meta-tools.js +7 -6
  20. package/dist/tools/meta-tools.js.map +1 -1
  21. package/dist/tools/provisioning-profile-tools.d.ts.map +1 -1
  22. package/dist/tools/provisioning-profile-tools.js +10 -11
  23. package/dist/tools/provisioning-profile-tools.js.map +1 -1
  24. package/dist/tools/reporting-tools.d.ts.map +1 -1
  25. package/dist/tools/reporting-tools.js +6 -9
  26. package/dist/tools/reporting-tools.js.map +1 -1
  27. package/dist/tools/repository-tools.d.ts.map +1 -1
  28. package/dist/tools/repository-tools.js +10 -11
  29. package/dist/tools/repository-tools.js.map +1 -1
  30. package/dist/tools/usage-report-tools.d.ts.map +1 -1
  31. package/dist/tools/usage-report-tools.js +12 -8
  32. package/dist/tools/usage-report-tools.js.map +1 -1
  33. package/dist/tools/workflow-tools.d.ts.map +1 -1
  34. package/dist/tools/workflow-tools.js +3 -2
  35. package/dist/tools/workflow-tools.js.map +1 -1
  36. package/dist/utils/deployment-mode.d.ts +20 -0
  37. package/dist/utils/deployment-mode.d.ts.map +1 -0
  38. package/dist/utils/deployment-mode.js +24 -0
  39. package/dist/utils/deployment-mode.js.map +1 -0
  40. package/dist/utils/locality.d.ts +15 -4
  41. package/dist/utils/locality.d.ts.map +1 -1
  42. package/dist/utils/locality.js +78 -16
  43. package/dist/utils/locality.js.map +1 -1
  44. package/package.json +2 -2
package/README.md CHANGED
@@ -6,19 +6,20 @@
6
6
 
7
7
  # Digital.ai Testing — MCP Server
8
8
 
9
- An MCP (Model Context Protocol) server that connects AI assistants to a Digital.ai Testing device farm. The server exposes **191 tools**, **2 resources**, and **6 prompts** covering 26 capability areas: device management, test execution, app lifecycle, reporting, analytics, performance, project administration, interactive mobile inspection, interactive browser inspection, and more.
9
+ An MCP (Model Context Protocol) server that connects AI assistants to a Digital.ai Testing device farm. The server exposes **191 tools**, **2 resources**, and **7 prompts** covering 26 capability areas: device management, test execution, app lifecycle, reporting, analytics, performance, project administration, interactive mobile inspection, interactive browser inspection, and more.
10
10
 
11
11
  ---
12
12
 
13
13
  ## Quick Start
14
14
 
15
15
  ```bash
16
- # 1. Pull the image
17
- docker pull ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest
16
+ # 0. Confirm Node.js 22+ is installed (installs npm alongside it)
17
+ node --version
18
+ npm --version
19
+ # Don't have it? Install from https://nodejs.org (LTS) first.
18
20
 
19
- # 2. Create your .env
20
- curl -O https://raw.githubusercontent.com/digitalai-opensource/digital-ai-testing-mcp/main/.env.example
21
- cp .env.example .env # set DIGITAL_AI_BASE_URL and DIGITAL_AI_ACCESS_KEY
21
+ # 1. Install the MCP server
22
+ npm install -g digital-ai-testing-mcp
22
23
  ```
23
24
 
24
25
  Add to your AI client (Claude Desktop shown — see [Connecting AI Clients](#connecting-ai-clients) for VS Code, JetBrains, Copilot, and Cursor):
@@ -27,9 +28,13 @@ Add to your AI client (Claude Desktop shown — see [Connecting AI Clients](#con
27
28
  {
28
29
  "mcpServers": {
29
30
  "digital-ai-testing": {
30
- "command": "docker",
31
- "args": ["run", "--rm", "-i", "--env-file", "/ABSOLUTE/PATH/TO/.env",
32
- "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"]
31
+ "command": "digital-ai-testing-mcp",
32
+ "args": [],
33
+ "env": {
34
+ "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
35
+ "DIGITAL_AI_ACCESS_KEY": "your-access-key",
36
+ "MCP_DEPLOYMENT_MODE": "local"
37
+ }
33
38
  }
34
39
  }
35
40
  }
@@ -37,6 +42,8 @@ Add to your AI client (Claude Desktop shown — see [Connecting AI Clients](#con
37
42
 
38
43
  Then ask: *"Show me the overall health of the device farm."*
39
44
 
45
+ > Prefer a container? See [Option B — Pull from GitHub Container Registry](#option-b--pull-from-github-container-registry).
46
+
40
47
  ---
41
48
 
42
49
  ## Table of Contents
@@ -74,8 +81,8 @@ Then ask: *"Show me the overall health of the device farm."*
74
81
 
75
82
  ## Prerequisites
76
83
 
77
- - **Docker** — required for [Option A/B](#installation) (container-based install)
78
- - **Node.js 22+** — required for [Option C](#option-c--install-via-npm) (no Docker needed), or if building from source (Option B)
84
+ - **Node.js 22+** — required for [Option A](#option-a--install-via-npm-recommended) (recommended — no Docker needed)
85
+ - **Docker** — required for [Option B](#option-b--pull-from-github-container-registry) or [Option C](#option-c--build-from-source) (container-based install)
79
86
  - **Digital.ai Testing account** with a valid access key
80
87
 
81
88
  ---
@@ -130,9 +137,31 @@ The switch takes effect immediately — no restart needed.
130
137
 
131
138
  ## Installation
132
139
 
133
- ### Option A — Pull from GitHub Container Registry (Recommended)
140
+ ### Option A — Install via npm (Recommended)
141
+
142
+ No Docker required — runs directly under Node.js.
143
+
144
+ ```bash
145
+ npm install -g digital-ai-testing-mcp
146
+ ```
147
+
148
+ This installs a `digital-ai-testing-mcp` command onto your `PATH`. Use it directly as the `"command"` in your AI client configuration below — no image name or `.env` file path needed; environment variables go directly in the client's `env` block instead (see [Configuration](#configuration)).
149
+
150
+ Set `MCP_DEPLOYMENT_MODE=local` alongside your credentials (already included in the config blocks below). This tells the server its filesystem is your own machine — tool descriptions and a handful of upload/download behaviors adjust accordingly (no Docker/volume-mount caveats, no path-locality warnings), instead of defaulting to the cautious Docker-deployment framing.
134
151
 
135
- No cloning or building required. Use this for standard deployment.
152
+ **Upgrading to the latest release:**
153
+
154
+ ```bash
155
+ npm install -g digital-ai-testing-mcp@latest
156
+ ```
157
+
158
+ Then restart your AI client (or reconnect the MCP server from its settings panel) so it respawns the process — npm installing a new version doesn't affect an already-running process. Confirm the upgrade worked by asking your AI to call `get_server_info`, which reports the running version.
159
+
160
+ ---
161
+
162
+ ### Option B — Pull from GitHub Container Registry
163
+
164
+ No cloning or building required. Use this if you'd rather run the server in a container than install it with npm.
136
165
 
137
166
  **Step 1 — Pull the image**
138
167
 
@@ -150,13 +179,19 @@ cp .env.example .env
150
179
 
151
180
  Use `ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest` as the image name in your AI client configuration below.
152
181
 
153
- > Images are published when a GitHub Release is created — not on every commit. If `latest` is not available yet, use [Option B](#option-b--build-from-source) to build from source.
182
+ > Images are published when a GitHub Release is created — not on every commit. If `latest` is not available yet, use [Option C](#option-c--build-from-source) to build from source.
183
+
184
+ **Upgrading to the latest release:**
185
+
186
+ ```bash
187
+ docker pull ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest
188
+ ```
154
189
 
155
- > To update: `docker pull ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest`
190
+ Since the server is launched fresh each time via `docker run --rm` (see the client configs below), there's no running container to stop or remove first — the next time your AI client starts the server, it uses the freshly pulled image automatically. Confirm with `get_server_info`.
156
191
 
157
192
  ---
158
193
 
159
- ### Option B — Build from source
194
+ ### Option C — Build from source
160
195
 
161
196
  Required only for local development or modifying the server.
162
197
 
@@ -170,24 +205,13 @@ docker build -t digital-ai-testing-mcp:latest .
170
205
 
171
206
  Use `digital-ai-testing-mcp:latest` as the image name in your AI client configuration below.
172
207
 
173
- > Rebuild after making changes: `docker build -t digital-ai-testing-mcp:latest .`
174
-
175
- ---
176
-
177
- ### Option C — Install via npm
178
-
179
- No Docker required — runs directly under Node.js. Use this if Docker Desktop isn't available (e.g. locked-down or Docker-unable machines).
208
+ **Upgrading to the latest release:**
180
209
 
181
210
  ```bash
182
- npm install -g digital-ai-testing-mcp
211
+ git pull
212
+ docker build -t digital-ai-testing-mcp:latest .
183
213
  ```
184
214
 
185
- This installs a `digital-ai-testing-mcp` command onto your `PATH`. Use it directly as the `"command"` in your AI client configuration below (see the "**No Docker? Using the npm package**" callout under each client) — no image name or `.env` file path needed; environment variables go directly in the client's `env` block instead (see [Configuration](#configuration)).
186
-
187
- > To update: `npm install -g digital-ai-testing-mcp` again (npm updates in place).
188
-
189
- > This package is currently published and maintained under an individual maintainer's npm account rather than an organization account. Functionally identical to Options A/B; flagging for transparency.
190
-
191
215
  ---
192
216
 
193
217
  ## Configuration
@@ -198,6 +222,7 @@ This installs a `digital-ai-testing-mcp` command onto your `PATH`. Use it direct
198
222
  | `DIGITAL_AI_ACCESS_KEY` | ✅ | — | Access key — see [Access Keys](#access-keys) for the three access levels and key formats |
199
223
  | `MCP_SERVER_NAME` | Optional | `digital-ai-testing-mcp` | Server identity shown in the AI client |
200
224
  | `MCP_SERVER_VERSION` | Optional | version from `package.json` | Override the reported server version (rarely needed) |
225
+ | `MCP_DEPLOYMENT_MODE` | Optional | `docker` | `docker` (default) or `local` — set to `local` when running via the npm package ([Option A](#option-a--install-via-npm-recommended)) so tool descriptions and upload/download behavior reflect that the server's filesystem is your own machine, not a container's |
201
226
  | `REQUEST_TIMEOUT_MS` | Optional | `30000` | API request timeout in milliseconds |
202
227
  | `UPLOAD_TIMEOUT_MS` | Optional | `120000` | File upload timeout in milliseconds |
203
228
 
@@ -207,7 +232,7 @@ Additional `DAI_PROFILE_{NAME}_URL` / `DAI_PROFILE_{NAME}_KEY` pairs configure n
207
232
 
208
233
  ## Connecting AI Clients
209
234
 
210
- The examples below default to launching the server as a Docker container (using the GHCR image name from Option A — if you built from source with Option B, replace the image name with `digital-ai-testing-mcp:latest`; replace `/ABSOLUTE/PATH/TO/.env` with the full path to your `.env` file in all cases). Each client section also includes a **no-Docker config** for the [npm package](#option-c--install-via-npm) (Option C) — use whichever matches how you installed the server.
235
+ The examples below default to the npm package (Option A) — no image name or `.env` file path needed; credentials go directly in the client's `env` block. Each client section also includes a **Docker config** (Options B/C) for anyone running the server as a container instead — replace `/ABSOLUTE/PATH/TO/.env` with the full path to your `.env` file, and swap the GHCR image name for `digital-ai-testing-mcp:latest` if you built from source (Option C).
211
236
 
212
237
  ### Claude Desktop
213
238
 
@@ -219,34 +244,34 @@ Find your config file:
219
244
  {
220
245
  "mcpServers": {
221
246
  "digital-ai-testing": {
222
- "command": "docker",
223
- "args": [
224
- "run", "--rm", "-i",
225
- "--env-file", "/ABSOLUTE/PATH/TO/.env",
226
- "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"
227
- ]
247
+ "command": "digital-ai-testing-mcp",
248
+ "args": [],
249
+ "env": {
250
+ "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
251
+ "DIGITAL_AI_ACCESS_KEY": "your-access-key",
252
+ "MCP_DEPLOYMENT_MODE": "local"
253
+ }
228
254
  }
229
255
  }
230
256
  }
231
257
  ```
232
258
 
233
- > **Built from source?** Replace `ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest` with `digital-ai-testing-mcp:latest`.
234
-
235
- > **No Docker? Using the npm package (Option C):**
259
+ > **Using Docker instead (Option B/C)?**
236
260
  > ```json
237
261
  > {
238
262
  > "mcpServers": {
239
263
  > "digital-ai-testing": {
240
- > "command": "digital-ai-testing-mcp",
241
- > "args": [],
242
- > "env": {
243
- > "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
244
- > "DIGITAL_AI_ACCESS_KEY": "your-access-key"
245
- > }
264
+ > "command": "docker",
265
+ > "args": [
266
+ > "run", "--rm", "-i",
267
+ > "--env-file", "/ABSOLUTE/PATH/TO/.env",
268
+ > "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"
269
+ > ]
246
270
  > }
247
271
  > }
248
272
  > }
249
273
  > ```
274
+ > **Built from source (Option C)?** Replace `ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest` with `digital-ai-testing-mcp:latest`.
250
275
 
251
276
  Restart Claude Desktop after editing — the tools appear automatically.
252
277
 
@@ -254,30 +279,28 @@ Restart Claude Desktop after editing — the tools appear automatically.
254
279
 
255
280
  1. Open the Claude Code extension panel
256
281
  2. Go to **Settings → MCP Servers**
257
- 3. Add a new server with the Docker command above, or — if using the npm package (Option C) — command `digital-ai-testing-mcp` with no args, and `DIGITAL_AI_BASE_URL`/`DIGITAL_AI_ACCESS_KEY` set in the server's environment variables
282
+ 3. Add a new server with command `digital-ai-testing-mcp`, no args, and `DIGITAL_AI_BASE_URL`/`DIGITAL_AI_ACCESS_KEY`/`MCP_DEPLOYMENT_MODE=local` set in the server's environment variables — or, if running via Docker instead, the Docker command shown for Claude Desktop above
258
283
 
259
284
  ### Claude Code (JetBrains / Android Studio)
260
285
 
261
286
  Install the [Claude Code](https://plugins.jetbrains.com/plugin/22828-claude-code) plugin from the JetBrains Marketplace, then open your project and run this command from the project root:
262
287
 
263
288
  ```bash
264
- # macOS / Linux
265
- claude mcp add digital-ai-testing -- docker run --rm -i --env-file /absolute/path/to/.env ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest
266
-
267
- # Windows (use forward slashes — backslashes are stripped by Claude Code)
268
- claude mcp add digital-ai-testing -- docker run --rm -i --env-file C:/projects/digital-ai-testing-mcp/.env ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest
289
+ claude mcp add digital-ai-testing --env DIGITAL_AI_BASE_URL=https://your-tenant.experitest.com --env DIGITAL_AI_ACCESS_KEY=your-access-key --env MCP_DEPLOYMENT_MODE=local -- digital-ai-testing-mcp
269
290
  ```
270
291
 
271
- > **Windows users:** Always use forward slashes (`C:/path/to/.env`), never backslashes — regardless of whether you register via the CLI command above or through the Claude Code panel (**Settings → MCP Servers**). Backslashes are silently stripped when Claude Code writes the configuration to `~/.claude.json`, resulting in a broken path and a cryptic `-32000` reconnection error.
272
-
273
- This stores the server configuration in `~/.claude.json` scoped to the current project. Alternatively, use the Claude Code panel: **Settings → MCP Servers** and add the same Docker command used for Claude Desktop (using forward slashes for the path on Windows).
292
+ This stores the server configuration in `~/.claude.json` scoped to the current project. Alternatively, use the Claude Code panel: **Settings → MCP Servers** and add the same command used for Claude Desktop above.
274
293
 
275
- > **Built from source?** Replace the GHCR image name with `digital-ai-testing-mcp:latest`.
276
-
277
- > **No Docker? Using the npm package (Option C):**
294
+ > **Using Docker instead (Option B/C)?**
278
295
  > ```bash
279
- > claude mcp add digital-ai-testing --env DIGITAL_AI_BASE_URL=https://your-tenant.experitest.com --env DIGITAL_AI_ACCESS_KEY=your-access-key -- digital-ai-testing-mcp
296
+ > # macOS / Linux
297
+ > claude mcp add digital-ai-testing -- docker run --rm -i --env-file /absolute/path/to/.env ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest
298
+ >
299
+ > # Windows (use forward slashes — backslashes are stripped by Claude Code)
300
+ > claude mcp add digital-ai-testing -- docker run --rm -i --env-file C:/projects/digital-ai-testing-mcp/.env ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest
280
301
  > ```
302
+ > **Windows users on Docker:** Always use forward slashes (`C:/path/to/.env`), never backslashes — regardless of whether you register via the CLI command above or through the Claude Code panel (**Settings → MCP Servers**). Backslashes are silently stripped when Claude Code writes the configuration to `~/.claude.json`, resulting in a broken path and a cryptic `-32000` reconnection error.
303
+ > **Built from source (Option C)?** Replace the GHCR image name with `digital-ai-testing-mcp:latest`.
281
304
 
282
305
  Restart the Claude Code panel after adding the server — the tools appear automatically.
283
306
 
@@ -292,12 +315,13 @@ GitHub Copilot supports MCP tools in **Agent mode** only. Register the server in
292
315
  "mcp": {
293
316
  "servers": {
294
317
  "digital-ai-testing": {
295
- "command": "docker",
296
- "args": [
297
- "run", "--rm", "-i",
298
- "--env-file", "/ABSOLUTE/PATH/TO/.env",
299
- "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"
300
- ]
318
+ "command": "digital-ai-testing-mcp",
319
+ "args": [],
320
+ "env": {
321
+ "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
322
+ "DIGITAL_AI_ACCESS_KEY": "your-access-key",
323
+ "MCP_DEPLOYMENT_MODE": "local"
324
+ }
301
325
  }
302
326
  }
303
327
  }
@@ -310,12 +334,13 @@ GitHub Copilot supports MCP tools in **Agent mode** only. Register the server in
310
334
  {
311
335
  "servers": {
312
336
  "digital-ai-testing": {
313
- "command": "docker",
314
- "args": [
315
- "run", "--rm", "-i",
316
- "--env-file", "/ABSOLUTE/PATH/TO/.env",
317
- "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"
318
- ]
337
+ "command": "digital-ai-testing-mcp",
338
+ "args": [],
339
+ "env": {
340
+ "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
341
+ "DIGITAL_AI_ACCESS_KEY": "your-access-key",
342
+ "MCP_DEPLOYMENT_MODE": "local"
343
+ }
319
344
  }
320
345
  }
321
346
  }
@@ -323,15 +348,15 @@ GitHub Copilot supports MCP tools in **Agent mode** only. Register the server in
323
348
 
324
349
  Committing `.vscode/mcp.json` to source control shares the server configuration with the entire team automatically.
325
350
 
326
- > **No Docker? Using the npm package (Option C):** in either settings file above, replace the `"digital-ai-testing"` entry's `command`/`args` with:
351
+ > **Using Docker instead (Option B/C)?** in either settings file above, replace the `"digital-ai-testing"` entry's `command`/`args`/`env` with:
327
352
  > ```json
328
353
  > {
329
- > "command": "digital-ai-testing-mcp",
330
- > "args": [],
331
- > "env": {
332
- > "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
333
- > "DIGITAL_AI_ACCESS_KEY": "your-access-key"
334
- > }
354
+ > "command": "docker",
355
+ > "args": [
356
+ > "run", "--rm", "-i",
357
+ > "--env-file", "/ABSOLUTE/PATH/TO/.env",
358
+ > "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"
359
+ > ]
335
360
  > }
336
361
  > ```
337
362
 
@@ -341,18 +366,19 @@ To use the tools: open Copilot Chat (`Ctrl+Alt+I`), switch the mode dropdown to
341
366
 
342
367
  ### Cursor
343
368
 
344
- Cursor supports MCP in **Agent mode**. Add the server in **Cursor Settings → MCP** (or `Cursor Settings → Features → MCP`) using the same Docker command:
369
+ Cursor supports MCP in **Agent mode**. Add the server in **Cursor Settings → MCP** (or `Cursor Settings → Features → MCP`):
345
370
 
346
371
  ```json
347
372
  {
348
373
  "mcpServers": {
349
374
  "digital-ai-testing": {
350
- "command": "docker",
351
- "args": [
352
- "run", "--rm", "-i",
353
- "--env-file", "/ABSOLUTE/PATH/TO/.env",
354
- "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"
355
- ]
375
+ "command": "digital-ai-testing-mcp",
376
+ "args": [],
377
+ "env": {
378
+ "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
379
+ "DIGITAL_AI_ACCESS_KEY": "your-access-key",
380
+ "MCP_DEPLOYMENT_MODE": "local"
381
+ }
356
382
  }
357
383
  }
358
384
  }
@@ -360,23 +386,22 @@ Cursor supports MCP in **Agent mode**. Add the server in **Cursor Settings → M
360
386
 
361
387
  Alternatively, create a `.cursor/mcp.json` file in your project root with the same `mcpServers` object — this scopes the server to that workspace and can be committed to share it with your team.
362
388
 
363
- > **Built from source?** Replace the GHCR image name with `digital-ai-testing-mcp:latest`.
364
-
365
- > **No Docker? Using the npm package (Option C):**
389
+ > **Using Docker instead (Option B/C)?**
366
390
  > ```json
367
391
  > {
368
392
  > "mcpServers": {
369
393
  > "digital-ai-testing": {
370
- > "command": "digital-ai-testing-mcp",
371
- > "args": [],
372
- > "env": {
373
- > "DIGITAL_AI_BASE_URL": "https://your-tenant.experitest.com",
374
- > "DIGITAL_AI_ACCESS_KEY": "your-access-key"
375
- > }
394
+ > "command": "docker",
395
+ > "args": [
396
+ > "run", "--rm", "-i",
397
+ > "--env-file", "/ABSOLUTE/PATH/TO/.env",
398
+ > "ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest"
399
+ > ]
376
400
  > }
377
401
  > }
378
402
  > }
379
403
  > ```
404
+ > **Built from source (Option C)?** Replace the GHCR image name with `digital-ai-testing-mcp:latest`.
380
405
 
381
406
  > Cursor is available on macOS, Windows, and Linux. It is the recommended option for iOS developers on macOS where Xcode is the primary IDE but does not natively support MCP.
382
407
 
@@ -836,14 +861,16 @@ get_test_report(testId: 69)
836
861
  get_test_log(uuid: "…", logType: "appium")
837
862
 
838
863
  # 4. Pull the binary artifacts (session video .mp4, full ZIP) to YOUR machine
839
- # when the server runs in Docker/remote
864
+ # — only needed if the server runs in Docker/remote (not the npm install)
840
865
  get_test_attachments_download_command(uuid: "…", localPlatform: "macos")
841
866
  → a curl command you run locally; the file never transits the container
842
867
  ```
843
868
 
844
- ### Local File Transfer (Docker / remote deployments)
869
+ ### Local File Transfer (Docker / remote deployments only)
870
+
871
+ **If you installed via the recommended [npm package](#option-a--install-via-npm-recommended) (Option A) and run the server on your own machine, skip this section** — `download_*`/`upload_*` tools already read/write your local filesystem directly, no workaround needed.
845
872
 
846
- Any tool that reads or writes a local file path operates on the **MCP server's own filesystem** — which, in the published Docker image or a remote deployment, is **not** your machine. A `download_*` tool writes into the container; an `upload_*` tool reads from it. Neither is reachable from your local shell unless you volume-mount a shared directory.
873
+ The rest of this section applies only to Docker/remote deployment (Option B or C). There, any tool that reads or writes a local file path operates on the **MCP server's own filesystem** — which, in the published Docker image or a remote deployment, is **not** your machine. A `download_*` tool writes into the container; an `upload_*` tool reads from it. Neither is reachable from your local shell unless you volume-mount a shared directory.
847
874
 
848
875
  For those deployments, every file-transfer tool has a **command-generator sibling** that emits a `curl` / PowerShell command you run locally, so the bytes move directly between your machine and the platform — never through the container:
849
876
 
@@ -936,7 +963,7 @@ On Windows this usually means the `--env-file` path was stored with backslashes
936
963
  Run this sequence:
937
964
 
938
965
  ```
939
- 1. get_server_info — confirm tool count (expect 180) and active profile
966
+ 1. get_server_info — confirm tool count (expect 191) and active profile
940
967
  2. check_workflow_readiness — which dependency tools are present or missing
941
968
  3. check_connectivity — confirm the backend API is reachable
942
969
  ```
@@ -946,7 +973,7 @@ Run this sequence:
946
973
  ```json
947
974
  {
948
975
  "allWorkflowsReady": true,
949
- "registeredToolCount": 180,
976
+ "registeredToolCount": 191,
950
977
  "workflows": {
951
978
  "create_poc": { "ready": true, "missingRead": [], "missingWrite": [] },
952
979
  "setup_project": { "ready": true, "missingRead": [], "missingWrite": [] }
@@ -954,13 +981,17 @@ Run this sequence:
954
981
  }
955
982
  ```
956
983
 
957
- If `ready` is `false`, `missingRead` and `missingWrite` list exactly which tools are absent. The most common cause is a stale Docker image — rebuild:
984
+ If `ready` is `false`, `missingRead` and `missingWrite` list exactly which tools are absent. The most common cause is a stale build — update it:
958
985
 
959
986
  ```bash
960
- docker build -t digital-ai-testing-mcp:latest .
987
+ # npm install (Option A)
988
+ npm install -g digital-ai-testing-mcp@latest
989
+
990
+ # Docker (Option B/C)
991
+ docker pull ghcr.io/digitalai-opensource/digital-ai-testing-mcp:latest # or: docker build -t digital-ai-testing-mcp:latest .
961
992
  ```
962
993
 
963
- The server also logs a readiness check at startup (visible in Docker logs): `Workflow readiness: all workflows ready ✓`, or `⚠️ DEGRADED: create_poc — missing: ...` when tools are absent.
994
+ The server also logs a readiness check at startup (visible in your terminal, or `docker logs`/your AI client's MCP server logs if running in a container): `Workflow readiness: all workflows ready ✓`, or `⚠️ DEGRADED: create_poc — missing: ...` when tools are absent.
964
995
 
965
996
  ---
966
997
 
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ import { registerUsageReportTools } from './tools/usage-report-tools.js';
32
32
  import { registerMetaTools, TOOL_COUNT } from './tools/meta-tools.js';
33
33
  import { computeWorkflowReadiness } from './utils/tool-registry.js';
34
34
  import { getServerVersion } from './utils/version.js';
35
+ import { getDeploymentMode } from './utils/deployment-mode.js';
35
36
  dotenv.config({ quiet: true });
36
37
  const REQUIRED_ENV = ['DIGITAL_AI_BASE_URL', 'DIGITAL_AI_ACCESS_KEY'];
37
38
  const missing = REQUIRED_ENV.filter((k) => !process.env[k]);
@@ -44,6 +45,7 @@ const name = process.env.MCP_SERVER_NAME ?? 'digital-ai-testing-mcp';
44
45
  const version = getServerVersion();
45
46
  console.error(`[${name}] v${version} starting...`);
46
47
  console.error(`[${name}] Target: ${process.env.DIGITAL_AI_BASE_URL}`);
48
+ console.error(`[${name}] Deployment mode: ${getDeploymentMode()}`);
47
49
  // Server instructions are delivered to the client at connect time — BEFORE the agent
48
50
  // forms a plan — so they carry more weight than tool descriptions (which are read at
49
51
  // call time, after a plan is already committed; the v43 root cause). This slot is the
@@ -98,7 +100,7 @@ registerWebInspectionTools(server);
98
100
  registerPerformanceTools(server);
99
101
  registerUsageReportTools(server);
100
102
  registerMetaTools(server);
101
- console.error(`[${name}] All tool modules registered (${TOOL_COUNT} tools + 2 resources + 6 prompts).`);
103
+ console.error(`[${name}] All tool modules registered (${TOOL_COUNT} tools + 2 resources + 7 prompts).`);
102
104
  // Startup parity check: verify all workflow dependency tools are actually registered.
103
105
  // A missing tool here means a module failed to load — the image needs to be rebuilt.
104
106
  const workflowReadiness = computeWorkflowReadiness(server);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE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;QAChE,IAAI,CAAC,MAAM,CAAC,eAAe;YAAE,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,yBAAyB,CAAC,CAAC;QAC7E,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,mBAAmB,EAAE,eAAe,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,0GAA0G,CAAC,CAAC;AACpI,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,6CAA6C,CAAC,CAAC;AACvE,CAAC;AACD,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,UAAU,CAAC,CAAC;AAClC,gHAAgH;AAEhH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IACzB,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,kBAAkB,CAAC,CAAC;IAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,kBAAkB,CAAC,CAAC;IAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-tools.d.ts","sourceRoot":"","sources":["../../src/tools/application-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA4CzE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAw2BhE"}
1
+ {"version":3,"file":"application-tools.d.ts","sourceRoot":"","sources":["../../src/tools/application-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA6CzE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA+2BhE"}
@@ -6,7 +6,8 @@ import { listActiveSessions } from '../api/webdriver.js';
6
6
  import { resolveDevice } from '../utils/device-resolver.js';
7
7
  import { checkDestructiveGuard } from '../utils/destructive-guard.js';
8
8
  import { validateOutputPath, validateInputPath } from '../utils/path-guard.js';
9
- import { SERVER_FS_DOWNLOAD_NOTICE, SERVER_FS_OUTPUT_PARAM } from '../utils/locality.js';
9
+ import { serverFsDownloadNotice, serverFsOutputParam, commandGeneratorNotice, localPlatformParamNotice } from '../utils/locality.js';
10
+ import { getDeploymentMode } from '../utils/deployment-mode.js';
10
11
  import { buildDownloadCommand } from '../utils/download-command.js';
11
12
  import { applyMaxResults, appendTruncationNotice } from '../utils/pagination.js';
12
13
  import { formatApplicationList } from '../utils/response-formatter.js';
@@ -161,8 +162,13 @@ export function registerApplicationTools(server) {
161
162
  return { content: [{ type: 'text', text: `Error: ${e.message}` }], isError: true };
162
163
  }
163
164
  });
164
- server.tool('upload_application_file', 'Uploads an app binary (APK, IPA, AAB) from a local file path visible to the MCP server process. IMPORTANT: the MCP server runs in Docker — host machine paths (e.g. C:\\AppSec\\app.apk) are NOT accessible unless the directory is volume-mounted into the container. Mount the directory when starting the container (e.g. -v /host/apk-dir:/uploads) and pass the in-container path (e.g. /uploads/app.apk). If mounting is not possible, use upload_application_from_url instead with a direct artifact URL.', {
165
- filePath: z.string().describe('Absolute path inside the MCP container (not the host path). Volume-mount the directory first. Example: /uploads/MyApp.apk'),
165
+ server.tool('upload_application_file', 'Uploads an app binary (APK, IPA, AAB) from a local file path visible to the MCP server process.' +
166
+ (getDeploymentMode() === 'local'
167
+ ? ' This server runs locally via the npm package, so a normal path on your own machine (e.g. "C:\\Downloads\\app.apk" or "/Users/you/Downloads/app.apk") works directly.'
168
+ : ' IMPORTANT: the MCP server runs in Docker — host machine paths (e.g. C:\\AppSec\\app.apk) are NOT accessible unless the directory is volume-mounted into the container. Mount the directory when starting the container (e.g. -v /host/apk-dir:/uploads) and pass the in-container path (e.g. /uploads/app.apk). If mounting is not possible, use upload_application_from_url instead with a direct artifact URL.'), {
169
+ filePath: z.string().describe(getDeploymentMode() === 'local'
170
+ ? 'Absolute path to the binary on your own machine. Example: "C:\\Downloads\\MyApp.apk" or "/Users/you/Downloads/MyApp.apk".'
171
+ : 'Absolute path inside the MCP container (not the host path). Volume-mount the directory first. Example: /uploads/MyApp.apk'),
166
172
  uniqueName: z.string().optional().describe('A short unique alias for this app (optional).'),
167
173
  camera: z.boolean().optional().describe('Enable camera support instrumentation.'),
168
174
  touchId: z.boolean().optional().describe('Enable Touch ID support (iOS).'),
@@ -187,9 +193,11 @@ export function registerApplicationTools(server) {
187
193
  }, async (params) => {
188
194
  const { filePath, installAttributesMDM, ...rest } = params;
189
195
  // Detect host-machine paths that are unreachable inside the Docker container.
196
+ // Running locally via the npm package, the server's filesystem IS the host
197
+ // machine's — these paths are exactly what's expected, so skip the check.
190
198
  const isWindowsHostPath = /^[A-Za-z]:[\\\/]/.test(filePath);
191
199
  const isHostHomePath = /^\/(Users|home|root)\//.test(filePath);
192
- if (isWindowsHostPath || isHostHomePath) {
200
+ if (getDeploymentMode() !== 'local' && (isWindowsHostPath || isHostHomePath)) {
193
201
  return {
194
202
  content: [{ type: 'text', text: JSON.stringify({
195
203
  error: 'HOST_PATH_UNREACHABLE',
@@ -274,15 +282,13 @@ export function registerApplicationTools(server) {
274
282
  }
275
283
  });
276
284
  server.tool('get_application_upload_command', 'Generates a ready-to-run curl or PowerShell command for uploading an app binary directly from the user\'s local machine to the Digital.ai platform. ' +
277
- 'The MCP server itself does not handle the binary — the user runs the generated command locally so the file never passes through the Docker container. ' +
278
- 'Use this instead of upload_application_file when the binary is on a local machine and volume-mounting is not practical.\n\n' +
285
+ 'The MCP server itself does not handle the binary — the user runs the generated command locally so the file never passes through the container. ' +
286
+ commandGeneratorNotice('upload_application_file', 'upload') + '\n\n' +
279
287
  'WARNING: The generated command embeds the active access key in plaintext. ' +
280
288
  'Instruct the user to run it immediately and not save or share the output.', {
281
289
  localFilePath: z.string().describe('Full path to the binary on the user\'s local machine, used verbatim in the generated command. ' +
282
290
  'Examples: "C:\\\\Downloads\\\\MyApp.apk" (Windows), "/Users/joe/Downloads/MyApp.ipa" (macOS).'),
283
- localPlatform: z.enum(['windows', 'macos', 'linux']).describe('Platform of the machine where the command will be run. ' +
284
- '"windows" produces both a Git Bash curl command and a PowerShell alternative. ' +
285
- '"macos"/"linux" produce a bash curl command. Cannot be inferred — the MCP runs in Docker.'),
291
+ localPlatform: z.enum(['windows', 'macos', 'linux']).describe('Platform of the machine where the command will be run. ' + localPlatformParamNotice()),
286
292
  uniqueName: z.string().optional().describe('Short unique alias to assign to the uploaded app.'),
287
293
  project: z.string().optional().describe('Project name to assign the app to. Cloud Admin only — project keys upload to their assigned project; this param is ignored.'),
288
294
  camera: z.boolean().optional().describe('Enable camera support instrumentation.'),
@@ -733,9 +739,9 @@ export function registerApplicationTools(server) {
733
739
  return { content: [{ type: 'text', text: `Error: ${e.message}` }], isError: true };
734
740
  }
735
741
  });
736
- server.tool('extract_app_language_files', 'Downloads the localization/language files from an app as a ZIP archive. Useful for reviewing or auditing app translations. APK and IPA only.' + SERVER_FS_DOWNLOAD_NOTICE, {
742
+ server.tool('extract_app_language_files', 'Downloads the localization/language files from an app as a ZIP archive. Useful for reviewing or auditing app translations. APK and IPA only.' + serverFsDownloadNotice(), {
737
743
  applicationId: z.number().describe('The numeric application ID (APK or IPA only).'),
738
- localPath: z.string().describe(SERVER_FS_OUTPUT_PARAM),
744
+ localPath: z.string().describe(serverFsOutputParam()),
739
745
  }, async ({ applicationId, localPath }) => {
740
746
  const pathErr = validateOutputPath(localPath);
741
747
  if (pathErr)
@@ -756,11 +762,11 @@ export function registerApplicationTools(server) {
756
762
  }
757
763
  });
758
764
  server.tool('get_app_language_files_download_command', 'Generates a ready-to-run curl or PowerShell command for downloading an app\'s localization/language-file ZIP directly to the user\'s local machine. ' +
759
- 'Use this instead of extract_app_language_files when the MCP server runs in Docker/remote and the written file would be inaccessible to the user. APK and IPA only.\n\n' +
765
+ commandGeneratorNotice('extract_app_language_files', 'download') + ' APK and IPA only.\n\n' +
760
766
  'WARNING: The generated command embeds the active access key in plaintext. Instruct the user to run it immediately and not save or share the output.', {
761
767
  applicationId: z.number().describe('The numeric application ID (APK or IPA only).'),
762
768
  localPath: z.string().optional().default('language-files.zip').describe('Path on the user\'s local machine to save the ZIP. Default: "language-files.zip".'),
763
- localPlatform: z.enum(['windows', 'macos', 'linux']).describe('Platform of the machine that will run the command. "windows" emits both Git Bash curl and PowerShell. Cannot be inferred — the MCP runs in Docker.'),
769
+ localPlatform: z.enum(['windows', 'macos', 'linux']).describe('Platform of the machine that will run the command. ' + localPlatformParamNotice()),
764
770
  outputFormat: outputFormatParam,
765
771
  }, async ({ applicationId, localPath, localPlatform, outputFormat }) => {
766
772
  const result = buildDownloadCommand({ path: `/api/v1/applications/${applicationId}/language-file`, localPath: localPath ?? 'language-files.zip', localPlatform });