Skip to content

Mobile MCP: let AI agents drive your iOS and Android apps. MCP server for simulators, emulators and real devices. Works with Claude Code, Codex, Cursor and any MCP client.

fix: update mobilecli binary path after package rename (#316)

Gil Megidish87600a0e8da7
diff --git a/package-lock.json b/package-lock.json
index 43a3b89..ee50cf0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -46,7 +46,7 @@
"node": ">=18"
},
"optionalDependencies": {
- "@mobilenext/mobilecli": "0.1.60"
+ "mobilecli": "0.2.0"
}
},
"node_modules/@babel/code-frame": {
@@ -506,9 +506,9 @@
}
},
"node_modules/@hono/node-server": {
- "version": "1.19.11",
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.11.tgz",
- "integrity": "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==",
+ "version": "1.19.14",
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.14.tgz",
+ "integrity": "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==",
"license": "MIT",
"engines": {
"node": ">=18.14.1"
@@ -754,16 +754,6 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
- "node_modules/@mobilenext/mobilecli": {
- "version": "0.1.60",
- "resolved": "https://registry.npmjs.org/@mobilenext/mobilecli/-/mobilecli-0.1.60.tgz",
- "integrity": "sha512-XF3JfJH1xKSqCegYkT8sdDi8gv/8ovRp9Kn+L58Rw4np/wL/D065uzumcFF6IyDmreSUj9+kefbjMPYUQx5rSA==",
- "license": "MIT",
- "optional": true,
- "bin": {
- "mobilecli": "index.js"
- }
- },
"node_modules/@modelcontextprotocol/sdk": {
"version": "1.26.0",
"resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.26.0.tgz",
@@ -3609,9 +3599,9 @@
}
},
"node_modules/hono": {
- "version": "4.12.8",
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.8.tgz",
- "integrity": "sha512-VJCEvtrezO1IAR+kqEYnxUOoStaQPGrCmX3j4wDTNOcD1uRPFpGlwQUIW8niPuvHXaTUxeOUl5MMDGrl+tmO9A==",
+ "version": "4.12.12",
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.12.tgz",
+ "integrity": "sha512-p1JfQMKaceuCbpJKAPKVqyqviZdS0eUxH9v82oWo1kb9xjQ5wA6iP3FNVAPDFlz5/p7d45lO+BpSk1tuSZMF4Q==",
"license": "MIT",
"engines": {
"node": ">=16.9.0"
@@ -4726,6 +4716,16 @@
"node": ">=16 || 14 >=14.17"
}
},
+ "node_modules/mobilecli": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/mobilecli/-/mobilecli-0.2.0.tgz",
+ "integrity": "sha512-kVRRu+az5zDC2Y0iEBwW659HdItEPfNZHk/zrVQubdgP2eCztECqcZcYeT98EmGvjQZnmQGo1Vt2QvxIIcPlug==",
+ "license": "MIT",
+ "optional": true,
+ "bin": {
+ "mobilecli": "index.js"
+ }
+ },
"node_modules/mocha": {
"version": "11.7.5",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.5.tgz",
diff --git a/package.json b/package.json
index fd7dd83..8241b02 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"zod-to-json-schema": "3.25.0"
},
"optionalDependencies": {
- "@mobilenext/mobilecli": "0.1.60"
+ "mobilecli": "0.2.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
diff --git a/src/mobilecli.ts b/src/mobilecli.ts
index ddaa898..f917129 100644
--- a/src/mobilecli.ts
+++ b/src/mobilecli.ts
@@ -79,7 +79,7 @@ export class Mobilecli {
// We're inside node_modules, go to the last node_modules in the path
const nodeModulesParts = pathParts.slice(0, lastNodeModulesIndex + 1);
const lastNodeModulesPath = nodeModulesParts.join(sep);
- const mobilecliPath = join(lastNodeModulesPath, "@mobilenext", "mobilecli", "bin", binaryName);
+ const mobilecliPath = join(lastNodeModulesPath, "mobilecli", "bin", binaryName);
if (existsSync(mobilecliPath)) {
return mobilecliPath;
@@ -89,7 +89,7 @@ export class Mobilecli {
// Not in node_modules, look one directory up from current script
const scriptDir = dirname(__filename);
const parentDir = dirname(scriptDir);
- const mobilecliPath = join(parentDir, "node_modules", "@mobilenext", "mobilecli", "bin", binaryName);
+ const mobilecliPath = join(parentDir, "node_modules", "mobilecli", "bin", binaryName);
if (existsSync(mobilecliPath)) {
return mobilecliPath;