metro-mcp 0.2.0 → 0.3.0
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 +62 -6
- package/dist/bin/metro-mcp.js +579 -482
- package/dist/index.js +579 -482
- package/dist/plugins/prompts.d.ts.map +1 -1
- package/dist/plugins/test-recorder.d.ts +2 -0
- package/dist/plugins/test-recorder.d.ts.map +1 -0
- package/dist/plugins/ui-interact.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/utils/fiber.d.ts +10 -0
- package/dist/utils/fiber.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/plugins/appium.d.ts +0 -2
- package/dist/plugins/appium.d.ts.map +0 -1
- package/dist/plugins/maestro.d.ts +0 -2
- package/dist/plugins/maestro.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -7,6 +7,22 @@ A plugin-based MCP server for React Native runtime debugging, inspection, and au
|
|
|
7
7
|
|
|
8
8
|
Works with **Expo**, **bare React Native**, and any project using **Metro + Hermes**.
|
|
9
9
|
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
- [Quick Start](#quick-start)
|
|
15
|
+
- [Requirements](#requirements)
|
|
16
|
+
- [How It Works](#how-it-works)
|
|
17
|
+
- [Features](#features)
|
|
18
|
+
- [Test Recording](#test-recording)
|
|
19
|
+
- [App Integration](#app-integration-optional)
|
|
20
|
+
- [Configuration](#configuration)
|
|
21
|
+
- [Custom Plugins](#custom-plugins)
|
|
22
|
+
- [Compatibility](#compatibility)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
10
26
|
## Quick Start
|
|
11
27
|
|
|
12
28
|
### Claude Code
|
|
@@ -49,6 +65,8 @@ Or with Bun:
|
|
|
49
65
|
claude mcp add metro-mcp -- npx -y metro-mcp --port 19000
|
|
50
66
|
```
|
|
51
67
|
|
|
68
|
+
---
|
|
69
|
+
|
|
52
70
|
## Requirements
|
|
53
71
|
|
|
54
72
|
- **Node.js** 18+ or **Bun** 1.0+
|
|
@@ -56,17 +74,21 @@ claude mcp add metro-mcp -- npx -y metro-mcp --port 19000
|
|
|
56
74
|
- **Android**: Android SDK with `adb` on your PATH
|
|
57
75
|
- **IDB** *(optional)*: Some iOS operations fall back to [IDB (idb-companion)](https://github.com/facebook/idb) — install with `brew install idb-companion`. Tools will tell you when IDB is needed.
|
|
58
76
|
|
|
77
|
+
---
|
|
78
|
+
|
|
59
79
|
## How It Works
|
|
60
80
|
|
|
61
81
|
metro-mcp connects to your running Metro dev server the same way Chrome DevTools does:
|
|
62
82
|
|
|
63
|
-
1. Discovers Metro via port scanning (8081, 8082, 19000
|
|
83
|
+
1. Discovers Metro via port scanning (8081, 8082, 19000–19002)
|
|
64
84
|
2. Connects to Hermes via Chrome DevTools Protocol (CDP)
|
|
65
|
-
3. Streams console logs, network requests, errors into buffers
|
|
85
|
+
3. Streams console logs, network requests, and errors into buffers
|
|
66
86
|
4. Exposes everything as MCP tools, resources, and prompts
|
|
67
87
|
|
|
68
88
|
**No app modifications required** for core debugging features.
|
|
69
89
|
|
|
90
|
+
---
|
|
91
|
+
|
|
70
92
|
## Features
|
|
71
93
|
|
|
72
94
|
| Plugin | Tools | Description |
|
|
@@ -74,7 +96,7 @@ metro-mcp connects to your running Metro dev server the same way Chrome DevTools
|
|
|
74
96
|
| **console** | 2 | Console log collection with filtering |
|
|
75
97
|
| **network** | 3 | Network request tracking and search |
|
|
76
98
|
| **errors** | 2 | Exception collection with auto-symbolication |
|
|
77
|
-
| **evaluate** | 1 | Execute JavaScript in app runtime |
|
|
99
|
+
| **evaluate** | 1 | Execute JavaScript in the app runtime |
|
|
78
100
|
| **device** | 3 | Device and connection management |
|
|
79
101
|
| **source** | 1 | Stack trace symbolication |
|
|
80
102
|
| **redux** | 3 | Redux state inspection and action dispatch |
|
|
@@ -88,10 +110,38 @@ metro-mcp connects to your running Metro dev server the same way Chrome DevTools
|
|
|
88
110
|
| **accessibility** | 3 | Accessibility auditing |
|
|
89
111
|
| **commands** | 2 | Custom app commands |
|
|
90
112
|
| **profiler** | 5 | CPU profiling (Hermes CDP) + React render tracking |
|
|
91
|
-
| **
|
|
92
|
-
|
|
113
|
+
| **test-recorder** | 4 | Record interactions and generate Appium, Maestro, or Detox tests |
|
|
114
|
+
|
|
115
|
+
**Total: 56 tools, 9 resources, 7 prompts** — see the [full tools reference](docs/tools.md).
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Test Recording
|
|
120
|
+
|
|
121
|
+
Record real user interactions (taps, text entry, scrolls) and generate production-ready tests — no app code changes required.
|
|
122
|
+
|
|
123
|
+
### AI-driven test generation
|
|
93
124
|
|
|
94
|
-
|
|
125
|
+
Describe a flow and the AI navigates the app, then generates the test:
|
|
126
|
+
|
|
127
|
+
> *"Write an Appium test for the guest checkout flow — start by tapping 'Start Shopping' on the welcome screen and end when the cart screen is visible."*
|
|
128
|
+
|
|
129
|
+
The AI calls `start_test_recording`, navigates using `tap_element`/`type_text`/`swipe`, then generates a complete test with real selectors observed from the fiber tree.
|
|
130
|
+
|
|
131
|
+
### Manual recording
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
start_test_recording → inject interceptors
|
|
135
|
+
(interact with the app)
|
|
136
|
+
stop_test_recording → retrieve event log
|
|
137
|
+
generate_test_from_recording format=appium
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Supports **Appium (WebdriverIO)**, **Maestro YAML**, and **Detox**.
|
|
141
|
+
|
|
142
|
+
→ See the [testing guide](docs/testing.md) for full details, format examples, and tips.
|
|
143
|
+
|
|
144
|
+
---
|
|
95
145
|
|
|
96
146
|
## App Integration (Optional)
|
|
97
147
|
|
|
@@ -124,14 +174,20 @@ Use `list_commands` and `run_command` to call these from the MCP client.
|
|
|
124
174
|
|
|
125
175
|
For enhanced features like real-time Redux action tracking, navigation events, performance marks, and React render profiling, see the [optional client SDK](docs/sdk.md) and [profiling guide](docs/profiling.md).
|
|
126
176
|
|
|
177
|
+
---
|
|
178
|
+
|
|
127
179
|
## Configuration
|
|
128
180
|
|
|
129
181
|
See [configuration docs](docs/configuration.md) for environment variables, CLI arguments, and config file options.
|
|
130
182
|
|
|
183
|
+
---
|
|
184
|
+
|
|
131
185
|
## Custom Plugins
|
|
132
186
|
|
|
133
187
|
metro-mcp is fully extensible. See the [plugins guide](docs/plugins.md) to build your own tools and resources.
|
|
134
188
|
|
|
189
|
+
---
|
|
190
|
+
|
|
135
191
|
## Compatibility
|
|
136
192
|
|
|
137
193
|
- **React Native**: 0.70+ (Hermes required)
|