appium-mcp 1.72.5 → 1.72.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.
- package/CHANGELOG.md +6 -0
- package/dist/tools/session/session.d.ts.map +1 -1
- package/dist/tools/session/session.js +19 -5
- package/dist/tools/session/session.js.map +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/resources/submodules.zip +0 -0
- package/src/tools/session/session.ts +19 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [1.72.6](https://github.com/appium/appium-mcp/compare/v1.72.5...v1.72.6) (2026-05-04)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **session:** improve capabilities handling for wider LLMs ([#316](https://github.com/appium/appium-mcp/issues/316)) ([c18f35d](https://github.com/appium/appium-mcp/commit/c18f35d33de4580538a5e02d489e50ce4b79577e))
|
|
6
|
+
|
|
1
7
|
## [1.72.5](https://github.com/appium/appium-mcp/compare/v1.72.4...v1.72.5) (2026-05-03)
|
|
2
8
|
|
|
3
9
|
### Miscellaneous Chores
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/tools/session/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/tools/session/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA+EvC,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CA6ErD"}
|
|
@@ -47,10 +47,12 @@ const schema = z.object({
|
|
|
47
47
|
'Use "general" for non-Android/iOS drivers (Windows, macOS, custom). ' +
|
|
48
48
|
'For remote servers, infer from context.'),
|
|
49
49
|
capabilities: z
|
|
50
|
-
.
|
|
50
|
+
.string()
|
|
51
51
|
.optional()
|
|
52
|
-
.describe('Optional W3C capabilities for create.
|
|
53
|
-
'
|
|
52
|
+
.describe('Optional W3C capabilities for create. Provide as a JSON string (e.g. \'{"appium:app":"/path/to/app","appium:platformVersion":"17.0"}\'). ' +
|
|
53
|
+
'Applied on top of defaults for ios/android, or used as-is for general. ' +
|
|
54
|
+
'Common: appium:app, appium:deviceName, appium:platformVersion, appium:bundleId. ' +
|
|
55
|
+
'When passing from a capabilitiesHint result, serialize the full object to JSON — do NOT drop boolean or numeric values.'),
|
|
54
56
|
remoteServerUrl: z
|
|
55
57
|
.string()
|
|
56
58
|
.optional()
|
|
@@ -72,13 +74,25 @@ export default function session(server) {
|
|
|
72
74
|
},
|
|
73
75
|
execute: async (args) => {
|
|
74
76
|
try {
|
|
77
|
+
// Parse capabilities: some LLMs (e.g. Gemini) pass a JSON string instead of an object.
|
|
78
|
+
const parsedCapabilities = (() => {
|
|
79
|
+
if (typeof args.capabilities === 'string') {
|
|
80
|
+
try {
|
|
81
|
+
return JSON.parse(args.capabilities);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return args.capabilities;
|
|
88
|
+
})();
|
|
75
89
|
if (args.action === 'create') {
|
|
76
90
|
if (!args.platform) {
|
|
77
91
|
return errorResult('platform is required for create action');
|
|
78
92
|
}
|
|
79
93
|
return createSessionAction({
|
|
80
94
|
platform: args.platform,
|
|
81
|
-
capabilities:
|
|
95
|
+
capabilities: parsedCapabilities,
|
|
82
96
|
remoteServerUrl: args.remoteServerUrl,
|
|
83
97
|
});
|
|
84
98
|
}
|
|
@@ -92,7 +106,7 @@ export default function session(server) {
|
|
|
92
106
|
return attachSessionAction({
|
|
93
107
|
remoteServerUrl: args.remoteServerUrl,
|
|
94
108
|
sessionId: args.sessionId,
|
|
95
|
-
capabilities:
|
|
109
|
+
capabilities: parsedCapabilities,
|
|
96
110
|
});
|
|
97
111
|
}
|
|
98
112
|
if (args.action === 'detach') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/tools/session/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,eAAe,GAAG;IACtB,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,QAAQ;CACA,CAAC;AAEX,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;iMAc8J,CAAC;AAElM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,eAAe,CAAC;SACrB,QAAQ,CACP,qBAAqB;QACnB,WAAW,0BAA0B,EAAE;QACvC,mJAAmJ;QACnJ,qIAAqI;QACrI,8GAA8G;QAC9G,0HAA0H;QAC1H,8GAA8G,CACjH;IACH,QAAQ,EAAE,CAAC;SACR,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;SACnC,QAAQ,EAAE;SACV,QAAQ,CACP,uBAAuB;QACrB,yEAAyE;QACzE,sEAAsE;QACtE,yCAAyC,CAC5C;IACH,YAAY,EAAE,CAAC;SACZ,MAAM,
|
|
1
|
+
{"version":3,"file":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CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
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.72.
|
|
6
|
+
"version": "1.72.6",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "appium-mcp",
|
|
11
|
-
"version": "1.72.
|
|
11
|
+
"version": "1.72.6",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
}
|
|
Binary file
|
|
@@ -55,11 +55,13 @@ const schema = z.object({
|
|
|
55
55
|
'For remote servers, infer from context.'
|
|
56
56
|
),
|
|
57
57
|
capabilities: z
|
|
58
|
-
.
|
|
58
|
+
.string()
|
|
59
59
|
.optional()
|
|
60
60
|
.describe(
|
|
61
|
-
'Optional W3C capabilities for create.
|
|
62
|
-
'
|
|
61
|
+
'Optional W3C capabilities for create. Provide as a JSON string (e.g. \'{"appium:app":"/path/to/app","appium:platformVersion":"17.0"}\'). ' +
|
|
62
|
+
'Applied on top of defaults for ios/android, or used as-is for general. ' +
|
|
63
|
+
'Common: appium:app, appium:deviceName, appium:platformVersion, appium:bundleId. ' +
|
|
64
|
+
'When passing from a capabilitiesHint result, serialize the full object to JSON — do NOT drop boolean or numeric values.'
|
|
63
65
|
),
|
|
64
66
|
remoteServerUrl: z
|
|
65
67
|
.string()
|
|
@@ -88,13 +90,25 @@ export default function session(server: FastMCP): void {
|
|
|
88
90
|
},
|
|
89
91
|
execute: async (args: z.infer<typeof schema>): Promise<any> => {
|
|
90
92
|
try {
|
|
93
|
+
// Parse capabilities: some LLMs (e.g. Gemini) pass a JSON string instead of an object.
|
|
94
|
+
const parsedCapabilities: Record<string, any> | undefined = (() => {
|
|
95
|
+
if (typeof args.capabilities === 'string') {
|
|
96
|
+
try {
|
|
97
|
+
return JSON.parse(args.capabilities) as Record<string, any>;
|
|
98
|
+
} catch {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return args.capabilities;
|
|
103
|
+
})();
|
|
104
|
+
|
|
91
105
|
if (args.action === 'create') {
|
|
92
106
|
if (!args.platform) {
|
|
93
107
|
return errorResult('platform is required for create action');
|
|
94
108
|
}
|
|
95
109
|
return createSessionAction({
|
|
96
110
|
platform: args.platform,
|
|
97
|
-
capabilities:
|
|
111
|
+
capabilities: parsedCapabilities,
|
|
98
112
|
remoteServerUrl: args.remoteServerUrl,
|
|
99
113
|
});
|
|
100
114
|
}
|
|
@@ -109,7 +123,7 @@ export default function session(server: FastMCP): void {
|
|
|
109
123
|
return attachSessionAction({
|
|
110
124
|
remoteServerUrl: args.remoteServerUrl,
|
|
111
125
|
sessionId: args.sessionId,
|
|
112
|
-
capabilities:
|
|
126
|
+
capabilities: parsedCapabilities,
|
|
113
127
|
});
|
|
114
128
|
}
|
|
115
129
|
|