appium-mcp 1.34.3 → 1.35.0

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## [1.35.0](https://github.com/appium/appium-mcp/compare/v1.34.4...v1.35.0) (2026-03-24)
2
+
3
+ ### Features
4
+
5
+ * **interactions:** add appium_mobile_hide_keyboard and appium_mobile_is_keyboard_shown ([#224](https://github.com/appium/appium-mcp/issues/224)) ([6cf9a4c](https://github.com/appium/appium-mcp/commit/6cf9a4c732bcabe4436f1465bc97f1b748511e11))
6
+ * **session:** add appium_shake tool ([#187](https://github.com/appium/appium-mcp/issues/187)) ([2368faf](https://github.com/appium/appium-mcp/commit/2368faffa4acbb580f240836752b433baaef9113))
7
+
8
+ ## [1.34.4](https://github.com/appium/appium-mcp/compare/v1.34.3...v1.34.4) (2026-03-23)
9
+
10
+ ### Miscellaneous Chores
11
+
12
+ * refer to src/resources/dubmodules for the docs search ([aa35115](https://github.com/appium/appium-mcp/commit/aa35115b71e6db35632c580fcea7dc9ad04dbfb4))
13
+
1
14
  ## [1.34.3](https://github.com/appium/appium-mcp/compare/v1.34.2...v1.34.3) (2026-03-23)
2
15
 
3
16
  ### Miscellaneous Chores
package/README.md CHANGED
@@ -296,6 +296,7 @@ MCP Appium provides a comprehensive set of tools organized into the following ca
296
296
  | ---------------- | ----------------------------------------------------------------------------------------------------------- |
297
297
  | `create_session` | Create a new mobile automation session for Android, iOS, or `general` capabilities (see 'general' mode above). If a remote Appium server is referenced, `create_session` forwards the final capabilities to that server via the WebDriver `newSession` API - include device selection (e.g., `appium:udid`) in `capabilities` when targeting a remote server. |
298
298
  | `delete_session` | Delete the current mobile session and clean up resources |
299
+ | `appium_mobile_shake` | Shake gesture (`mobile: shake`) on **iOS Simulator only** (XCUITest). Not supported on Android or physical iOS devices. |
299
300
 
300
301
  The remote server URL in `create_session` can be set via the `remoteServerUrl` parameter.
301
302
  If `REMOTE_SERVER_URL_ALLOW_REGEX` is set, the URL must match the provided regex pattern for security reasons.
@@ -321,6 +322,8 @@ The default regex pattern allows any URL that starts with `http://` or `https://
321
322
  | `appium_drag_and_drop` | Perform a drag and drop gesture from a source location to a target location (supports element-to-element, element-to-coordinates, coordinates-to-element, and coordinates-to-coordinates) |
322
323
  | `appium_pinch` | Perform a pinch gesture to zoom in (scale > 1) or zoom out (scale < 1) on an element or the whole screen. Works on both iOS and Android. |
323
324
  | `appium_set_value` | Enter text into an input field |
325
+ | `appium_mobile_hide_keyboard` | Dismiss the on-screen keyboard (`mobile: hideKeyboard`) |
326
+ | `appium_mobile_is_keyboard_shown` | Whether the on-screen keyboard is visible (`mobile: isKeyboardShown`) |
324
327
  | `appium_get_text` | Get text content from an element |
325
328
  | `appium_get_clipboard` | Get the current clipboard content as plain text from the device |
326
329
  | `appium_set_clipboard` | Set the device clipboard to the provided plain text |
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/documentation/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH;;GAEG;AACH,UAAU,aAAa;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CACjD,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,aAAa,CAAC,CA+CzB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/documentation/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH;;GAEG;AACH,UAAU,aAAa;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CACjD,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,aAAa,CAAC,CA+CzB"}
@@ -14,7 +14,10 @@ import log from '../../logger.js';
14
14
  export async function initializeAppiumDocumentation(resourcesPath) {
15
15
  try {
16
16
  // Default to submodules directory if not specified
17
- const docsPath = resourcesPath || path.resolve(__dirname, '../../resources/submodules');
17
+ const docsPath =
18
+ // Refer to the /src/resources/submodules directory where the markdown files are located.
19
+ resourcesPath ||
20
+ path.resolve(__dirname, path.join('..', '..', '..', 'src', 'resources', 'submodules'));
18
21
  log.info(`Initializing Appium documentation from: ${docsPath}`);
19
22
  await indexAllMarkdownFiles(docsPath);
20
23
  log.info('Appium documentation indexing completed');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/documentation/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,GAAG,MAAM,iBAAiB,CAAC;AAWlC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,aAAsB;IAEtB,IAAI,CAAC;QACH,mDAAmD;QACnD,MAAM,QAAQ,GACZ,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;QACzE,GAAG,CAAC,IAAI,CAAC,2CAA2C,QAAQ,EAAE,CAAC,CAAC;QAChE,MAAM,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACtC,GAAG,CAAC,IA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"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAsDlC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CA4I3D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAwDlC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CA8I3D"}
@@ -8,6 +8,7 @@ import generateLocators from './test-generation/locators.js';
8
8
  import selectPlatform from './session/select-platform.js';
9
9
  import selectDevice from './session/select-device.js';
10
10
  import openNotifications from './session/open-notifications.js';
11
+ import shakeDevice from './session/shake.js';
11
12
  import { lockDevice, unlockDevice } from './session/lock.js';
12
13
  import { setGeolocation, getGeolocation, resetGeolocation, } from './session/geolocation.js';
13
14
  import deviceInfo from './session/device-info.js';
@@ -29,6 +30,7 @@ import dragAndDrop from './interactions/drag-and-drop.js';
29
30
  import pinch from './interactions/pinch.js';
30
31
  import pressKey from './interactions/press-key.js';
31
32
  import setValue from './interactions/set-value.js';
33
+ import keyboard from './interactions/keyboard.js';
32
34
  import getText from './interactions/get-text.js';
33
35
  import getActiveElement from './interactions/active-element.js';
34
36
  import getPageSource from './interactions/get-page-source.js';
@@ -116,6 +118,7 @@ export default function registerTools(server) {
116
118
  selectSession(server);
117
119
  deleteSession(server);
118
120
  openNotifications(server);
121
+ shakeDevice(server);
119
122
  lockDevice(server);
120
123
  unlockDevice(server);
121
124
  setGeolocation(server);
@@ -147,6 +150,7 @@ export default function registerTools(server) {
147
150
  pinch(server);
148
151
  pressKey(server);
149
152
  setValue(server);
153
+ keyboard(server);
150
154
  getText(server);
151
155
  clipboard(server);
152
156
  getActiveElement(server);
@@ -1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O,CAAC,MAAM,CAAC,CAAC;IAChB,SAAS,CAAC,MAAM,CAAC,CAAC;IAClB,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,aAAa,CAAC,MAAM,CAAC,CAAC;IACtB,cAAc,CAAC,MAAM,CAAC,CAAC;IACvB,cAAc,CAAC,MAAM,CAAC,CAAC;IACvB,WAAW,CAAC,MAAM,CAAC,CAAC;IACpB,UAAU,CAAC,MAAM,CAAC,CAAC;IACnB,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAE1B,iBAAiB;IACjB,WAAW,CAAC,MAAM,CAAC,CAAC;IACpB,aAAa,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,MAAM,CAAC,CAAC;IACnB,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjB,cAAc,CAAC,MAAM,CAAC,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEjB,qBAAqB;IACrB,WAAW,CAAC,MAAM,CAAC,CAAC;IACpB,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtB,kBAAkB;IAClB,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,YAAY,CAAC,MAAM,CAAC,CAAC;IAErB,gBAAgB;IAChB,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,GAAG,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FastMCP } from 'fastmcp';
2
+ export default function keyboard(server: FastMCP): void;
3
+ //# sourceMappingURL=keyboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../src/tools/interactions/keyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,OAAO,EAAE,MAAM,SAAS,CAAC;AAKtD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAwGtD"}
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod';
2
+ import { getDriver } from '../../session-store.js';
3
+ import { execute } from '../../command.js';
4
+ export default function keyboard(server) {
5
+ const hideKeyboardSchema = z.object({
6
+ keys: z
7
+ .array(z.string())
8
+ .optional()
9
+ .describe('Optional key names used to dismiss the keyboard (e.g. "done" on tablets). ' +
10
+ 'Maps to the `keys` argument of mobile: hideKeyboard. Omit for default behavior.'),
11
+ });
12
+ server.addTool({
13
+ name: 'appium_mobile_hide_keyboard',
14
+ description: 'Dismiss the on-screen software keyboard via Appium `mobile: hideKeyboard`. ' +
15
+ 'Supports Android (UiAutomator2) and iOS (XCUITest). ' +
16
+ 'May fail when no dismiss control exists; use gestures or back as a fallback.',
17
+ parameters: hideKeyboardSchema,
18
+ annotations: {
19
+ readOnlyHint: false,
20
+ openWorldHint: false,
21
+ },
22
+ execute: async (args, _context) => {
23
+ const driver = getDriver();
24
+ if (!driver) {
25
+ throw new Error('No driver found');
26
+ }
27
+ try {
28
+ const params = args.keys && args.keys.length > 0 ? { keys: args.keys } : {};
29
+ await execute(driver, 'mobile: hideKeyboard', params);
30
+ return {
31
+ content: [
32
+ {
33
+ type: 'text',
34
+ text: 'Keyboard dismissed successfully.',
35
+ },
36
+ ],
37
+ };
38
+ }
39
+ catch (err) {
40
+ const message = err instanceof Error ? err.message : String(err);
41
+ return {
42
+ content: [
43
+ {
44
+ type: 'text',
45
+ text: `Failed to hide keyboard. Error: ${message}`,
46
+ },
47
+ ],
48
+ };
49
+ }
50
+ },
51
+ });
52
+ server.addTool({
53
+ name: 'appium_mobile_is_keyboard_shown',
54
+ description: 'Return whether the system on-screen keyboard is visible using Appium `mobile: isKeyboardShown`. ' +
55
+ 'Supports Android (UiAutomator2) and iOS (XCUITest). Response is JSON: `{ "keyboardShown": true|false }`.',
56
+ parameters: z.object({}),
57
+ annotations: {
58
+ readOnlyHint: true,
59
+ openWorldHint: false,
60
+ },
61
+ execute: async (_args, _context) => {
62
+ const driver = getDriver();
63
+ if (!driver) {
64
+ throw new Error('No driver found');
65
+ }
66
+ try {
67
+ const raw = await execute(driver, 'mobile: isKeyboardShown', {});
68
+ if (typeof raw !== 'boolean') {
69
+ throw new Error(`Unexpected isKeyboardShown result type: ${typeof raw}`);
70
+ }
71
+ return {
72
+ content: [
73
+ {
74
+ type: 'text',
75
+ text: JSON.stringify({ keyboardShown: raw }, null, 2),
76
+ },
77
+ ],
78
+ };
79
+ }
80
+ catch (err) {
81
+ const message = err instanceof Error ? err.message : String(err);
82
+ return {
83
+ content: [
84
+ {
85
+ type: 'text',
86
+ text: `Failed to query keyboard visibility. Error: ${message}`,
87
+ },
88
+ ],
89
+ };
90
+ }
91
+ },
92
+ });
93
+ }
94
+ //# sourceMappingURL=keyboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../../src/tools/interactions/keyboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,MAAe;IAC9C,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;QAClC,IAAI,EAAE,CAAC;aACJ,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,4EAA4E;YAC1E,iFAAiF,CACpF;KACJ,CAAC,CAAC;IAEH,MAAM,CAAC,OAAO,CAAC;QACb,IAAI,EAAE,6BAA6B;QACnC,WAAW,EACT,6EAA6E;YAC7E,sDAAsD;YACtD,8EAA8E;QAChF,UAAU,EAAE,kBAAkB;QAC9B,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,KAAK;SACrB;QACD,OAAO,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,CAAC;YAC3B,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACrC,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,MAAM,EAAE,yBAAyB,EAAE,EAAE,CAAC,CAAC;gBACjE,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE,CAAC;oBAC7B,MAAM,IAAI,KAAK,CACb,2CAA2C,OAAO,GAAG,EAAE,CACxD,CAAC;gBACJ,CAAC;gBACD,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;yBACtD;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,GAAY,EAAE,CAAC;gBACtB,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACjE,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,+CAA+C,OAAO,EAAE;yBAC/D;qBACF;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FastMCP } from 'fastmcp';
2
+ export default function shakeDevice(server: FastMCP): void;
3
+ //# sourceMappingURL=shake.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shake.d.ts","sourceRoot":"","sources":["../../../src/tools/session/shake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,OAAO,EAAE,MAAM,SAAS,CAAC;AAItD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAmDzD"}
@@ -0,0 +1,49 @@
1
+ import { z } from 'zod';
2
+ import { getDriver, isXCUITestDriverSession } from '../../session-store.js';
3
+ export default function shakeDevice(server) {
4
+ const shakeSchema = z.object({});
5
+ server.addTool({
6
+ name: 'appium_mobile_shake',
7
+ description: 'Perform a shake gesture via Appium `mobile: shake` using the XCUITest driver. ' +
8
+ 'Other driver types are not supported.',
9
+ parameters: shakeSchema,
10
+ annotations: {
11
+ readOnlyHint: false,
12
+ openWorldHint: false,
13
+ },
14
+ execute: async (_args, _context) => {
15
+ const driver = getDriver();
16
+ if (!driver) {
17
+ throw new Error('No driver found');
18
+ }
19
+ if (!isXCUITestDriverSession(driver)) {
20
+ return {
21
+ content: [
22
+ {
23
+ type: 'text',
24
+ text: 'Shake is supported only with XCUITest driver sessions. Other driver types are not supported.',
25
+ },
26
+ ],
27
+ };
28
+ }
29
+ try {
30
+ await driver.mobileShake();
31
+ return {
32
+ content: [{ type: 'text', text: 'Shake action performed.' }],
33
+ };
34
+ }
35
+ catch (err) {
36
+ const message = err instanceof Error ? err.message : String(err);
37
+ return {
38
+ content: [
39
+ {
40
+ type: 'text',
41
+ text: `Failed to perform shake. err: ${message}`,
42
+ },
43
+ ],
44
+ };
45
+ }
46
+ },
47
+ });
48
+ }
49
+ //# sourceMappingURL=shake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shake.js","sourceRoot":"","sources":["../../../src/tools/session/shake.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,MAAe;IACjD,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAEjC,MAAM,CAAC,OAAO,CAAC;QACb,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,gFAAgF;YAChF,uCAAuC;QACzC,UAAU,EAAE,WAAW;QACvB,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,KAAK;SACrB;QACD,OAAO,EAAE,KAAK,EACZ,KAAkC,EAClC,QAA6C,EACrB,EAAE;YAC1B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACrC,CAAC;YAED,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,EAAE,CAAC;gBACrC,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,8FAA8F;yBACrG;qBACF;iBACF,CAAC;YACJ,CAAC;YAED,IAAI,CAAC;gBACH,MAAO,MAAc,CAAC,WAAW,EAAE,CAAC;gBACpC,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,CAAC;iBAC7D,CAAC;YACJ,CAAC;YAAC,OAAO,GAAY,EAAE,CAAC;gBACtB,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBACjE,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,iCAAiC,OAAO,EAAE;yBACjD;qBACF;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "appium-mcp",
3
3
  "mcpName": "io.github.appium/appium-mcp",
4
- "version": "1.34.3",
4
+ "version": "1.35.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",
package/server.json CHANGED
@@ -3,12 +3,12 @@
3
3
  "name": "io.github.appium/appium-mcp",
4
4
  "title": "MCP Appium - Mobile Development and Automation Server",
5
5
  "description": "MCP server for Appium mobile automation on iOS and Android devices with test creation tools.",
6
- "version": "1.34.3",
6
+ "version": "1.35.0",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "appium-mcp",
11
- "version": "1.34.3",
11
+ "version": "1.35.0",
12
12
  "transport": {
13
13
  "type": "stdio"
14
14
  }
Binary file
@@ -9,6 +9,7 @@ This directory contains all MCP tools available in MCP Appium.
9
9
  - `create-session.ts` - Create mobile automation sessions
10
10
  - `delete-session.ts` - Clean up sessions
11
11
  - `open-notifications.ts` - Open notifications panel (Android only)
12
+ - `shake.ts` - iOS Simulator shake via `mobile: shake` (`appium_mobile_shake`; not Android, not physical iOS)
12
13
  - `lock.ts` - Lock device (`appium_mobile_lock`); optionally lock for N seconds (Android & iOS)
13
14
  - `lock.ts` - Unlock device (`appium_mobile_unlock`)
14
15
  - `select-platform.ts` - Choose Android or iOS
@@ -36,6 +37,7 @@ This directory contains all MCP tools available in MCP Appium.
36
37
  - `drag-and-drop.ts` - Drag and drop elements or coordinates
37
38
  - `press-key.ts` - Press navigation keys or physical buttons
38
39
  - `set-value.ts` - Enter text
40
+ - `keyboard.ts` - Soft keyboard: `appium_mobile_hide_keyboard` / `appium_mobile_is_keyboard_shown`
39
41
  - `get-text.ts` - Get element text
40
42
  - `get-page-source.ts` - Get page source (XML) from current screen
41
43
  - `screenshot.ts` - Capture screenshots
@@ -31,7 +31,12 @@ export async function initializeAppiumDocumentation(
31
31
  try {
32
32
  // Default to submodules directory if not specified
33
33
  const docsPath =
34
- resourcesPath || path.resolve(__dirname, '../../resources/submodules');
34
+ // Refer to the /src/resources/submodules directory where the markdown files are located.
35
+ resourcesPath ||
36
+ path.resolve(
37
+ __dirname,
38
+ path.join('..', '..', '..', 'src', 'resources', 'submodules')
39
+ );
35
40
  log.info(`Initializing Appium documentation from: ${docsPath}`);
36
41
  await indexAllMarkdownFiles(docsPath);
37
42
  log.info('Appium documentation indexing completed');
@@ -23,6 +23,7 @@ import generateLocators from './test-generation/locators.js';
23
23
  import selectPlatform from './session/select-platform.js';
24
24
  import selectDevice from './session/select-device.js';
25
25
  import openNotifications from './session/open-notifications.js';
26
+ import shakeDevice from './session/shake.js';
26
27
  import { lockDevice, unlockDevice } from './session/lock.js';
27
28
  import {
28
29
  setGeolocation,
@@ -48,6 +49,7 @@ import dragAndDrop from './interactions/drag-and-drop.js';
48
49
  import pinch from './interactions/pinch.js';
49
50
  import pressKey from './interactions/press-key.js';
50
51
  import setValue from './interactions/set-value.js';
52
+ import keyboard from './interactions/keyboard.js';
51
53
  import getText from './interactions/get-text.js';
52
54
  import getActiveElement from './interactions/active-element.js';
53
55
  import getPageSource from './interactions/get-page-source.js';
@@ -141,6 +143,7 @@ export default function registerTools(server: FastMCP): void {
141
143
  selectSession(server);
142
144
  deleteSession(server);
143
145
  openNotifications(server);
146
+ shakeDevice(server);
144
147
  lockDevice(server);
145
148
  unlockDevice(server);
146
149
  setGeolocation(server);
@@ -175,6 +178,7 @@ export default function registerTools(server: FastMCP): void {
175
178
  pinch(server);
176
179
  pressKey(server);
177
180
  setValue(server);
181
+ keyboard(server);
178
182
  getText(server);
179
183
  clipboard(server);
180
184
  getActiveElement(server);
@@ -0,0 +1,110 @@
1
+ import type { ContentResult, FastMCP } from 'fastmcp';
2
+ import { z } from 'zod';
3
+ import { getDriver } from '../../session-store.js';
4
+ import { execute } from '../../command.js';
5
+
6
+ export default function keyboard(server: FastMCP): void {
7
+ const hideKeyboardSchema = z.object({
8
+ keys: z
9
+ .array(z.string())
10
+ .optional()
11
+ .describe(
12
+ 'Optional key names used to dismiss the keyboard (e.g. "done" on tablets). ' +
13
+ 'Maps to the `keys` argument of mobile: hideKeyboard. Omit for default behavior.'
14
+ ),
15
+ });
16
+
17
+ server.addTool({
18
+ name: 'appium_mobile_hide_keyboard',
19
+ description:
20
+ 'Dismiss the on-screen software keyboard via Appium `mobile: hideKeyboard`. ' +
21
+ 'Supports Android (UiAutomator2) and iOS (XCUITest). ' +
22
+ 'May fail when no dismiss control exists; use gestures or back as a fallback.',
23
+ parameters: hideKeyboardSchema,
24
+ annotations: {
25
+ readOnlyHint: false,
26
+ openWorldHint: false,
27
+ },
28
+ execute: async (
29
+ args: z.infer<typeof hideKeyboardSchema>,
30
+ _context: Record<string, unknown> | undefined
31
+ ): Promise<ContentResult> => {
32
+ const driver = getDriver();
33
+ if (!driver) {
34
+ throw new Error('No driver found');
35
+ }
36
+
37
+ try {
38
+ const params =
39
+ args.keys && args.keys.length > 0 ? { keys: args.keys } : {};
40
+ await execute(driver, 'mobile: hideKeyboard', params);
41
+ return {
42
+ content: [
43
+ {
44
+ type: 'text',
45
+ text: 'Keyboard dismissed successfully.',
46
+ },
47
+ ],
48
+ };
49
+ } catch (err: unknown) {
50
+ const message = err instanceof Error ? err.message : String(err);
51
+ return {
52
+ content: [
53
+ {
54
+ type: 'text',
55
+ text: `Failed to hide keyboard. Error: ${message}`,
56
+ },
57
+ ],
58
+ };
59
+ }
60
+ },
61
+ });
62
+
63
+ server.addTool({
64
+ name: 'appium_mobile_is_keyboard_shown',
65
+ description:
66
+ 'Return whether the system on-screen keyboard is visible using Appium `mobile: isKeyboardShown`. ' +
67
+ 'Supports Android (UiAutomator2) and iOS (XCUITest). Response is JSON: `{ "keyboardShown": true|false }`.',
68
+ parameters: z.object({}),
69
+ annotations: {
70
+ readOnlyHint: true,
71
+ openWorldHint: false,
72
+ },
73
+ execute: async (
74
+ _args: Record<string, never>,
75
+ _context: Record<string, unknown> | undefined
76
+ ): Promise<ContentResult> => {
77
+ const driver = getDriver();
78
+ if (!driver) {
79
+ throw new Error('No driver found');
80
+ }
81
+
82
+ try {
83
+ const raw = await execute(driver, 'mobile: isKeyboardShown', {});
84
+ if (typeof raw !== 'boolean') {
85
+ throw new Error(
86
+ `Unexpected isKeyboardShown result type: ${typeof raw}`
87
+ );
88
+ }
89
+ return {
90
+ content: [
91
+ {
92
+ type: 'text',
93
+ text: JSON.stringify({ keyboardShown: raw }, null, 2),
94
+ },
95
+ ],
96
+ };
97
+ } catch (err: unknown) {
98
+ const message = err instanceof Error ? err.message : String(err);
99
+ return {
100
+ content: [
101
+ {
102
+ type: 'text',
103
+ text: `Failed to query keyboard visibility. Error: ${message}`,
104
+ },
105
+ ],
106
+ };
107
+ }
108
+ },
109
+ });
110
+ }
@@ -0,0 +1,56 @@
1
+ import type { ContentResult, FastMCP } from 'fastmcp';
2
+ import { z } from 'zod';
3
+ import { getDriver, isXCUITestDriverSession } from '../../session-store.js';
4
+
5
+ export default function shakeDevice(server: FastMCP): void {
6
+ const shakeSchema = z.object({});
7
+
8
+ server.addTool({
9
+ name: 'appium_mobile_shake',
10
+ description:
11
+ 'Perform a shake gesture via Appium `mobile: shake` using the XCUITest driver. ' +
12
+ 'Other driver types are not supported.',
13
+ parameters: shakeSchema,
14
+ annotations: {
15
+ readOnlyHint: false,
16
+ openWorldHint: false,
17
+ },
18
+ execute: async (
19
+ _args: z.infer<typeof shakeSchema>,
20
+ _context: Record<string, unknown> | undefined
21
+ ): Promise<ContentResult> => {
22
+ const driver = getDriver();
23
+ if (!driver) {
24
+ throw new Error('No driver found');
25
+ }
26
+
27
+ if (!isXCUITestDriverSession(driver)) {
28
+ return {
29
+ content: [
30
+ {
31
+ type: 'text',
32
+ text: 'Shake is supported only with XCUITest driver sessions. Other driver types are not supported.',
33
+ },
34
+ ],
35
+ };
36
+ }
37
+
38
+ try {
39
+ await (driver as any).mobileShake();
40
+ return {
41
+ content: [{ type: 'text', text: 'Shake action performed.' }],
42
+ };
43
+ } catch (err: unknown) {
44
+ const message = err instanceof Error ? err.message : String(err);
45
+ return {
46
+ content: [
47
+ {
48
+ type: 'text',
49
+ text: `Failed to perform shake. err: ${message}`,
50
+ },
51
+ ],
52
+ };
53
+ }
54
+ },
55
+ });
56
+ }