@roxybrowser/openapi 1.0.5-beta.1 → 1.0.8
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 +222 -228
- package/lib/index.js +97 -1674
- 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 +1501 -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 +724 -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/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/lib/utils/error-analyzer.d.ts +0 -84
- package/lib/utils/error-analyzer.d.ts.map +0 -1
- package/lib/utils/error-analyzer.js +0 -387
- package/lib/utils/error-analyzer.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,228 +1,222 @@
|
|
|
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
|
|
19
|
-
- 📊 **Workspace Support**: Manage browsers across different workspaces and projects
|
|
20
|
-
- 🛠️ **Browser Creation**: Create browsers
|
|
21
|
-
- 🌐 **Proxy Management**:
|
|
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
|
-
### Browser
|
|
69
|
-
- `roxy_list_browsers` - List browsers in a workspace/project with filtering
|
|
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
|
-
→ Uses
|
|
117
|
-
→
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
→ Uses
|
|
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
|
-
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
|
|
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 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 (single or batch) with full configuration
|
|
21
|
+
- 🌐 **Proxy Management**: List, create, detect, and manage proxy configurations
|
|
22
|
+
- 👤 **Account Management**: Manage platform accounts and credentials in workspaces
|
|
23
|
+
- 🔧 **Advanced Configuration**: Fingerprints, cache clear, random fingerprint, and more
|
|
24
|
+
- 🏥 **Health Check**: Server and workspace connectivity diagnostics
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
### Prerequisites
|
|
29
|
+
|
|
30
|
+
1. **RoxyBrowser** installed and running
|
|
31
|
+
2. **RoxyBrowser API** enabled in settings:
|
|
32
|
+
- Open RoxyBrowser → API
|
|
33
|
+
- Set "API Status" to "Enable"
|
|
34
|
+
- Copy your API Key
|
|
35
|
+
- Note the API port (default: 50000)
|
|
36
|
+
|
|
37
|
+
### MCP Client Configuration
|
|
38
|
+
|
|
39
|
+
Add both RoxyBrowser OpenAPI and PlayRoxy MCP to your MCP client configuration:
|
|
40
|
+
|
|
41
|
+
**Claude Desktop / VS Code / Cursor:**
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"roxybrowser-openapi": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["@roxybrowser/openapi@latest"],
|
|
48
|
+
"env": {
|
|
49
|
+
"ROXY_API_KEY": "YOUR API KEY",
|
|
50
|
+
"ROXY_API_HOST": "http://127.0.0.1:50000"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"roxybrowser-playwright-mcp": {
|
|
54
|
+
"command": "npx",
|
|
55
|
+
"args": ["@roxybrowser/playwright-mcp@latest"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Note:** Replace `YOUR API KEY` and `YOUR API HOST` with your actual RoxyBrowser credentials.
|
|
62
|
+
|
|
63
|
+
## Available Tools
|
|
64
|
+
|
|
65
|
+
### Workspace
|
|
66
|
+
- `roxy_list_workspaces` - List all available workspaces and their projects
|
|
67
|
+
|
|
68
|
+
### Browser
|
|
69
|
+
- `roxy_list_browsers` - List browsers in a workspace/project with filtering
|
|
70
|
+
- `roxy_create_browser` - Create a browser with full configuration
|
|
71
|
+
- `roxy_batch_create_browsers` - Create multiple browsers in batch
|
|
72
|
+
- `roxy_open_browsers` - Open browsers and get CDP WebSocket endpoints for automation
|
|
73
|
+
- `roxy_update_browser` - Update existing browser configuration
|
|
74
|
+
- `roxy_close_browsers` - Close running browsers (does NOT free quota)
|
|
75
|
+
- `roxy_delete_browsers` - Delete browser profiles permanently (frees quota)
|
|
76
|
+
- `roxy_get_browser_detail` - Get detailed browser information and configuration
|
|
77
|
+
- `roxy_get_connection_info` - Get CDP endpoints and PIDs for opened browsers
|
|
78
|
+
- `roxy_clear_local_cache` - Clear local browser cache
|
|
79
|
+
- `roxy_clear_server_cache` - Clear server-side browser cache
|
|
80
|
+
- `roxy_random_fingerprint` - Randomize browser fingerprint
|
|
81
|
+
- `roxy_list_labels` - Get browser labels/tags for organization
|
|
82
|
+
|
|
83
|
+
### Proxy
|
|
84
|
+
- `roxy_list_proxies` - List proxy configurations in a workspace
|
|
85
|
+
- `roxy_store_proxies` - Get list of proxies you've purchased (store)
|
|
86
|
+
- `roxy_create_proxy` - Create a proxy configuration
|
|
87
|
+
- `roxy_batch_create_proxies` - Create multiple proxies in batch
|
|
88
|
+
- `roxy_detect_proxy` - Detect/test proxy availability
|
|
89
|
+
- `roxy_modify_proxy` - Modify existing proxy configuration
|
|
90
|
+
- `roxy_delete_proxies` - Delete proxy configurations
|
|
91
|
+
|
|
92
|
+
### Account
|
|
93
|
+
- `roxy_list_accounts` - List platform accounts and credentials in a workspace
|
|
94
|
+
- `roxy_create_account` - Create a platform account
|
|
95
|
+
- `roxy_batch_create_accounts` - Create multiple accounts in batch
|
|
96
|
+
- `roxy_modify_account` - Modify existing account
|
|
97
|
+
- `roxy_delete_accounts` - Delete accounts
|
|
98
|
+
|
|
99
|
+
### Utilities
|
|
100
|
+
- `roxy_health_check` - Server health check and workspace/browser connectivity diagnostics
|
|
101
|
+
|
|
102
|
+
## Complete Workflow Examples
|
|
103
|
+
|
|
104
|
+
### Example 1: Quick Browser Automation Setup
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
1. AI: "Create a browser in workspace 1 with name 'Test Browser'"
|
|
108
|
+
→ Uses roxy_create_browser
|
|
109
|
+
→ Returns browser ID ready for use
|
|
110
|
+
|
|
111
|
+
2. AI: "Open the browser I just created"
|
|
112
|
+
→ Uses roxy_open_browsers with the returned ID
|
|
113
|
+
→ Returns CDP WebSocket URL like: ws://127.0.0.1:52314/devtools/browser/xxx
|
|
114
|
+
|
|
115
|
+
3. AI: "Navigate to gmail.com, login, and send emails"
|
|
116
|
+
→ Uses PlayRoxy MCP tools (browser_navigate, browser_type, browser_click, etc.)
|
|
117
|
+
→ PlayRoxy MCP connects to the opened browser via CDP endpoint
|
|
118
|
+
|
|
119
|
+
4. AI: "Close the browser when done"
|
|
120
|
+
→ Uses roxy_close_browsers
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Example 2: Browser with Proxy
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
1. AI: "Detect my proxy before creating browsers"
|
|
127
|
+
→ Uses roxy_detect_proxy
|
|
128
|
+
→ Confirms proxy is available
|
|
129
|
+
|
|
130
|
+
2. AI: "Create a browser with SOCKS5 proxy and 1920x1080 in workspace 2"
|
|
131
|
+
→ Uses roxy_create_browser with proxy configuration
|
|
132
|
+
→ Returns configured browser ID
|
|
133
|
+
|
|
134
|
+
3. AI: "Open the browser and start automation"
|
|
135
|
+
→ Uses roxy_open_browsers → gets CDP endpoint
|
|
136
|
+
→ PlayRoxy MCP connects and begins automation
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Integration with Playwright MCP
|
|
140
|
+
|
|
141
|
+
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.
|
|
142
|
+
|
|
143
|
+
**PlayRoxy MCP** is based on [Microsoft's Playwright MCP](https://github.com/microsoft/playwright-mcp) with enhancements for RoxyBrowser's fingerprint browser features.
|
|
144
|
+
|
|
145
|
+
### Workflow
|
|
146
|
+
|
|
147
|
+
1. Use RoxyBrowser OpenAPI MCP to create and open browsers
|
|
148
|
+
2. Get CDP WebSocket endpoints from opened browsers
|
|
149
|
+
3. Use PlayRoxy MCP to automate browser tasks with full Playwright capabilities
|
|
150
|
+
|
|
151
|
+
Both servers work together seamlessly when configured in your MCP client (see configuration above).
|
|
152
|
+
|
|
153
|
+
## Development
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Development mode with auto-rebuild
|
|
157
|
+
npm run dev
|
|
158
|
+
|
|
159
|
+
# Build for production
|
|
160
|
+
npm run build
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## API Reference
|
|
164
|
+
|
|
165
|
+
### Environment Variables
|
|
166
|
+
|
|
167
|
+
| Variable | Required | Default | Description |
|
|
168
|
+
|----------|----------|---------|-------------|
|
|
169
|
+
| `ROXY_API_KEY` | ✅ Yes | - | API key from RoxyBrowser settings |
|
|
170
|
+
| `ROXY_API_HOST` | ✅ Yes | `http://127.0.0.1:50000` | RoxyBrowser API endpoint |
|
|
171
|
+
| `ROXY_TIMEOUT` | No | `30000` | Request timeout in milliseconds |
|
|
172
|
+
|
|
173
|
+
## Troubleshooting
|
|
174
|
+
|
|
175
|
+
### Connection Issues
|
|
176
|
+
|
|
177
|
+
**Error: "Failed to connect to RoxyBrowser API"**
|
|
178
|
+
|
|
179
|
+
Check:
|
|
180
|
+
1. RoxyBrowser is running
|
|
181
|
+
2. API is enabled: RoxyBrowser → API → API Status = Enable
|
|
182
|
+
3. Correct API key: Copy from RoxyBrowser → API → API Key
|
|
183
|
+
4. Correct port: Check RoxyBrowser → API → Port Settings (default: 50000)
|
|
184
|
+
5. No firewall blocking http://127.0.0.1:50000
|
|
185
|
+
|
|
186
|
+
### Authentication Issues
|
|
187
|
+
|
|
188
|
+
**Error: "Configuration Error: API key is required"**
|
|
189
|
+
|
|
190
|
+
Set the environment variable:
|
|
191
|
+
```bash
|
|
192
|
+
export ROXY_API_KEY="your_actual_api_key_from_roxybrowser"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Browser Opening Issues
|
|
196
|
+
|
|
197
|
+
**Error: "Insufficient profiles quota" (Code 101 or 409)**
|
|
198
|
+
|
|
199
|
+
Solutions:
|
|
200
|
+
- Purchase more profiles in RoxyBrowser Billing Center
|
|
201
|
+
- **Delete** unused browser profiles using `roxy_delete_browsers` (closing alone does NOT free quota)
|
|
202
|
+
- Upgrade your subscription plan
|
|
203
|
+
- Check current quota usage in workspace settings
|
|
204
|
+
|
|
205
|
+
**Some browsers fail to open:**
|
|
206
|
+
|
|
207
|
+
- Check that the browser profiles exist and are not corrupted
|
|
208
|
+
- Ensure sufficient system resources (RAM, CPU)
|
|
209
|
+
- Verify the dirIds are valid (use `roxy_list_browsers` first)
|
|
210
|
+
- Run `roxy_health_check` for connectivity and health diagnostics
|
|
211
|
+
|
|
212
|
+
## License
|
|
213
|
+
|
|
214
|
+
MIT License - see LICENSE file for details.
|
|
215
|
+
|
|
216
|
+
## Contributing
|
|
217
|
+
|
|
218
|
+
1. Fork the repository
|
|
219
|
+
2. Create a feature branch
|
|
220
|
+
3. Make your changes
|
|
221
|
+
4. Add tests if applicable
|
|
222
|
+
5. Submit a pull request
|