Skip to content

Commit eb645f0

Browse files
authored
Merge branch 'main' into renovate/configure
2 parents 8e16cd7 + ff6bbce commit eb645f0

152 files changed

Lines changed: 3994 additions & 5409 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,json,jsonc}]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
max_line_length = 120
12+
13+
[*.md]
14+
trim_trailing_whitespace = false
15+

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
fetch-depth: 0
2929

3030
- name: Setup Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v6
31+
uses: actions/setup-node@v7
3232
with:
3333
node-version: ${{ matrix.node-version }}
3434

@@ -45,12 +45,15 @@ jobs:
4545
- name: Run ESLint
4646
run: npm run lint
4747

48-
- name: Run Prettier check
48+
- name: Run Format check
4949
run: npm run format:check
5050

5151
- run: npm run build
5252
name: Build
5353

54+
- name: Audit MCP tool discovery footprint
55+
run: npm run audit:tools
56+
5457
- name: Run Unit Tests
5558
run: npm run test
5659

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v7
1919
with:
2020
fetch-depth: 0
21-
- uses: actions/setup-node@v6
21+
- uses: actions/setup-node@v7
2222
with:
2323
node-version: lts/*
2424
check-latest: true

.releaserc

Lines changed: 0 additions & 37 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,73 @@
1+
## [1.90.1](https://github.com/appium/appium-mcp/compare/v1.90.0...v1.90.1) (2026-07-29)
2+
3+
### Miscellaneous Chores
4+
5+
* tweak lint more ([90edd2d](https://github.com/appium/appium-mcp/commit/90edd2d065d55362b0dc8ce1ebada381d6003cae))
6+
7+
## [1.90.0](https://github.com/appium/appium-mcp/compare/v1.89.0...v1.90.0) (2026-07-28)
8+
9+
### Features
10+
11+
* avoid duplicate page source UI payloads ([#477](https://github.com/appium/appium-mcp/issues/477)) ([b8370df](https://github.com/appium/appium-mcp/commit/b8370df42e6f6f46e043ba31b0935bede44465a3))
12+
13+
## [1.89.0](https://github.com/appium/appium-mcp/compare/v1.88.5...v1.89.0) (2026-07-26)
14+
15+
### Features
16+
17+
* add payload-free tool result size telemetry ([#476](https://github.com/appium/appium-mcp/issues/476)) ([ca0262d](https://github.com/appium/appium-mcp/commit/ca0262d38a18747f08c1f08c94099c7b82150272))
18+
19+
## [1.88.5](https://github.com/appium/appium-mcp/compare/v1.88.4...v1.88.5) (2026-07-26)
20+
21+
### Performance Improvements
22+
23+
* cap tool discovery at 45k characters ([#475](https://github.com/appium/appium-mcp/issues/475)) ([2624412](https://github.com/appium/appium-mcp/commit/2624412367e5a2e4cd5ababc15a9fb4c2ffc25c9))
24+
25+
## [1.88.4](https://github.com/appium/appium-mcp/compare/v1.88.3...v1.88.4) (2026-07-25)
26+
27+
### Miscellaneous Chores
28+
29+
* migrate lint/format to appium's ones ([#474](https://github.com/appium/appium-mcp/issues/474)) ([2a25edc](https://github.com/appium/appium-mcp/commit/2a25edcd3d8f7b466ef3bad578850f89fe3f3b50))
30+
31+
## [1.88.3](https://github.com/appium/appium-mcp/compare/v1.88.2...v1.88.3) (2026-07-25)
32+
33+
## [1.88.2](https://github.com/appium/appium-mcp/compare/v1.88.1...v1.88.2) (2026-07-25)
34+
35+
## [1.88.1](https://github.com/appium/appium-mcp/compare/v1.88.0...v1.88.1) (2026-07-25)
36+
37+
## [1.88.0](https://github.com/appium/appium-mcp/compare/v1.87.10...v1.88.0) (2026-07-25)
38+
39+
## [1.87.10](https://github.com/appium/appium-mcp/compare/v1.87.9...v1.87.10) (2026-07-25)
40+
41+
## [1.87.9](https://github.com/appium/appium-mcp/compare/v1.87.8...v1.87.9) (2026-07-23)
42+
43+
### Bug Fixes
44+
45+
* make applesign optional ([#461](https://github.com/appium/appium-mcp/issues/461)) ([02bbb0f](https://github.com/appium/appium-mcp/commit/02bbb0feaf7a3cb7d5257597b521e3c6595c0bf5))
46+
47+
## [1.87.8](https://github.com/appium/appium-mcp/compare/v1.87.7...v1.87.8) (2026-07-22)
48+
49+
### Bug Fixes
50+
51+
* **screenshot:** use resolveDriver for session rehydration parity ([#456](https://github.com/appium/appium-mcp/issues/456)) ([5bda643](https://github.com/appium/appium-mcp/commit/5bda643996bdba7116a2888e86991431cfa7ac60))
52+
53+
## [1.87.7](https://github.com/appium/appium-mcp/compare/v1.87.6...v1.87.7) (2026-07-21)
54+
55+
### Bug Fixes
56+
57+
* **command:** re-throw swallowed remote errors for element click, rect, and screenshot ([#457](https://github.com/appium/appium-mcp/issues/457)) ([940e07e](https://github.com/appium/appium-mcp/commit/940e07e6032b0673e9bb3aa44e25976ab3e69dcf))
58+
59+
## [1.87.6](https://github.com/appium/appium-mcp/compare/v1.87.5...v1.87.6) (2026-07-16)
60+
61+
### Bug Fixes
62+
63+
* **context:** pass sessionId to setCurrentContext ([#437](https://github.com/appium/appium-mcp/issues/437)) ([f7d4f3e](https://github.com/appium/appium-mcp/commit/f7d4f3ed909e2c38b42350c113d1de5cf2b260f3))
64+
65+
## [1.87.5](https://github.com/appium/appium-mcp/compare/v1.87.4...v1.87.5) (2026-07-15)
66+
67+
### Bug Fixes
68+
69+
* limit the node version to not use 26 ([#455](https://github.com/appium/appium-mcp/issues/455)) ([52b2d1a](https://github.com/appium/appium-mcp/commit/52b2d1a63fb8eccf6aed4991aba87ea28c156bec))
70+
171
## [1.87.4](https://github.com/appium/appium-mcp/compare/v1.87.3...v1.87.4) (2026-07-11)
272

373
### Bug Fixes

README.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ MCP Appium is an intelligent MCP (Model Context Protocol) server designed to emp
1212
- [Prerequisites](#-prerequisites)
1313
- [Installation](#️-installation)
1414
- [Configuration](#️-configuration)
15+
- [Remote server security and trust model](#remote-server-security-and-trust-model)
1516
- [Available Tools](#-available-tools)
1617
- [Plugin API](#-plugin-api)
1718
- [Client Support](#-client-support)
@@ -149,9 +150,10 @@ This will automatically configure the MCP server for use with Claude Code. Make
149150
| `CAPABILITIES_CONFIG` | Optional | Absolute path to a `capabilities.json` file with per-platform capability presets |
150151
| `SCREENSHOTS_DIR` | Optional | Directory where screenshots and screen recordings are saved. Defaults to the current working directory |
151152
| `NO_UI` | Optional | Set to `true` or `1` to disable HTML UI components — faster responses, fewer tokens. See [NO_UI Mode](#no_ui-mode) |
153+
| `APPIUM_MCP_APPS_ENABLED` | Optional | MCP Apps static UI mode. Enabled by default. Set to `false` or `0` to force the embedded UI compatibility fallback. See [MCP Apps Mode](#mcp-apps-mode) |
152154
| `APPIUM_MCP_ON_CLIENT_DISCONNECT` | Optional | Session cleanup when the MCP client disconnects: `delete_all` (default) deletes **MCP-owned** Appium sessions (`safeDeleteAllSessions`); `skip` keeps those sessions across disconnects (e.g. HTTP/stream clients that reconnect). Attached/remote sessions are not removed by this path. See [MCP disconnect behavior](#mcp-disconnect-behavior). |
153155
| `APPIUM_MCP_WDA_APP_PATH` | Optional | Absolute path to a pre-extracted `WebDriverAgentRunner-Runner.app` bundle. When set, `prepare_ios_simulator` skips all GitHub downloads and uses this bundle directly — useful in environments where external downloads are blocked |
154-
| `REMOTE_SERVER_URL_ALLOW_REGEX` | Optional | Regex pattern that remote Appium server URLs must match. Defaults to `^https?://` |
156+
| REMOTE_SERVER_URL_ALLOW_REGEX | Optional | Regular expression applied to the complete remoteServerUrl value before MCP Appium connects to a remote Appium/WebDriver server. When unset, any HTTP(S) destination is accepted. Set this in shared infrastructure or CI environments that require an explicit destination policy. See Remote server security and trust model. |
155157
| `AI_VISION_ENABLED` | Optional | Set to `true` to register the `appium_ai` tool (vision-based element finding). When unset or `false`, the AI tool is **not registered** and the LLM has no way to invoke vision-based finding. Requires `AI_VISION_API_BASE_URL` and `AI_VISION_API_KEY` to also be set, otherwise the server fails to start. |
156158
| `AI_VISION_API_BASE_URL` | Required when `AI_VISION_ENABLED=true` | Base URL of the OpenAI-compatible vision model API |
157159
| `AI_VISION_API_KEY` | Required when `AI_VISION_ENABLED=true` | API key for the vision model provider |
@@ -189,6 +191,8 @@ OTEL_TRACES_SAMPLER=parentbased_always_on
189191

190192
When enabled, appium-mcp creates spans for MCP tool calls, prompt loads, resource reads, and resource template reads. Error status is recorded for thrown operation errors and MCP tool results marked with `isError`. Span attributes intentionally avoid raw screenshots, XML page source, prompts, credentials, and other high-cardinality or sensitive payloads.
191193

194+
Tool spans include payload-free result-size attributes: `mcp.tool.result.content_count`, `content_types`, `text_chars`, `resource_count`, `resource_text_chars`, `image_count`, `audio_count`, `base64_chars`, and `base64_bytes_estimate` (all prefixed with `mcp.tool.result.`). `content_types` contains only known MCP types or `other`; payload values, resource URIs, MIME types, and unknown type strings are never recorded. Sizes are counted directly from known result fields without serializing or copying the complete result.
195+
192196
For local trace inspection, use the Jaeger setup in `tools/telemetry`:
193197

194198
```bash
@@ -326,6 +330,30 @@ More models benchmarked can be found [here](src/tests/benchmark_model/TEST_REPOR
326330

327331
### Performance Optimization
328332

333+
#### MCP Apps Mode
334+
335+
`appium_get_page_source` uses a static MCP App inspector by default when the client advertises MCP Apps support.
336+
The XML remains in the normal text result for the LLM, while the inspector reads that same result instead of
337+
receiving a duplicated XML copy.
338+
339+
For clients with unreliable MCP Apps rendering, set `APPIUM_MCP_APPS_ENABLED` to `false` or `0`:
340+
341+
```json
342+
{
343+
"appium-mcp": {
344+
"env": {
345+
"APPIUM_MCP_APPS_ENABLED": "false"
346+
}
347+
}
348+
}
349+
```
350+
351+
This keeps interactive UI enabled but forces the previous embedded page-source inspector. The compatibility mode
352+
duplicates the XML inside the inspector HTML and therefore uses more result tokens and bandwidth. With a synthetic
353+
95,000-character page source, the static mode reduced the result from approximately 267 KB to 95 KB (about 64%).
354+
355+
`NO_UI=true` or `NO_UI=1` takes precedence over this setting and disables both static and embedded UI.
356+
329357
#### NO_UI Mode
330358

331359
Set the `NO_UI` environment variable to `true` or `1` to disable UI components and improve performance:
@@ -419,6 +447,36 @@ HTTP and streamable MCP clients may **disconnect briefly** (reconnect, reload, p
419447

420448
**Tradeoff:** `skip` can leave **orphaned sessions** on your Appium server if nothing cleans up — use it when disconnect is not the same as “automation finished.”
421449

450+
### Remote server security and trust model
451+
452+
MCP Appium is designed to run as a local, single-user MCP server or as part of a trusted CI job. It is not intended to be exposed as a shared service to untrusted MCP clients.
453+
454+
The `remoteServerUrl` argument is intentionally configurable because MCP Appium acts as an Appium/WebDriver client and may need to connect to local, remote, private-network, or CI-hosted Appium servers.
455+
456+
Only allow trusted users and trusted workflow configuration to control `remoteServerUrl`. In particular:
457+
458+
* Do not expose the MCP tool surface directly to untrusted users.
459+
* In CI, do not construct `remoteServerUrl` from untrusted pull request content, repository data, prompts, or other externally controlled input.
460+
* Keep remote server URLs in trusted MCP or CI configuration where possible.
461+
* Use `REMOTE_SERVER_URL_ALLOW_REGEX` to restrict the permitted Appium server URLs when the execution environment requires an explicit destination policy.
462+
463+
When `REMOTE_SERVER_URL_ALLOW_REGEX` is not set, MCP Appium accepts any syntactically valid HTTP or HTTPS destination. The variable is a regular-expression check against the complete `remoteServerUrl` value.
464+
465+
For example, to permit only a specific Appium server:
466+
467+
```bash
468+
REMOTE_SERVER_URL_ALLOW_REGEX='^https://appium\.example\.com:4723(?:/wd/hub)?/?$'
469+
```
470+
471+
To permit Appium servers under a controlled internal domain:
472+
473+
```bash
474+
REMOTE_SERVER_URL_ALLOW_REGEX='^https://[a-z0-9-]+\.appium\.example\.internal(?::[0-9]+)?(?:/.*)?$'
475+
```
476+
477+
Treat this setting as an additional deployment safeguard. Network-level controls, CI isolation, and trusted MCP client configuration should remain the primary security boundaries.
478+
479+
422480
## 🔌 Plugin API
423481

424482
Use `appium-mcp/core` to compose the default Appium MCP server with custom business logic without maintaining a fork. Plugins can register MCP tools, prompts, resources, and resource templates, and can wrap tool execution with lifecycle hooks. Call hooks are tool-only: prompts, resources, and resource templates are registered with FastMCP but are not wrapped by `beforeCall` or `afterCall`.

docs/CONTRIBUTING.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,9 +559,12 @@ The tools below are useful structural references — how a tool is wired up, sch
559559
```bash
560560
npm run check # eslint + prettier
561561
npm run build # tsc
562+
npm run audit:tools # measure the built tools/list payload and enforce its size budget
562563
```
563564

564-
Both must be green before opening a PR.
565+
All three must be green before opening a PR. The tool-footprint audit runs
566+
against the built stdio server with optional AI and documentation tools
567+
disabled, matching the default tool set used for the CI budget.
565568

566569
### 2. Unit test the response contract (recommended for non-trivial tools)
567570

eslint.config.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)