native-devtools-mcp 0.1.5 → 0.1.7
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 +12 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -114,9 +114,9 @@ This MCP server requires macOS privacy permissions to capture screenshots and si
|
|
|
114
114
|
3. Add the same app as above (VS Code, Terminal, etc.)
|
|
115
115
|
4. **Quit and restart the app completely**
|
|
116
116
|
|
|
117
|
-
#### 3. Tesseract OCR (required for `find_text`)
|
|
117
|
+
#### 3. Tesseract OCR (required for `find_text`, and for `take_screenshot` OCR)
|
|
118
118
|
|
|
119
|
-
The `find_text` tool uses OCR to locate text on screen and return clickable coordinates. This is the **recommended way** to interact with apps when AppDebugKit is not available.
|
|
119
|
+
The `find_text` tool uses OCR to locate text on screen and return clickable coordinates. The `take_screenshot` tool also runs OCR by default (`include_ocr: true`) to return text annotations. This is the **recommended way** to interact with apps when AppDebugKit is not available.
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
122
|
brew install tesseract
|
|
@@ -171,11 +171,12 @@ Or if you built from source:
|
|
|
171
171
|
|
|
172
172
|
| Tool | Description |
|
|
173
173
|
|------|-------------|
|
|
174
|
-
| `take_screenshot` | Capture screen, window, or region (base64 PNG) |
|
|
174
|
+
| `take_screenshot` | Capture screen, window, or region (base64 PNG). Includes OCR text annotations by default (`include_ocr: true`). |
|
|
175
175
|
| `list_windows` | List visible windows with IDs, titles, bounds |
|
|
176
176
|
| `list_apps` | List running applications |
|
|
177
177
|
| `focus_window` | Bring window/app to front |
|
|
178
178
|
| `get_displays` | Get display info (bounds, scale factors) for coordinate conversion |
|
|
179
|
+
| `find_text` | Find text on screen using OCR; returns screen coordinates for clicking |
|
|
179
180
|
|
|
180
181
|
### CGEvent Input Tools (work with any app, require Accessibility permission)
|
|
181
182
|
|
|
@@ -192,7 +193,7 @@ Or if you built from source:
|
|
|
192
193
|
|
|
193
194
|
| Tool | Description |
|
|
194
195
|
|------|-------------|
|
|
195
|
-
| `app_connect` | Connect to app's debug server (ws://127.0.0.1:9222) |
|
|
196
|
+
| `app_connect` | Connect to app's debug server (ws://127.0.0.1:9222). Supports `expected_bundle_id` and `expected_app_name` validation. |
|
|
196
197
|
| `app_disconnect` | Disconnect from app |
|
|
197
198
|
| `app_get_info` | Get app metadata (name, bundle ID, version) |
|
|
198
199
|
| `app_get_tree` | Get view hierarchy |
|
|
@@ -206,6 +207,13 @@ Or if you built from source:
|
|
|
206
207
|
| `app_list_windows` | List app's windows |
|
|
207
208
|
| `app_focus_window` | Focus specific window |
|
|
208
209
|
|
|
210
|
+
Note: app_* tools (except `app_connect`) are only listed after a successful connection. The server emits a tools list change on connect/disconnect, so some clients may need to refresh/re-list tools to see the app_* set.
|
|
211
|
+
|
|
212
|
+
## How Screenshots and Clicking Work (macOS)
|
|
213
|
+
|
|
214
|
+
- **Screenshots** are captured via the system `screencapture` utility (`-x` silent, `-C` include cursor, `-R` region, `-l` window with `-o` to exclude shadow), written to a temp PNG, and returned as base64. The backing scale factor is tracked for coordinate conversion. Window screenshots exclude shadows so that pixel coordinates align exactly with `CGWindowBounds`, and OCR coordinates are automatically offset into screen space.
|
|
215
|
+
- **Clicks/inputs** use CoreGraphics CGEvent injection (HID event tap). This requires Accessibility permission and works across AppKit, SwiftUI, Electron, egui, etc. Window-relative or screenshot-pixel coordinates are converted to screen coordinates using window bounds and display scale.
|
|
216
|
+
|
|
209
217
|
## Coordinate Systems and Display Scaling
|
|
210
218
|
|
|
211
219
|
The `click` tool supports three coordinate input methods to handle macOS display scaling:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-devtools-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "MCP server for testing native desktop applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"bin"
|
|
25
25
|
],
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@sh3ll3x3c/native-devtools-mcp-darwin-arm64": "0.1.
|
|
27
|
+
"@sh3ll3x3c/native-devtools-mcp-darwin-arm64": "0.1.7"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=18"
|