@nbakka/mcp-appium 1.0.5 → 1.0.7

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/lib/server.js +14 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Selenium WebDriver MCP Server",
5
5
  "type": "module",
6
6
  "main": "src/lib/server.js",
package/src/lib/server.js CHANGED
@@ -29,13 +29,24 @@ server.tool(
29
29
  },
30
30
  async ({ capabilities }) => {
31
31
  try {
32
+ // Construct capabilities strictly with prefixes
33
+ const alwaysMatch = {
34
+ platformName: capabilities.platformName,
35
+ "appium:udid": capabilities.udid,
36
+ "appium:automationName": capabilities.automationName,
37
+ };
38
+ if (capabilities.app) {
39
+ alwaysMatch["appium:app"] = capabilities.app;
40
+ }
41
+
32
42
  const payload = {
33
43
  capabilities: {
34
44
  firstMatch: [{}],
35
- alwaysMatch: capabilities,
45
+ alwaysMatch,
36
46
  },
37
47
  };
38
- const response = await axios.post(`${APPIUM_URL}/session`, payload); // Correct endpoint
48
+
49
+ const response = await axios.post(`${APPIUM_URL}/session`, payload);
39
50
  state.sessionId = response.data.sessionId;
40
51
  return { content: [{ type: "text", text: `Session started: ${state.sessionId}` }] };
41
52
  } catch (e) {
@@ -44,6 +55,7 @@ server.tool(
44
55
  }
45
56
  );
46
57
 
58
+
47
59
  // Tap tool
48
60
  server.tool(
49
61
  "tap",