@shipvo/mcp 0.0.8 → 0.0.10

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/dist/wait.d.ts CHANGED
@@ -10,6 +10,5 @@ export type Waited = {
10
10
  ms: number;
11
11
  };
12
12
  export declare function present(tree: string, w: WaitFor): boolean;
13
- export declare const wantsMatch: (w: WaitFor) => boolean;
14
13
  export declare const satisfied: (tree: string, w: WaitFor) => boolean;
15
14
  export declare const sameTree: (a: string, b: string) => boolean;
package/dist/wait.js CHANGED
@@ -11,7 +11,6 @@ export function present(tree, w) {
11
11
  return ls.some((l) => { const p = parse(l); return !!p && p.role === w.role && p.text.includes(w.name); });
12
12
  return false;
13
13
  }
14
- export const wantsMatch = (w) => !!(w.ref || w.text || (w.role && w.name));
15
14
  export const satisfied = (tree, w) => present(tree, w) !== !!w.gone;
16
15
  // Two reads are equal when they differ only in ref numbers.
17
16
  export const sameTree = (a, b) => a.replace(/\s*\[ref=\w+\]/g, "") === b.replace(/\s*\[ref=\w+\]/g, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipvo/mcp",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "MCP server that lets AI agents open, see and operate Shipvo apps without a phone: a phone-sized simulator of the real app, plus the app's typed commands and owner API.",
@@ -15,7 +15,10 @@
15
15
  "devDependencies": {
16
16
  "typescript": "^5.6.3",
17
17
  "@types/node": "^22.8.0",
18
- "vitest": "^2.1.4"
18
+ "vitest": "^2.1.4",
19
+ "playwright": "1.63.0",
20
+ "esbuild": "^0.21.5",
21
+ "@shipvo/mcp-tools": "0.0.1"
19
22
  },
20
23
  "keywords": [
21
24
  "mcp",
@@ -34,6 +37,7 @@
34
37
  "directory": "packages/mcp"
35
38
  },
36
39
  "files": [
40
+ "skills",
37
41
  "dist",
38
42
  "README.md"
39
43
  ],
@@ -45,8 +49,16 @@
45
49
  "node": ">=20"
46
50
  },
47
51
  "mcpName": "io.github.shipvo/shipvo",
52
+ "peerDependencies": {
53
+ "playwright": ">=1.50"
54
+ },
55
+ "peerDependenciesMeta": {
56
+ "playwright": {
57
+ "optional": true
58
+ }
59
+ },
48
60
  "scripts": {
49
- "build": "tsc -p tsconfig.json",
61
+ "build": "tsc -p tsconfig.json && node scripts/inline-tools.mjs",
50
62
  "test": "vitest run"
51
63
  }
52
64
  }
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: shipvo-mcp
3
+ description: Drive a React Native app through the @shipvo/mcp server. Use when the project depends on @shipvo/mcp and you need to open the app, read the screen, tap, type, scroll or take a screenshot.
4
+ ---
5
+
6
+ # @shipvo/mcp
7
+
8
+ An MCP server that gives you a headless phone. Start the simulator first: `shipvo sim` (http://localhost:4545).
9
+
10
+ Add the server to your MCP config:
11
+
12
+ ```json
13
+ { "mcpServers": { "shipvo": { "command": "npx", "args": ["-y", "@shipvo/mcp"] } } }
14
+ ```
15
+
16
+ ## Drive the app
17
+
18
+ 1. `open_app("<app id>")` returns a session and the first screen.
19
+ 2. `screen(session)` returns the accessibility tree. Each element has a ref, for example `[ref=e12]`.
20
+ 3. `tap(session, ref)`, `type(session, ref, text)`, `scroll(session, direction, ref?)`, `back(session)`.
21
+ 4. `screenshot(session)` returns a PNG.
22
+ 5. `end_session(session)` when done.
23
+
24
+ Each action result starts with `Change: none | content changed | new screen | scrolled`, then the screen. Refs are renumbered between screens: read the screen again before you tap.
25
+
26
+ Wait for an effect instead of sleeping: pass `wait_for: { text: "Cart" }` or `settle: true` to `tap`, `type`, `scroll` or `back`. The result gets `Waited: matched | timed out after <ms> ms`.
27
+
28
+ ## When a call fails
29
+
30
+ A failed call has `isError: true` and `structuredContent: { ok: false, code, error }`. Read `code`, then `error`. On `sim_timeout` call `screen`: the action may have run.
31
+
32
+ Use `set_device` for location, permissions, biometrics, payment and network. The full tool list is in the package README.