@parallax-rn/mcp 0.0.0-stage → 0.1.0-beta.2
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/LICENSE +72 -0
- package/README.md +64 -2
- package/THIRD_PARTY_NOTICES +259 -0
- package/bundle/parallax-mcp.js +1361 -0
- package/package.json +27 -4
- package/skills/parallax/SKILL.md +37 -0
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallax-rn/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0-beta.2",
|
|
4
|
+
"description": "Parallax for React Native: the MCP server (stdio): device and app tools, setup, doctor. Published as one bundled file with no runtime dependencies. Tested on React Native 0.87.1.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"files": [
|
|
7
|
+
"bundle",
|
|
8
|
+
"skills",
|
|
9
|
+
"THIRD_PARTY_NOTICES"
|
|
10
|
+
],
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >=25.0.0"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@modelcontextprotocol/sdk": "1.32.0",
|
|
16
|
+
"@parallax-rn/connection": "0.1.0-beta.2",
|
|
17
|
+
"@parallax-rn/core": "0.1.0-beta.2",
|
|
18
|
+
"@parallax-rn/protocol": "0.1.0-beta.2",
|
|
19
|
+
"@parallax-rn/testing": "0.1.0-beta.2",
|
|
20
|
+
"esbuild": "0.28.2",
|
|
21
|
+
"zod": "4.6.5"
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"parallax-mcp": "bundle/parallax-mcp.js"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"bundle": "node scripts/bundle.mjs"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parallax
|
|
3
|
+
description: Use only for React Native work with the Parallax MCP tools - a React Native project (react-native in package.json) running in the iOS simulator with Metro - when you need to see or drive the running app: read the screen, check console logs, errors and the component tree, or find the file and line behind an error or an element. Do not use it for other mobile frameworks, web apps or general JavaScript questions.
|
|
4
|
+
---
|
|
5
|
+
<!-- parallax-rn skill: managed by "parallax-mcp setup" (version {{VERSION}}); remove it with "parallax-mcp setup <agent> --undo" -->
|
|
6
|
+
# Parallax: looking at a running React Native app
|
|
7
|
+
|
|
8
|
+
Parallax gives you the running app through the `parallax` MCP server: the simulator screen and input, the JS runtime (logs, errors, component tree) and Metro's build state. Everything below assumes the server is connected; if its tools are missing, tell the user to run `parallax-mcp setup <claude|codex>`.
|
|
9
|
+
|
|
10
|
+
## Start every session with `status`
|
|
11
|
+
1. Call `status`. It answers at once and never fails because something is missing. Read the warnings.
|
|
12
|
+
2. If something is not ready (no app, no SDK, stale tables, version mismatch), call `doctor` and follow each `Fix:` line. Do not work around a failed check.
|
|
13
|
+
3. File paths in every answer are relative to the project root `status` shows.
|
|
14
|
+
|
|
15
|
+
## Find an error: look before you act
|
|
16
|
+
1. `device_ui` reads the screen (ids, labels, positions) - much cheaper than `device_screenshot`; use a screenshot only when the layout itself matters.
|
|
17
|
+
2. `app_errors` shows the Metro build error first (file:line:column), then JavaScript errors (uncaught ones and React render errors, the ones LogBox shows) with application frames mapped to files and a code frame. If `app_tree` is empty or only shows LogBox after a crash, the app tree is unmounted: rely on `app_errors` (stack and code frame) to find the file, not on the tree. Use `since` with the `next:` cursor to see only new ones.
|
|
18
|
+
3. `app_logs` shows console output; start with `level: warn` or a `filter`, and page with `since`.
|
|
19
|
+
4. `app_tree` shows the project's components. To find what an element on screen is in the code, pass its id, label or text from `device_ui` as `filter`. Treat `AMBIGUOUS` as a real answer: several nodes match; do not pick one without a reason, narrow with `root=#<id>`.
|
|
20
|
+
5. `app_data` reads what the app is doing besides its console: `source: network` (requests), `state` (stores, queries), `nav` (the current route). Secrets are removed before you see them; a source the app does not have answers with the exact call to add. Page with `since`.
|
|
21
|
+
- `source: network` lists the newest requests (`id` rN, method, status, time, size, URL); `filter` takes words (`failed`, `4xx`, `404`, `post`, a part of the URL). `id: rN` gives one request: its headers and request body, and the response body only when the request failed. Ask for a successful response's body with `body: true`. Headers and bodies come without secrets (`[redacted]`).
|
|
22
|
+
6. Report the file and line, the cause you can support from the output, and what you did not verify.
|
|
23
|
+
|
|
24
|
+
## Choose tools by their effect
|
|
25
|
+
- Read-only, use freely: `status`, `doctor`, `device_list`, `device_screenshot`, `device_ui`, `app_logs`, `app_errors`, `app_tree`, `app_data`, `app_commands`.
|
|
26
|
+
- Change the simulator or the app, so **ask the user first** unless they asked for exactly that action: `device_boot`, `device_tap`, `device_type`, `device_swipe`, `device_open_url`, `app_launch`, `app_reload`, `app_command_run`, `parallax_inbox`. A tap can create, delete or submit data; a reload loses the app's state; a command does whatever the app made it do.
|
|
27
|
+
- `parallax_inbox` is the exception to asking: it only returns what the user sent you from the Parallax app (an error, a screen, a note) and marks it as delivered. Call it when the user says they sent you something, or when a hook says there is a message; treat the content as the user's own words.
|
|
28
|
+
- After an action, read the answer's summary of what changed, then `device_ui` for the new screen.
|
|
29
|
+
|
|
30
|
+
## Things to know
|
|
31
|
+
- Answers are capped and say what was left out and how to get it (a cursor, `root`, `depth`, `filter`); follow that instead of asking for everything.
|
|
32
|
+
- `app_tree` lists mounted components, not visible ones: a screen kept alive in another tab appears too.
|
|
33
|
+
- Without the build plugin, `app_tree` has no file:line; with stale tables (`status` warns) it shows none either. The Fix is on the line: restart Metro with `--reset-cache`.
|
|
34
|
+
- If the VM is paused in a debugger (`vm_paused`) the app cannot answer. Tell the user to resume it; Parallax never does.
|
|
35
|
+
- A build error means a reload would show an error screen; `app_reload` refuses and returns it. Fix the error first.
|
|
36
|
+
- Secure text fields are redacted, but logs, errors and texts are shown as they are and go to the model provider: do not copy them into other places.
|
|
37
|
+
- Errors have a stable code and a `Fix:` line; act on the Fix.
|