@roxybrowser/openapi 1.0.4 → 1.0.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 +228 -226
- package/lib/index.js +93 -1610
- package/lib/index.js.map +1 -1
- package/lib/modules/account.d.ts +491 -0
- package/lib/modules/account.d.ts.map +1 -0
- package/lib/modules/account.js +442 -0
- package/lib/modules/account.js.map +1 -0
- package/lib/modules/browser.d.ts +3011 -0
- package/lib/modules/browser.d.ts.map +1 -0
- package/lib/modules/browser.js +1076 -0
- package/lib/modules/browser.js.map +1 -0
- package/lib/modules/other.d.ts +102 -0
- package/lib/modules/other.d.ts.map +1 -0
- package/lib/modules/other.js +194 -0
- package/lib/modules/other.js.map +1 -0
- package/lib/modules/proxy.d.ts +576 -0
- package/lib/modules/proxy.d.ts.map +1 -0
- package/lib/modules/proxy.js +713 -0
- package/lib/modules/proxy.js.map +1 -0
- package/lib/types.d.ts +860 -155
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +4 -4
- package/lib/types.js.map +1 -1
- package/lib/utils/error-analyzer.d.ts.map +1 -1
- package/lib/utils/error-analyzer.js +17 -15
- package/lib/utils/error-analyzer.js.map +1 -1
- package/lib/utils/index.d.ts +24 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +45 -0
- package/lib/utils/index.js.map +1 -0
- package/package.json +50 -50
- package/lib/browser/browser-creator.d.ts +0 -54
- package/lib/browser/browser-creator.d.ts.map +0 -1
- package/lib/browser/browser-creator.js +0 -263
- package/lib/browser/browser-creator.js.map +0 -1
- package/lib/proxy/proxy-manager.d.ts +0 -67
- package/lib/proxy/proxy-manager.d.ts.map +0 -1
- package/lib/proxy/proxy-manager.js +0 -278
- package/lib/proxy/proxy-manager.js.map +0 -1
- package/lib/proxy/proxy-validator.d.ts +0 -66
- package/lib/proxy/proxy-validator.d.ts.map +0 -1
- package/lib/proxy/proxy-validator.js +0 -273
- package/lib/proxy/proxy-validator.js.map +0 -1
- package/lib/roxy-client.d.ts +0 -117
- package/lib/roxy-client.d.ts.map +0 -1
- package/lib/roxy-client.js +0 -467
- package/lib/roxy-client.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,226 +1,228 @@
|
|
|
1
|
-
# RoxyBrowser MCP Server [Beta]
|
|
2
|
-
|
|
3
|
-
[English](README.md) | [中文](README_CN.md)
|
|
4
|
-
|
|
5
|
-
> **⚠️ BETA VERSION NOTICE**
|
|
6
|
-
>
|
|
7
|
-
> This project is currently in **beta testing and active development**. While we strive for stability, please exercise caution when using this tool in production environments or with critical assets. We recommend closely monitoring software and browser operations when using it with MCP clients to avoid unnecessary losses.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
- `
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- `
|
|
70
|
-
- `
|
|
71
|
-
- `
|
|
72
|
-
- `
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- `
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- `
|
|
83
|
-
- `
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
|
157
|
-
|
|
158
|
-
| `
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
|
165
|
-
|
|
166
|
-
| **
|
|
167
|
-
| **
|
|
168
|
-
| **
|
|
169
|
-
| **
|
|
170
|
-
| **
|
|
171
|
-
| **
|
|
172
|
-
| **
|
|
173
|
-
| **
|
|
174
|
-
| **
|
|
175
|
-
| **
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
1
|
+
# RoxyBrowser MCP Server [Beta]
|
|
2
|
+
|
|
3
|
+
[English](README.md) | [中文](README_CN.md)
|
|
4
|
+
|
|
5
|
+
> **⚠️ BETA VERSION NOTICE**
|
|
6
|
+
>
|
|
7
|
+
> This project is currently in **beta testing and active development**. While we strive for stability, please exercise caution when using this tool in production environments or with critical assets. We recommend closely monitoring software and browser operations when using it with MCP clients to avoid unnecessary losses.
|
|
8
|
+
>
|
|
9
|
+
>For more details, please refer to: [RoxyBrowser Now Supports MCP — AI Can Finally Do the Work for You](https://roxybrowser.com/blog/roxybrowser-mcp-integration)
|
|
10
|
+
|
|
11
|
+
A Model Context Protocol (MCP) server for [RoxyBrowser](https://www.roxybrowser.com/) that provides AI assistants with the ability to manage browser instances and obtain Chrome DevTools Protocol (CDP) WebSocket endpoints for automation.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- 🚀 **Browser Management**: Open and close RoxyBrowser instances programmatically
|
|
16
|
+
- 🔗 **CDP Integration**: Get WebSocket endpoints for Chrome DevTools Protocol automation
|
|
17
|
+
- 🤖 **AI-Friendly**: Seamlessly integrates with AI assistants through MCP
|
|
18
|
+
- 🎯 **Playwright Ready**: Works perfectly with [PlayRoxy MCP](https://github.com/roxybrowserlabs/playroxy-mcp) (RoxyBrowser's customized Playwright MCP)
|
|
19
|
+
- 📊 **Workspace Support**: Manage browsers across different workspaces and projects
|
|
20
|
+
- 🛠️ **Browser Creation**: Create browsers with layered complexity (Simple, Standard, Advanced)
|
|
21
|
+
- 🌐 **Proxy Management**: Built-in proxy validation, testing, and configuration tools
|
|
22
|
+
- 🔧 **Advanced Configuration**: Full control over fingerprints, proxies, and browser settings
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
### Prerequisites
|
|
27
|
+
|
|
28
|
+
1. **RoxyBrowser** installed and running
|
|
29
|
+
2. **RoxyBrowser API** enabled in settings:
|
|
30
|
+
- Open RoxyBrowser → API
|
|
31
|
+
- Set "API Status" to "Enable"
|
|
32
|
+
- Copy your API Key
|
|
33
|
+
- Note the API port (default: 50000)
|
|
34
|
+
|
|
35
|
+
### MCP Client Configuration
|
|
36
|
+
|
|
37
|
+
Add both RoxyBrowser OpenAPI and PlayRoxy MCP to your MCP client configuration:
|
|
38
|
+
|
|
39
|
+
**Claude Desktop / VS Code / Cursor:**
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"roxybrowser-openapi": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["@roxybrowser/openapi@latest"],
|
|
46
|
+
"env": {
|
|
47
|
+
"ROXY_API_KEY": "YOUR API KEY",
|
|
48
|
+
"ROXY_API_HOST": "http://127.0.0.1:50000"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"roxybrowser-playwright-mcp": {
|
|
52
|
+
"command": "npx",
|
|
53
|
+
"args": ["@roxybrowser/playwright-mcp@latest"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Note:** Replace `YOUR API KEY` and `YOUR API HOST` with your actual RoxyBrowser credentials.
|
|
60
|
+
|
|
61
|
+
## Available Tools
|
|
62
|
+
|
|
63
|
+
### Workspace & Project Management
|
|
64
|
+
- `roxy_list_workspaces` - List all available workspaces and their projects
|
|
65
|
+
- `roxy_list_accounts` - Get platform accounts and credentials in a workspace
|
|
66
|
+
- `roxy_list_labels` - Get browser labels/tags for organization
|
|
67
|
+
|
|
68
|
+
### Browser Management
|
|
69
|
+
- `roxy_list_browsers` - List browsers in a workspace/project with filtering
|
|
70
|
+
- `roxy_get_browser_detail` - Get detailed browser information and configuration
|
|
71
|
+
- `roxy_open_browsers` - Open browsers and get CDP WebSocket endpoints for automation
|
|
72
|
+
- `roxy_close_browsers` - Close running browsers (does NOT free quota)
|
|
73
|
+
- `roxy_delete_browsers` - Delete browser profiles permanently (frees quota)
|
|
74
|
+
- `roxy_get_connection_info` - Get CDP endpoints and PIDs for opened browsers
|
|
75
|
+
|
|
76
|
+
### Browser Creation
|
|
77
|
+
- `roxy_create_browser_simple` - Create browser with basic configuration
|
|
78
|
+
- `roxy_create_browser_standard` - Create browser with common settings (OS, proxy, window size, etc.)
|
|
79
|
+
- `roxy_create_browser_advanced` - Create browser with full control (fingerprint, platform accounts, etc.)
|
|
80
|
+
|
|
81
|
+
### Browser Maintenance
|
|
82
|
+
- `roxy_update_browser` - Update existing browser configuration
|
|
83
|
+
- `roxy_random_fingerprint` - Randomize browser fingerprint
|
|
84
|
+
- `roxy_clear_local_cache` - Clear local browser cache
|
|
85
|
+
- `roxy_clear_server_cache` - Clear server-side browser cache
|
|
86
|
+
|
|
87
|
+
### Utilities
|
|
88
|
+
- `roxy_validate_proxy_config` - Validate proxy configuration
|
|
89
|
+
- `roxy_system_diagnostics` - System health check and diagnostics
|
|
90
|
+
|
|
91
|
+
## Complete Workflow Examples
|
|
92
|
+
|
|
93
|
+
### Example 1: Quick Browser Automation Setup
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
1. AI: "Create a simple browser in workspace 1 with name 'Test Browser'"
|
|
97
|
+
→ Uses roxy_create_browser_simple
|
|
98
|
+
→ Returns browser ID ready for use
|
|
99
|
+
|
|
100
|
+
2. AI: "Open the browser I just created"
|
|
101
|
+
→ Uses roxy_open_browsers with the returned ID
|
|
102
|
+
→ Returns CDP WebSocket URL like: ws://127.0.0.1:52314/devtools/browser/xxx
|
|
103
|
+
|
|
104
|
+
3. AI: "Navigate to gmail.com, login, and send emails"
|
|
105
|
+
→ Uses PlayRoxy MCP tools automatically (browser_navigate, browser_type, browser_click, etc.)
|
|
106
|
+
→ PlayRoxy MCP connects to the opened browser via CDP endpoint
|
|
107
|
+
|
|
108
|
+
4. AI: "Close the browser when done"
|
|
109
|
+
→ Uses roxy_close_browsers
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Example 2: Advanced Browser with Proxy Setup
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
1. AI: "Validate my proxy configuration before creating browsers"
|
|
116
|
+
→ Uses roxy_validate_proxy_config
|
|
117
|
+
→ Confirms proxy settings are correct
|
|
118
|
+
|
|
119
|
+
2. AI: "Create a standard browser with SOCKS5 proxy and 1920x1080 resolution in workspace 2"
|
|
120
|
+
→ Uses roxy_create_browser_standard with proxy configuration
|
|
121
|
+
→ Returns configured browser ID
|
|
122
|
+
|
|
123
|
+
3. AI: "Open the browser and start automation"
|
|
124
|
+
→ Uses roxy_open_browsers → gets CDP endpoint
|
|
125
|
+
→ PlayRoxy MCP automatically connects and begins automation tasks
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Integration with Playwright MCP
|
|
129
|
+
|
|
130
|
+
RoxyBrowser MCP is designed to work seamlessly with [PlayRoxy MCP](https://github.com/roxybrowserlabs/playroxy-mcp), our customized Playwright MCP server built specifically for RoxyBrowser compatibility.
|
|
131
|
+
|
|
132
|
+
**PlayRoxy MCP** is based on [Microsoft's Playwright MCP](https://github.com/microsoft/playwright-mcp) with enhancements for RoxyBrowser's fingerprint browser features.
|
|
133
|
+
|
|
134
|
+
### Workflow
|
|
135
|
+
|
|
136
|
+
1. Use RoxyBrowser OpenAPI MCP to create and open browsers
|
|
137
|
+
2. Get CDP WebSocket endpoints from opened browsers
|
|
138
|
+
3. Use PlayRoxy MCP to automate browser tasks with full Playwright capabilities
|
|
139
|
+
|
|
140
|
+
Both servers work together seamlessly when configured in your MCP client (see configuration above).
|
|
141
|
+
|
|
142
|
+
## Development
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Development mode with auto-rebuild
|
|
146
|
+
npm run dev
|
|
147
|
+
|
|
148
|
+
# Build for production
|
|
149
|
+
npm run build
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## API Reference
|
|
153
|
+
|
|
154
|
+
### Environment Variables
|
|
155
|
+
|
|
156
|
+
| Variable | Required | Default | Description |
|
|
157
|
+
|----------|----------|---------|-------------|
|
|
158
|
+
| `ROXY_API_KEY` | ✅ Yes | - | API key from RoxyBrowser settings |
|
|
159
|
+
| `ROXY_API_HOST` | ✅ Yes | `http://127.0.0.1:50000` | RoxyBrowser API endpoint |
|
|
160
|
+
| `ROXY_TIMEOUT` | No | `30000` | Request timeout in milliseconds |
|
|
161
|
+
|
|
162
|
+
### Error Codes
|
|
163
|
+
|
|
164
|
+
| Code | Name | Description |
|
|
165
|
+
|------|------|-------------|
|
|
166
|
+
| **0** | SUCCESS | Operation completed successfully |
|
|
167
|
+
| **101** | INSUFFICIENT_QUOTA | Insufficient profiles quota |
|
|
168
|
+
| **400** | INVALID_PARAMS | Invalid parameters provided |
|
|
169
|
+
| **401** | UNAUTHORIZED | Authentication failed - invalid API key |
|
|
170
|
+
| **403** | FORBIDDEN | Access denied - insufficient permissions |
|
|
171
|
+
| **404** | NOT_FOUND | Resource not found |
|
|
172
|
+
| **408** | TIMEOUT | Request timeout |
|
|
173
|
+
| **409** | CONFLICT | Resource conflict or insufficient quota |
|
|
174
|
+
| **500** | SERVER_ERROR | Internal server error |
|
|
175
|
+
| **502** | BAD_GATEWAY | Bad gateway - proxy or network issue |
|
|
176
|
+
| **503** | SERVICE_UNAVAILABLE | Service temporarily unavailable |
|
|
177
|
+
| **504** | GATEWAY_TIMEOUT | Gateway timeout |
|
|
178
|
+
|
|
179
|
+
## Troubleshooting
|
|
180
|
+
|
|
181
|
+
### Connection Issues
|
|
182
|
+
|
|
183
|
+
**Error: "Failed to connect to RoxyBrowser API"**
|
|
184
|
+
|
|
185
|
+
Check:
|
|
186
|
+
1. RoxyBrowser is running
|
|
187
|
+
2. API is enabled: RoxyBrowser → API → API Status = Enable
|
|
188
|
+
3. Correct API key: Copy from RoxyBrowser → API → API Key
|
|
189
|
+
4. Correct port: Check RoxyBrowser → API → Port Settings (default: 50000)
|
|
190
|
+
5. No firewall blocking http://127.0.0.1:50000
|
|
191
|
+
|
|
192
|
+
### Authentication Issues
|
|
193
|
+
|
|
194
|
+
**Error: "Configuration Error: API key is required"**
|
|
195
|
+
|
|
196
|
+
Set the environment variable:
|
|
197
|
+
```bash
|
|
198
|
+
export ROXY_API_KEY="your_actual_api_key_from_roxybrowser"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Browser Opening Issues
|
|
202
|
+
|
|
203
|
+
**Error: "Insufficient profiles quota" (Code 101 or 409)**
|
|
204
|
+
|
|
205
|
+
Solutions:
|
|
206
|
+
- Purchase more profiles in RoxyBrowser Billing Center
|
|
207
|
+
- **Delete** unused browser profiles using `roxy_delete_browsers` (closing alone does NOT free quota)
|
|
208
|
+
- Upgrade your subscription plan
|
|
209
|
+
- Check current quota usage in workspace settings
|
|
210
|
+
|
|
211
|
+
**Some browsers fail to open:**
|
|
212
|
+
|
|
213
|
+
- Check that the browser profiles exist and are not corrupted
|
|
214
|
+
- Ensure sufficient system resources (RAM, CPU)
|
|
215
|
+
- Verify the dirIds are valid (use `roxy_list_browsers` first)
|
|
216
|
+
- Run `roxy_system_diagnostics` for comprehensive health check
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
MIT License - see LICENSE file for details.
|
|
221
|
+
|
|
222
|
+
## Contributing
|
|
223
|
+
|
|
224
|
+
1. Fork the repository
|
|
225
|
+
2. Create a feature branch
|
|
226
|
+
3. Make your changes
|
|
227
|
+
4. Add tests if applicable
|
|
228
|
+
5. Submit a pull request
|