native-devtools-mcp 0.2.1 → 0.2.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/README.md +183 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# native-devtools-mcp
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
**Give your AI agent "eyes" and "hands" for native desktop applications.**
|
|
11
|
+
|
|
12
|
+
A Model Context Protocol (MCP) server that provides **Computer Use** capabilities: screenshots, OCR, input simulation, and window management.
|
|
13
|
+
|
|
14
|
+
[Features](#features) • [Installation](#installation) • [For AI Agents](#for-ai-agents-llms) • [Permissions](#required-permissions-macos)
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🚀 Features
|
|
23
|
+
|
|
24
|
+
- **👀 Computer Vision:** Capture screenshots of screens, windows, or specific regions. Includes built-in OCR (text recognition) to "read" the screen.
|
|
25
|
+
- **🖱️ Input Simulation:** Click, drag, scroll, and type text naturally. Supports global coordinates and window-relative actions.
|
|
26
|
+
- **🪟 Window Management:** List open windows, find applications, and bring them to focus.
|
|
27
|
+
- **🔒 Local & Private:** 100% local execution. No screenshots or data are ever sent to external servers.
|
|
28
|
+
- **🔌 Dual-Mode Interaction:**
|
|
29
|
+
1. **Visual/Native:** Works with *any* app via screenshots & coordinates (Universal).
|
|
30
|
+
2. **AppDebugKit:** Deep integration for supported apps to inspect the UI tree (DOM-like structure).
|
|
31
|
+
|
|
32
|
+
## 🤖 For AI Agents (LLMs)
|
|
33
|
+
|
|
34
|
+
This MCP server is designed to be **highly discoverable and usable** by AI models (Claude, Gemini, GPT).
|
|
35
|
+
|
|
36
|
+
- **[📄 Read `agents.md`](./agents.md):** A compact, token-optimized technical reference designed specifically for ingestion by LLMs. It contains intent definitions, schema examples, and reasoning patterns.
|
|
37
|
+
|
|
38
|
+
**Core Capabilities for System Prompts:**
|
|
39
|
+
1. `take_screenshot`: The "eyes". Returns images + layout metadata + text locations (OCR).
|
|
40
|
+
2. `click` / `type_text`: The "hands". Interacts with the system based on visual feedback.
|
|
41
|
+
3. `find_text`: A shortcut to find text on screen and get its coordinates immediately.
|
|
42
|
+
|
|
43
|
+
## 📦 Installation
|
|
44
|
+
|
|
45
|
+
### Option 1: Run with `npx` (No install needed)
|
|
46
|
+
|
|
47
|
+
The easiest way to use this with Claude Desktop or other MCP clients.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx -y native-devtools-mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Option 2: Global Install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm install -g native-devtools-mcp
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Option 3: Build from Source (Rust)
|
|
60
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>Click to expand build instructions</summary>
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git clone https://github.com/sh3ll3x3c/native-devtools-mcp
|
|
66
|
+
cd native-devtools-mcp
|
|
67
|
+
cargo build --release
|
|
68
|
+
# Binary: ./target/release/native-devtools-mcp
|
|
69
|
+
```
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
## ⚙️ Configuration
|
|
73
|
+
|
|
74
|
+
Add this to your **Claude Desktop** configuration file:
|
|
75
|
+
|
|
76
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
77
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"native-devtools": {
|
|
83
|
+
"command": "npx",
|
|
84
|
+
"args": ["-y", "native-devtools-mcp"]
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
> **Note:** Requires Node.js 18+ installed.
|
|
91
|
+
|
|
92
|
+
### For Claude Code (CLI) Users
|
|
93
|
+
|
|
94
|
+
To avoid approving every single tool call (clicks, screenshots), you can add this wildcard permission to your project's settings or global config:
|
|
95
|
+
|
|
96
|
+
**File:** `.claude/settings.local.json` (or similar)
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"permissions": {
|
|
101
|
+
"allow": ["mcp__native-devtools__*"]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 🔍 Two Approaches to Interaction
|
|
107
|
+
|
|
108
|
+
We provide two ways for agents to interact, allowing them to choose the best tool for the job.
|
|
109
|
+
|
|
110
|
+
### 1. The "Visual" Approach (Universal)
|
|
111
|
+
**Best for:** 99% of apps (Electron, Qt, Games, Browsers).
|
|
112
|
+
* **How it works:** The agent takes a screenshot, analyzes it visually (or uses OCR), and clicks at coordinates.
|
|
113
|
+
* **Tools:** `take_screenshot`, `find_text`, `click`, `type_text`.
|
|
114
|
+
* **Example:** "Click the button that looks like a gear icon."
|
|
115
|
+
|
|
116
|
+
### 2. The "Structural" Approach (AppDebugKit)
|
|
117
|
+
**Best for:** Apps specifically instrumented with our AppDebugKit library (mostly for developers testing their own apps).
|
|
118
|
+
* **How it works:** The agent connects to a debug port and queries the UI tree (like HTML DOM).
|
|
119
|
+
* **Tools:** `app_connect`, `app_query`, `app_click`.
|
|
120
|
+
* **Example:** `app_click(element_id="submit-button")`.
|
|
121
|
+
|
|
122
|
+
## 🏗️ Architecture
|
|
123
|
+
|
|
124
|
+
```mermaid
|
|
125
|
+
graph TD
|
|
126
|
+
Client[Claude / LLM Client] <-->|JSON-RPC 2.0| Server[native-devtools-mcp]
|
|
127
|
+
Server -->|Direct API| Sys[System APIs]
|
|
128
|
+
Server -->|WebSocket| Debug[AppDebugKit]
|
|
129
|
+
|
|
130
|
+
subgraph "Your Machine"
|
|
131
|
+
Sys -->|Screen/OCR| macOS[CoreGraphics / Vision]
|
|
132
|
+
Sys -->|Input| Win[Win32 / SendInput]
|
|
133
|
+
Debug -.->|Inspect| App[Target App]
|
|
134
|
+
end
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
<details>
|
|
138
|
+
<summary><strong>🔧 Technical Details (Under the Hood)</strong></summary>
|
|
139
|
+
|
|
140
|
+
| OS | Feature | API Used |
|
|
141
|
+
|----|---------|----------|
|
|
142
|
+
| **macOS** | Screenshots | `screencapture` (CLI) |
|
|
143
|
+
| | Input | `CGEvent` (CoreGraphics) |
|
|
144
|
+
| | OCR | `VNRecognizeTextRequest` (Vision Framework) |
|
|
145
|
+
| **Windows** | Screenshots | `BitBlt` (GDI) |
|
|
146
|
+
| | Input | `SendInput` (Win32) |
|
|
147
|
+
| | OCR | `Windows.Media.Ocr` (WinRT) |
|
|
148
|
+
|
|
149
|
+
</details>
|
|
150
|
+
|
|
151
|
+
## 🛡️ Privacy, Safety & Best Practices
|
|
152
|
+
|
|
153
|
+
### 🔒 Privacy First
|
|
154
|
+
* **100% Local:** All processing (screenshots, OCR, logic) happens on your device.
|
|
155
|
+
* **No Cloud:** Images are never uploaded to any third-party server by this tool.
|
|
156
|
+
* **Open Source:** You can inspect the code to verify exactly what it does.
|
|
157
|
+
|
|
158
|
+
### ⚠️ Operational Safety
|
|
159
|
+
* **Hands Off:** When the agent is "driving" (clicking/typing), **do not move your mouse or type**.
|
|
160
|
+
* *Why?* Real hardware inputs can conflict with the simulated ones, causing clicks to land in the wrong place.
|
|
161
|
+
* **Focus Matters:** Ensure the window you want the agent to use is visible. If a popup steals focus, the agent might type into the wrong window unless it checks first.
|
|
162
|
+
|
|
163
|
+
## 🔐 Required Permissions (macOS)
|
|
164
|
+
|
|
165
|
+
On macOS, you must grant permissions to the **host application** (e.g., Terminal, VS Code, Claude Desktop) to allow screen recording and input control.
|
|
166
|
+
|
|
167
|
+
1. **Screen Recording:** Required for `take_screenshot`.
|
|
168
|
+
* *System Settings > Privacy & Security > Screen Recording*
|
|
169
|
+
2. **Accessibility:** Required for `click`, `type_text`, `scroll`.
|
|
170
|
+
* *System Settings > Privacy & Security > Accessibility*
|
|
171
|
+
|
|
172
|
+
> **Restart Required:** After granting permissions, you must fully quit and restart the host application.
|
|
173
|
+
|
|
174
|
+
## 🪟 Windows Support
|
|
175
|
+
|
|
176
|
+
Works out of the box on **Windows 10/11**.
|
|
177
|
+
* Uses standard Win32 APIs (GDI, SendInput).
|
|
178
|
+
* OCR uses the built-in Windows Media OCR engine (offline).
|
|
179
|
+
* **Note:** Cannot interact with "Run as Administrator" windows unless the MCP server itself is also running as Administrator.
|
|
180
|
+
|
|
181
|
+
## 📜 License
|
|
182
|
+
|
|
183
|
+
MIT © [sh3ll3x3c](https://github.com/sh3ll3x3c)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-devtools-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "MCP server for testing native desktop applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"bin"
|
|
26
26
|
],
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"@sh3ll3x3c/native-devtools-mcp-darwin-arm64": "0.2.
|
|
29
|
-
"@sh3ll3x3c/native-devtools-mcp-win32-x64": "0.2.
|
|
28
|
+
"@sh3ll3x3c/native-devtools-mcp-darwin-arm64": "0.2.2",
|
|
29
|
+
"@sh3ll3x3c/native-devtools-mcp-win32-x64": "0.2.2"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=18"
|