stupidmirror-mcp 0.0.0-stage → 0.8.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/README.md CHANGED
@@ -1,3 +1,35 @@
1
- # Temporary Holding Version
1
+ # stupidmirror-mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ MCP server launcher for [StupidMirror](https://github.com/LiuTianjie/StupidMirror), a macOS app that mirrors and controls iPhone and Android devices, iOS Simulators and Android emulators.
4
+
5
+ **The StupidMirror macOS app is required.** This package contains no device code. It starts the MCP bridge that ships inside the app (`StupidMirror.app/Contents/Helpers/StupidMirrorMCPBridge`) over stdio. Without the app it prints an error and exits.
6
+
7
+ ## What the tools do
8
+
9
+ List devices, read the screen (screenshot and local OCR), read the UI tree, tap, swipe, type, press buttons, open URLs, launch, install and uninstall apps, and record the screen.
10
+
11
+ One device at a time is free. Several devices at once need an iTool yearly membership.
12
+
13
+ ## Setup
14
+
15
+ 1. Install StupidMirror from [GitHub Releases](https://github.com/LiuTianjie/StupidMirror/releases/latest) into `/Applications`.
16
+ 2. Open the app and enable **Settings > MCP**.
17
+ 3. Add the server to your MCP client:
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "stupidmirror": { "command": "npx", "args": ["-y", "stupidmirror-mcp"] }
23
+ }
24
+ }
25
+ ```
26
+
27
+ If the app is somewhere other than `/Applications/StupidMirror.app`, set `STUPIDMIRROR_APP` to its path.
28
+
29
+ The app can also register itself with Claude Code and Codex from **Settings > MCP Automation**.
30
+
31
+ More: https://stupidmirror.itool.tech/mcp/
32
+
33
+ ## License
34
+
35
+ [PolyForm Noncommercial 1.0.0](https://github.com/LiuTianjie/StupidMirror/blob/main/LICENSE), same as StupidMirror.
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ // Starts the MCP bridge bundled in the StupidMirror macOS app over stdio.
4
+ const { spawn } = require("child_process");
5
+ const fs = require("fs");
6
+
7
+ const app = process.env.STUPIDMIRROR_APP || "/Applications/StupidMirror.app";
8
+ const bridge = app + "/Contents/Helpers/StupidMirrorMCPBridge";
9
+
10
+ if (process.platform !== "darwin" || !fs.existsSync(bridge)) {
11
+ process.stderr.write(
12
+ "stupidmirror-mcp: StupidMirror.app was not found at " + app + ".\n" +
13
+ "This package only launches the MCP bridge inside the StupidMirror macOS app.\n" +
14
+ "Install the app from https://github.com/LiuTianjie/StupidMirror/releases/latest\n" +
15
+ "(or set STUPIDMIRROR_APP to its path), then enable Settings > MCP in the app.\n"
16
+ );
17
+ process.exit(1);
18
+ }
19
+
20
+ const child = spawn(bridge, ["--app", app, ...process.argv.slice(2)], { stdio: "inherit" });
21
+ for (const sig of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(sig, () => child.kill(sig));
22
+ child.on("error", (err) => { process.stderr.write("stupidmirror-mcp: " + err.message + "\n"); process.exit(1); });
23
+ child.on("exit", (code, signal) => process.exit(signal ? 1 : code ?? 0));
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "stupidmirror-mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.8.6",
4
+ "description": "MCP stdio launcher for the StupidMirror macOS app: operate iPhone/Android devices, iOS Simulators and Android emulators.",
5
+ "mcpName": "io.github.LiuTianjie/stupidmirror",
6
+ "license": "PolyForm-Noncommercial-1.0.0",
7
+ "bin": { "stupidmirror-mcp": "bin/stupidmirror-mcp.js" },
8
+ "files": ["bin/", "README.md"],
9
+ "os": ["darwin"],
10
+ "engines": { "node": ">=18" },
11
+ "homepage": "https://stupidmirror.itool.tech/mcp/",
12
+ "repository": { "type": "git", "url": "git+https://github.com/LiuTianjie/StupidMirror.git" },
13
+ "bugs": { "url": "https://github.com/LiuTianjie/StupidMirror/issues" },
14
+ "keywords": ["mcp", "model-context-protocol", "ios", "android", "iphone", "simulator", "emulator", "automation", "stupidmirror"]
15
+ }