mobilecoder-mcp 2.1.4 → 2.1.5
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 +67 -280
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,331 +1,118 @@
|
|
|
1
|
-
# MobileCoder
|
|
1
|
+
# 🔐 MobileCoder ZK-Relay Agent (v2.1.5)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> **Zero-Knowledge. Zero-Trust. Total Connectivity.**
|
|
4
|
+
> Securely bridge your mobile device to your desktop IDE (Cursor, Windsurf, VSCode) with military-grade encryption.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **QR Code Quick Connect** - Scan and connect in seconds
|
|
10
|
-
- **End-to-End Encryption** - DTLS-secured WebRTC connections
|
|
11
|
-
- **Universal IDE Support** - Works with Cursor, Windsurf, and VSCode
|
|
12
|
-
- **Real-Time Sync** - Low-latency signaling over WebSocket
|
|
13
|
-
- **Security Hardened** - HMAC integrity, SDP validation, replay protection
|
|
6
|
+
[](https://www.npmjs.com/package/mobilecoder-mcp)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[]()
|
|
14
9
|
|
|
15
10
|
---
|
|
16
11
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
### Security Hardening & Stability
|
|
20
|
-
|
|
21
|
-
This version brings critical security improvements to ensure robust WebRTC signaling and data integrity.
|
|
12
|
+
## ⚡ Why ZK-Relay?
|
|
22
13
|
|
|
23
|
-
-
|
|
14
|
+
The MobileCoder ZK-Relay architecture replaces traditional WebRTC to ensure **100% connectivity** even behind strict corporate firewalls and complex NATs, without compromising on privacy.
|
|
24
15
|
|
|
25
|
-
- **
|
|
16
|
+
- **Zero-Trust Relay**: The server only acts as a blind mailbox. It cannot see, decrypt, or store your data.
|
|
17
|
+
- **End-to-End Encryption**: Every message is encrypted on your device and decrypted on your mobile (AES-256-CBC).
|
|
18
|
+
- **Universal Bypass**: No more "ICE Connection Failed". If you have internet, you have a connection.
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
---
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
## 🛡️ Security Features
|
|
30
23
|
|
|
31
|
-
|
|
24
|
+
We've hardened version 2.1.x with advanced cryptographic protocols:
|
|
32
25
|
|
|
33
|
-
-
|
|
26
|
+
- **🔐 PBKDF2 Key Derivation**: Your 6-digit pairing code is strengthened using PBKDF2-SHA256 with **100,000 iterations** to derive a master encryption key.
|
|
27
|
+
- **🔄 Perfect Forward Secrecy (PFS)**: Session keys are automatically rotated every **10 minutes**. Even if one key is compromised, your past sessions remain secure.
|
|
28
|
+
- **🛡️ Replay Attack Prevention**: Every message includes a unique **nonce (IV)** and a **timestamp**. Expired or duplicate messages are rejected.
|
|
29
|
+
- **☁️ Ephemeral Sessions**: No data ever touches a disk. All communication is held in memory and destroyed immediately after the session ends.
|
|
34
30
|
|
|
35
31
|
---
|
|
36
32
|
|
|
37
|
-
## Installation
|
|
38
|
-
|
|
39
|
-
### Global Install
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm install -g mobilecoder-mcp@latest
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Using npx (No Install Required)
|
|
33
|
+
## 🚀 Installation
|
|
46
34
|
|
|
35
|
+
### Using npx (Recommended)
|
|
36
|
+
No installation required. Run the latest version directly:
|
|
47
37
|
```bash
|
|
48
38
|
npx mobilecoder-mcp@latest init
|
|
49
39
|
```
|
|
50
40
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## Quick Start
|
|
54
|
-
|
|
55
|
-
### 1. Initialize Connection
|
|
56
|
-
|
|
41
|
+
### Global Install
|
|
57
42
|
```bash
|
|
58
|
-
mobilecoder-mcp
|
|
43
|
+
npm install -g mobilecoder-mcp@latest
|
|
59
44
|
```
|
|
60
45
|
|
|
61
|
-
This will:
|
|
62
|
-
- Generate a unique 6-character pairing code
|
|
63
|
-
- Display a QR code for mobile scanning
|
|
64
|
-
- Automatically configure your IDEs (Cursor, Windsurf, VSCode)
|
|
65
|
-
- Start the MCP server
|
|
66
|
-
|
|
67
|
-
### 2. Connect Mobile Device
|
|
68
|
-
|
|
69
|
-
1. Visit [https://mobilecoder.xyz/connect](https://mobilecoder.xyz/connect) on your mobile device
|
|
70
|
-
2. Enter the pairing code displayed in terminal
|
|
71
|
-
3. Alternatively, scan the QR code shown in terminal
|
|
72
|
-
|
|
73
|
-
### 3. Start Coding
|
|
74
|
-
|
|
75
|
-
Your mobile device is now connected! Use it to:
|
|
76
|
-
- Generate code with AI assistance
|
|
77
|
-
- Execute terminal commands
|
|
78
|
-
- Browse and edit files
|
|
79
|
-
- Get real-time feedback
|
|
80
|
-
|
|
81
46
|
---
|
|
82
47
|
|
|
83
|
-
##
|
|
84
|
-
|
|
85
|
-
### `mobilecoder-mcp init`
|
|
86
|
-
|
|
87
|
-
Initialize a new connection, generate QR code, and start the agent.
|
|
48
|
+
## 🛠️ Quick Start
|
|
88
49
|
|
|
50
|
+
### 1. Initialize
|
|
51
|
+
Run the agent in your project directory:
|
|
89
52
|
```bash
|
|
90
53
|
mobilecoder-mcp init
|
|
91
54
|
```
|
|
55
|
+
This command will:
|
|
56
|
+
- Generate a secure 6-digit session code.
|
|
57
|
+
- Display a **QR Code** for instant mobile pairing.
|
|
58
|
+
- Start the encrypted relay client.
|
|
59
|
+
- Automatically detect and optimize for your IDE (**Cursor**, **Windsurf**, or **VSCode**).
|
|
92
60
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
- `--debug` - Enable debug logging
|
|
96
|
-
|
|
97
|
-
### `mobilecoder-mcp start`
|
|
98
|
-
|
|
99
|
-
Start the agent with an existing connection code.
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
mobilecoder-mcp start --code=ABC123
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**Options:**
|
|
106
|
-
- `-c, --code <code>` - Your 6-character connection code (required)
|
|
107
|
-
- `-s, --signaling <url>` - Custom signaling server URL
|
|
108
|
-
- `--debug` - Enable debug logging
|
|
109
|
-
|
|
110
|
-
### `mobilecoder-mcp reset`
|
|
111
|
-
|
|
112
|
-
Remove MobileCoderMCP configuration from IDEs.
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
mobilecoder-mcp reset
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Options:**
|
|
119
|
-
- `-i, --ide <ide>` - Specific IDE to reset (cursor, windsurf, vscode, all)
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Environment Variables
|
|
124
|
-
|
|
125
|
-
| Variable | Description | Default |
|
|
126
|
-
|----------|-------------|---------|
|
|
127
|
-
| `MCP_SIGNALING_URL` | Signaling server URL | `https://api.mobilecoder.xyz/api` |
|
|
128
|
-
| `MOBILE_CODER_WEB_URL` | Web app URL for QR codes | `https://mobilecoder.xyz` |
|
|
129
|
-
| `MCP_CONNECTION_CODE` | Pre-defined connection code | Auto-generated |
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## How It Works
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
[Desktop IDE] WebRTC (P2P) [Mobile Device]
|
|
137
|
-
|
|
138
|
-
[MCP Server] Signaling (WebSocket) [Web App]
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
1. **Desktop**: MCP server starts, generates pairing code
|
|
142
|
-
2. **Mobile**: User enters code on web app
|
|
143
|
-
3. **Signaling**: Server facilitates WebRTC handshake
|
|
144
|
-
4. **P2P Connection**: Direct peer-to-peer connection established
|
|
145
|
-
5. **Data Flow**: Commands/results flow directly (no server middleman)
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## IDE Configuration
|
|
150
|
-
|
|
151
|
-
The `init` command automatically configures supported IDEs:
|
|
152
|
-
|
|
153
|
-
### Cursor
|
|
154
|
-
```json
|
|
155
|
-
~/.cursor/mcp.json
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### Windsurf
|
|
159
|
-
```json
|
|
160
|
-
~/.codeium/windsurf/mcp_config.json
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### VSCode
|
|
164
|
-
```json
|
|
165
|
-
~/.vscode/mcp.json
|
|
166
|
-
```
|
|
61
|
+
### 2. Connect
|
|
62
|
+
Scan the QR code or visit [mobilecoder.xyz](https://mobilecoder.xyz) on your mobile device and enter the code.
|
|
167
63
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
"command": "npx",
|
|
175
|
-
"args": ["mobilecoder-mcp", "start", "--code", "YOUR_CODE", "--signaling", "https://api.mobilecoder.xyz/api"],
|
|
176
|
-
"env": {
|
|
177
|
-
"MCP_CONNECTION_CODE": "YOUR_CODE",
|
|
178
|
-
"MCP_SIGNALING_URL": "https://api.mobilecoder.xyz/api"
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
```
|
|
64
|
+
### 3. Build from Anywhere
|
|
65
|
+
Use your mobile phone to:
|
|
66
|
+
- ✍️ Write and edit code with AI assistance.
|
|
67
|
+
- 🐚 Execute terminal commands.
|
|
68
|
+
- 📂 Browse project files.
|
|
69
|
+
- 🚀 Deploy applications.
|
|
184
70
|
|
|
185
71
|
---
|
|
186
72
|
|
|
187
|
-
##
|
|
188
|
-
|
|
189
|
-
### End-to-End Encryption
|
|
190
|
-
|
|
191
|
-
- **DTLS 1.2/1.3**: All WebRTC media encrypted
|
|
192
|
-
- **HMAC-SHA256**: Message integrity verification
|
|
193
|
-
- **SDP Validation**: Malicious payload prevention
|
|
194
|
-
- **Nonce Tracking**: Replay attack protection
|
|
195
|
-
|
|
196
|
-
### Data Privacy
|
|
73
|
+
## ⌨️ CLI Commands
|
|
197
74
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
1. **Use HTTPS**: Always in production (enforced by default)
|
|
205
|
-
2. **Secure Codes**: Connection codes expire after 5 minutes
|
|
206
|
-
3. **Rate Limiting**: Signaling endpoints protected
|
|
207
|
-
4. **CORS Whitelist**: Only authorized origins allowed
|
|
75
|
+
| Command | Description |
|
|
76
|
+
|---------|-------------|
|
|
77
|
+
| `init` | Start a new secure session with a fresh QR code. |
|
|
78
|
+
| `start --code=XXXXXX` | Resume a session with a specific code. |
|
|
79
|
+
| `--debug` | Enable detailed JSON-RPC and Relay logging. |
|
|
80
|
+
| `--signaling <url>` | Use a custom signaling/relay server. |
|
|
208
81
|
|
|
209
82
|
---
|
|
210
83
|
|
|
211
|
-
##
|
|
212
|
-
|
|
213
|
-
### Connection Issues
|
|
84
|
+
## 🏗️ Architecture
|
|
214
85
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
- Ensure signaling server is running: `curl https://api.mobilecoder.xyz/api/health`
|
|
221
|
-
|
|
222
|
-
### WebRTC Handshake Fails
|
|
223
|
-
|
|
224
|
-
**Problem**: "ICE connection failed" or "No remote candidate"
|
|
225
|
-
|
|
226
|
-
**Solutions**:
|
|
227
|
-
- Check firewall settings (UDP ports 3478, 5349)
|
|
228
|
-
- Verify TURN server is accessible
|
|
229
|
-
- Try different network (disable VPN if needed)
|
|
230
|
-
|
|
231
|
-
### Code Already in Use
|
|
232
|
-
|
|
233
|
-
**Problem**: "Connection code is already in use"
|
|
234
|
-
|
|
235
|
-
**Solution**:
|
|
236
|
-
- Wait 2 minutes for code to expire
|
|
237
|
-
- Or generate new code: `mobilecoder-mcp init`
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## Development
|
|
242
|
-
|
|
243
|
-
### Build from Source
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
git clone https://github.com/hasmetdurak/mobilecoder-mcp.git
|
|
247
|
-
cd mobilecoder-mcp/mcp-server
|
|
248
|
-
npm install
|
|
249
|
-
npm run build
|
|
250
|
-
npm link
|
|
86
|
+
```text
|
|
87
|
+
[Desktop IDE] <---> [ZK-Relay Agent] <--- Encrypted Channel (AES-256) ---> [Mobile Client]
|
|
88
|
+
| |
|
|
89
|
+
+----------- [ Blind Relay Server ] -----------------+
|
|
90
|
+
(Blindly relays encrypted packets)
|
|
251
91
|
```
|
|
252
92
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Run Debug Mode
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
mobilecoder-mcp init --debug
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
---
|
|
266
|
-
|
|
267
|
-
## Architecture
|
|
268
|
-
|
|
269
|
-
### MCP Server
|
|
270
|
-
|
|
271
|
-
```
|
|
272
|
-
mcp-server/
|
|
273
|
-
├── src/
|
|
274
|
-
│ ├── index.ts # CLI entry point
|
|
275
|
-
│ ├── agent.ts # Universal MCP agent
|
|
276
|
-
│ ├── webrtc.ts # WebRTC connection manager
|
|
277
|
-
│ ├── security.ts # HMAC & validation
|
|
278
|
-
│ ├── mcp-handler.ts # MCP tool handlers
|
|
279
|
-
│ ├── tool-detector.ts # IDE tool detection
|
|
280
|
-
│ └── adapters/
|
|
281
|
-
│ └── cli-adapter.ts # CLI-specific adapters
|
|
282
|
-
├── dist/ # Compiled JavaScript
|
|
283
|
-
└── package.json
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### Dependencies
|
|
287
|
-
|
|
288
|
-
- `@modelcontextprotocol/sdk` - MCP protocol implementation
|
|
289
|
-
- `simple-peer` - WebRTC wrapper for Node.js
|
|
290
|
-
- `@roamhq/wrtc` - Native WebRTC bindings
|
|
291
|
-
- `commander` - CLI framework
|
|
292
|
-
- `qrcode-terminal` - Terminal QR codes
|
|
93
|
+
1. **Handshake**: Devices perform a PBKDF2-based key exchange.
|
|
94
|
+
2. **Encryption**: Desktop encrypts data locally with a 256-bit key.
|
|
95
|
+
3. **Relay**: Encrypted packets flow through our high-speed relay server.
|
|
96
|
+
4. **Decryption**: Mobile client decrypts data using the same derived key.
|
|
293
97
|
|
|
294
98
|
---
|
|
295
99
|
|
|
296
|
-
## Contributing
|
|
297
|
-
|
|
298
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
100
|
+
## 🤝 Contributing
|
|
299
101
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
102
|
+
We welcome security audits and features!
|
|
103
|
+
1. Fork the repo.
|
|
104
|
+
2. Create your branch: `git checkout -b feat/secure-terminal`.
|
|
105
|
+
3. Commit changes: `git commit -m 'Add biometric auth'`.
|
|
106
|
+
4. Push to branch: `git push origin feat/secure-terminal`.
|
|
107
|
+
5. Open a Pull Request.
|
|
305
108
|
|
|
306
109
|
---
|
|
307
110
|
|
|
308
|
-
## License
|
|
309
|
-
|
|
310
|
-
MIT License - see LICENSE file for details
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
## Support
|
|
111
|
+
## 📄 License & Support
|
|
315
112
|
|
|
113
|
+
- **License**: MIT
|
|
316
114
|
- **Issues**: [GitHub Issues](https://github.com/hasmetdurak/mobilecoder-mcp/issues)
|
|
317
|
-
- **
|
|
318
|
-
- **API Docs**: [https://api.mobilecoder.xyz](https://api.mobilecoder.xyz)
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## Acknowledgments
|
|
323
|
-
|
|
324
|
-
Built with:
|
|
325
|
-
- [Model Context Protocol (MCP)](https://modelcontextprotocol.io)
|
|
326
|
-
- [Simple Peer](https://github.com/feross/simple-peer)
|
|
327
|
-
- [WebRTC](https://webrtc.org/)
|
|
115
|
+
- **Website**: [mobilecoder.xyz](https://mobilecoder.xyz)
|
|
328
116
|
|
|
329
117
|
---
|
|
330
|
-
|
|
331
|
-
**Version**: 1.0.3 | **Author**: @hasmetdurak | **License**: MIT
|
|
118
|
+
**Version**: 2.1.5 | **Author**: @hasmetdurak | **Built for the Future of Mobile Coding.**
|
package/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ const program = new commander_1.Command();
|
|
|
11
11
|
program
|
|
12
12
|
.name('mobilecoder-mcp')
|
|
13
13
|
.description('MobileCoder Desktop Agent - ZK-Relay Edition')
|
|
14
|
-
.version('2.1.
|
|
14
|
+
.version('2.1.5');
|
|
15
15
|
program
|
|
16
16
|
.command('init')
|
|
17
17
|
.description('Start the secure relay agent')
|