@testingbot/mcp-server 1.0.0
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/LICENSE +21 -0
- package/README.md +661 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 TestingBot
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,661 @@
|
|
|
1
|
+
# TestingBot MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@testingbot/mcp-server)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
TestingBot's official Model Context Protocol (MCP) server implementation. This server enables AI assistants to interact with TestingBot's testing infrastructure, allowing you to manage tests, browsers, devices, and more through conversational interfaces.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- ๐ฅ๏ธ **Live Testing** - Start interactive manual testing sessions on real browsers and devices
|
|
11
|
+
- ๐ **Browser & Device Management** - Query available browsers and real devices
|
|
12
|
+
- ๐งช **Test Management** - Create, retrieve, update, and delete tests with comprehensive details
|
|
13
|
+
- ๐ฆ **Storage Management** - Upload and manage mobile app files (APK, IPA)
|
|
14
|
+
- ๐ธ **Screenshot Testing** - Take cross-browser screenshots
|
|
15
|
+
- ๐๏ธ **Build Management** - Organize tests into builds
|
|
16
|
+
- ๐ค **User Account** - View and update account information
|
|
17
|
+
- ๐ฅ **Team Management** - Manage team settings and team members
|
|
18
|
+
- ๐ **Chrome DevTools Protocol** - Create CDP sessions for advanced browser automation
|
|
19
|
+
- ๐ **Tunnel Management** - Manage TestingBot tunnels for local testing
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
- **Node.js** >= 18 (recommended: 22.15.0 or later)
|
|
24
|
+
- **TestingBot Account** with API credentials
|
|
25
|
+
- An MCP-compatible client (Claude Desktop, VS Code with Continue, Cursor, etc.)
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
### Quick Setup
|
|
30
|
+
|
|
31
|
+
Install the MCP server globally:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install -g @testingbot/mcp-server
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or add to your project:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install @testingbot/mcp-server
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Configuration
|
|
44
|
+
|
|
45
|
+
#### Environment Variables
|
|
46
|
+
|
|
47
|
+
Set your TestingBot credentials as environment variables:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
export TESTINGBOT_KEY="your-api-key"
|
|
51
|
+
export TESTINGBOT_SECRET="your-api-secret"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Or create a `.env` file in your project:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
TESTINGBOT_KEY=your-api-key
|
|
58
|
+
TESTINGBOT_SECRET=your-api-secret
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Claude Desktop
|
|
62
|
+
|
|
63
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%/Claude/claude_desktop_config.json` (Windows):
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"testingbot": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["-y", "@testingbot/mcp-server"],
|
|
71
|
+
"env": {
|
|
72
|
+
"TESTINGBOT_KEY": "your-api-key",
|
|
73
|
+
"TESTINGBOT_SECRET": "your-api-secret"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### VS Code (with Continue extension)
|
|
81
|
+
|
|
82
|
+
Add to `.continue/config.json`:
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"mcpServers": [
|
|
87
|
+
{
|
|
88
|
+
"name": "testingbot",
|
|
89
|
+
"command": "npx",
|
|
90
|
+
"args": ["-y", "@testingbot/mcp-server"],
|
|
91
|
+
"env": {
|
|
92
|
+
"TESTINGBOT_KEY": "your-api-key",
|
|
93
|
+
"TESTINGBOT_SECRET": "your-api-secret"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
#### Cursor
|
|
101
|
+
|
|
102
|
+
Add to `.cursor/mcp.json`:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mcpServers": {
|
|
107
|
+
"testingbot": {
|
|
108
|
+
"command": "npx",
|
|
109
|
+
"args": ["-y", "@testingbot/mcp-server"],
|
|
110
|
+
"env": {
|
|
111
|
+
"TESTINGBOT_KEY": "your-api-key",
|
|
112
|
+
"TESTINGBOT_SECRET": "your-api-secret"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Available Tools
|
|
120
|
+
|
|
121
|
+
### Live Testing
|
|
122
|
+
|
|
123
|
+
#### `startLiveSession`
|
|
124
|
+
Start an interactive live testing session on TestingBot. Opens a real browser or mobile device for manual testing.
|
|
125
|
+
|
|
126
|
+
**Parameters:**
|
|
127
|
+
- `platformType`: "desktop" or "mobile"
|
|
128
|
+
- `desiredURL`: The URL to open
|
|
129
|
+
- `desiredOS`: Operating system (Windows, Mac, Linux for desktop; android, ios for mobile)
|
|
130
|
+
- `desiredOSVersion`: OS version
|
|
131
|
+
- `desiredBrowser` (desktop only): Browser name (chrome, firefox, safari, edge, ie)
|
|
132
|
+
- `desiredBrowserVersion` (desktop only): Browser version or "latest"
|
|
133
|
+
- `desiredDevice` (mobile only): Device name (e.g., "iPhone 14", "Galaxy S23")
|
|
134
|
+
|
|
135
|
+
**Example prompts:**
|
|
136
|
+
> "Start a live testing session on Chrome latest with Windows 11 for https://example.com"
|
|
137
|
+
> "Open https://myapp.com on iPhone 14 with iOS 16 for manual testing"
|
|
138
|
+
|
|
139
|
+
#### `startDesktopLiveSession`
|
|
140
|
+
Convenience tool to start a desktop browser live testing session.
|
|
141
|
+
|
|
142
|
+
**Parameters:**
|
|
143
|
+
- `desiredURL`: The URL to open
|
|
144
|
+
- `desiredOS`: Windows, Mac, or Linux
|
|
145
|
+
- `desiredOSVersion`: OS version
|
|
146
|
+
- `desiredBrowser`: chrome, firefox, safari, edge, or ie
|
|
147
|
+
- `desiredBrowserVersion` (optional): Browser version or "latest" (default: latest)
|
|
148
|
+
|
|
149
|
+
**Example prompt:**
|
|
150
|
+
> "Start desktop live session on Firefox 120 with Mac Monterey for https://example.com"
|
|
151
|
+
|
|
152
|
+
#### `startMobileLiveSession`
|
|
153
|
+
Convenience tool to start a mobile device live testing session.
|
|
154
|
+
|
|
155
|
+
**Parameters:**
|
|
156
|
+
- `desiredURL`: The URL to open
|
|
157
|
+
- `desiredOS`: android or ios
|
|
158
|
+
- `desiredOSVersion`: OS version
|
|
159
|
+
- `desiredDevice`: Device name
|
|
160
|
+
|
|
161
|
+
**Example prompt:**
|
|
162
|
+
> "Start mobile live session on Galaxy S23 with Android 13 for https://example.com"
|
|
163
|
+
|
|
164
|
+
### Browser & Device Management
|
|
165
|
+
|
|
166
|
+
#### `getBrowsers`
|
|
167
|
+
Get list of available browsers and platforms for testing.
|
|
168
|
+
|
|
169
|
+
**Parameters:**
|
|
170
|
+
- `type` (optional): Filter by "web" or "mobile"
|
|
171
|
+
|
|
172
|
+
**Example prompt:**
|
|
173
|
+
> "Show me all available browsers for testing"
|
|
174
|
+
> "What mobile browsers are available?"
|
|
175
|
+
|
|
176
|
+
#### `getDevices`
|
|
177
|
+
Get list of available mobile devices (real devices and simulators).
|
|
178
|
+
|
|
179
|
+
**Example prompt:**
|
|
180
|
+
> "List all available iOS devices"
|
|
181
|
+
> "Show me Android devices for testing"
|
|
182
|
+
|
|
183
|
+
### Test Management
|
|
184
|
+
|
|
185
|
+
#### `getTests`
|
|
186
|
+
Retrieve a list of recent tests with pagination.
|
|
187
|
+
|
|
188
|
+
**Parameters:**
|
|
189
|
+
- `offset` (optional): Pagination offset (default: 0)
|
|
190
|
+
- `limit` (optional): Number of tests to retrieve (default: 10, max: 100)
|
|
191
|
+
|
|
192
|
+
**Example prompt:**
|
|
193
|
+
> "Show me my last 20 tests"
|
|
194
|
+
> "Get recent test results"
|
|
195
|
+
|
|
196
|
+
#### `getTestDetails`
|
|
197
|
+
Get comprehensive details about a specific test including:
|
|
198
|
+
- Test status, browser, platform, and timing information
|
|
199
|
+
- Video recording URL and screenshot URLs
|
|
200
|
+
- Selenium, browser, and Appium logs
|
|
201
|
+
- Test execution steps with commands and timestamps
|
|
202
|
+
- Network logs, exception logs, and JS errors
|
|
203
|
+
|
|
204
|
+
**Parameters:**
|
|
205
|
+
- `sessionId`: The session ID of the test
|
|
206
|
+
|
|
207
|
+
**Example prompt:**
|
|
208
|
+
> "Get details for test session abc123"
|
|
209
|
+
> "Show me the video and logs for test xyz789"
|
|
210
|
+
> "Show execution steps for test abc123"
|
|
211
|
+
|
|
212
|
+
#### `updateTest`
|
|
213
|
+
Update test metadata such as name, status, or build.
|
|
214
|
+
|
|
215
|
+
**Parameters:**
|
|
216
|
+
- `sessionId`: The session ID of the test
|
|
217
|
+
- `name` (optional): New name for the test
|
|
218
|
+
- `status` (optional): "passed" or "failed"
|
|
219
|
+
- `build` (optional): Build identifier
|
|
220
|
+
- `extra` (optional): Additional metadata (JSON string)
|
|
221
|
+
|
|
222
|
+
**Example prompt:**
|
|
223
|
+
> "Mark test abc123 as passed"
|
|
224
|
+
> "Update test xyz789 with name 'Login Flow Test'"
|
|
225
|
+
|
|
226
|
+
#### `deleteTest`
|
|
227
|
+
Delete a test by session ID.
|
|
228
|
+
|
|
229
|
+
**Parameters:**
|
|
230
|
+
- `sessionId`: The session ID of the test to delete
|
|
231
|
+
|
|
232
|
+
**Example prompt:**
|
|
233
|
+
> "Delete test abc123"
|
|
234
|
+
|
|
235
|
+
#### `stopTest`
|
|
236
|
+
Stop a running test by session ID.
|
|
237
|
+
|
|
238
|
+
**Parameters:**
|
|
239
|
+
- `sessionId`: The session ID of the test to stop
|
|
240
|
+
|
|
241
|
+
**Example prompt:**
|
|
242
|
+
> "Stop test abc123"
|
|
243
|
+
|
|
244
|
+
### Build Management
|
|
245
|
+
|
|
246
|
+
#### `getBuilds`
|
|
247
|
+
Get a list of builds with pagination.
|
|
248
|
+
|
|
249
|
+
**Parameters:**
|
|
250
|
+
- `offset` (optional): Pagination offset (default: 0)
|
|
251
|
+
- `limit` (optional): Number of builds to retrieve (default: 10, max: 100)
|
|
252
|
+
|
|
253
|
+
**Example prompt:**
|
|
254
|
+
> "Show me my recent builds"
|
|
255
|
+
|
|
256
|
+
#### `getTestsForBuild`
|
|
257
|
+
Get all tests associated with a specific build ID.
|
|
258
|
+
|
|
259
|
+
**Parameters:**
|
|
260
|
+
- `buildId`: The build ID
|
|
261
|
+
|
|
262
|
+
**Example prompt:**
|
|
263
|
+
> "Show all tests for build 12345"
|
|
264
|
+
|
|
265
|
+
#### `deleteBuild`
|
|
266
|
+
Delete a build and all its associated tests.
|
|
267
|
+
|
|
268
|
+
**Parameters:**
|
|
269
|
+
- `buildId`: The build ID to delete
|
|
270
|
+
|
|
271
|
+
**Example prompt:**
|
|
272
|
+
> "Delete build 12345"
|
|
273
|
+
|
|
274
|
+
### Storage Management
|
|
275
|
+
|
|
276
|
+
#### `uploadFile`
|
|
277
|
+
Upload a local file (APK, IPA, or ZIP) to TestingBot storage.
|
|
278
|
+
|
|
279
|
+
**Parameters:**
|
|
280
|
+
- `localFilePath`: Path to the file to upload
|
|
281
|
+
|
|
282
|
+
**Example prompt:**
|
|
283
|
+
> "Upload /path/to/app.apk to TestingBot"
|
|
284
|
+
|
|
285
|
+
#### `uploadRemoteFile`
|
|
286
|
+
Upload a file from a remote URL to TestingBot storage.
|
|
287
|
+
|
|
288
|
+
**Parameters:**
|
|
289
|
+
- `remoteUrl`: URL of the file to upload
|
|
290
|
+
|
|
291
|
+
**Example prompt:**
|
|
292
|
+
> "Upload https://example.com/app.ipa to TestingBot"
|
|
293
|
+
|
|
294
|
+
#### `getStorageFiles`
|
|
295
|
+
List all files in TestingBot storage.
|
|
296
|
+
|
|
297
|
+
**Parameters:**
|
|
298
|
+
- `offset` (optional): Pagination offset (default: 0)
|
|
299
|
+
- `limit` (optional): Number of files to retrieve (default: 10, max: 100)
|
|
300
|
+
|
|
301
|
+
**Example prompt:**
|
|
302
|
+
> "Show me all uploaded apps"
|
|
303
|
+
|
|
304
|
+
#### `deleteStorageFile`
|
|
305
|
+
Delete a file from TestingBot storage.
|
|
306
|
+
|
|
307
|
+
**Parameters:**
|
|
308
|
+
- `appUrl`: The app_url of the file to delete
|
|
309
|
+
|
|
310
|
+
**Example prompt:**
|
|
311
|
+
> "Delete app tb://app123 from storage"
|
|
312
|
+
|
|
313
|
+
### Screenshot Testing
|
|
314
|
+
|
|
315
|
+
#### `takeScreenshot`
|
|
316
|
+
Take screenshots of a URL across multiple browsers and platforms.
|
|
317
|
+
|
|
318
|
+
**Parameters:**
|
|
319
|
+
- `url`: The URL to screenshot
|
|
320
|
+
- `browsers`: Array of browser configurations
|
|
321
|
+
- `browserName`: Browser name (chrome, firefox, safari, etc.)
|
|
322
|
+
- `version` (optional): Browser version or "latest"
|
|
323
|
+
- `os`: Operating system (WIN11, MAC, etc.)
|
|
324
|
+
- `resolution` (optional): Screen resolution (default: "1920x1080")
|
|
325
|
+
- `waitTime` (optional): Seconds to wait before screenshot (default: 5, max: 60)
|
|
326
|
+
- `fullPage` (optional): Capture full page or viewport (default: false)
|
|
327
|
+
|
|
328
|
+
**Example prompt:**
|
|
329
|
+
> "Take a screenshot of https://example.com on Chrome and Firefox"
|
|
330
|
+
> "Screenshot my homepage on mobile devices"
|
|
331
|
+
|
|
332
|
+
#### `retrieveScreenshots`
|
|
333
|
+
Retrieve screenshot results by screenshot ID.
|
|
334
|
+
|
|
335
|
+
**Parameters:**
|
|
336
|
+
- `screenshotId`: The screenshot ID from takeScreenshot
|
|
337
|
+
|
|
338
|
+
**Example prompt:**
|
|
339
|
+
> "Get screenshots for job abc123"
|
|
340
|
+
|
|
341
|
+
#### `getScreenshotList`
|
|
342
|
+
Get a list of all screenshot jobs.
|
|
343
|
+
|
|
344
|
+
**Parameters:**
|
|
345
|
+
- `offset` (optional): Pagination offset (default: 0)
|
|
346
|
+
- `limit` (optional): Number of jobs to retrieve (default: 10, max: 100)
|
|
347
|
+
|
|
348
|
+
**Example prompt:**
|
|
349
|
+
> "Show me my recent screenshot jobs"
|
|
350
|
+
|
|
351
|
+
### User Management
|
|
352
|
+
|
|
353
|
+
#### `getUserInfo`
|
|
354
|
+
Get current user account information including minutes used, plan details, and limits.
|
|
355
|
+
|
|
356
|
+
**Example prompt:**
|
|
357
|
+
> "Show my account information"
|
|
358
|
+
> "How many minutes have I used?"
|
|
359
|
+
|
|
360
|
+
#### `updateUserInfo`
|
|
361
|
+
Update user account information.
|
|
362
|
+
|
|
363
|
+
**Parameters:**
|
|
364
|
+
- `firstName` (optional): First name
|
|
365
|
+
- `lastName` (optional): Last name
|
|
366
|
+
- `email` (optional): Email address
|
|
367
|
+
|
|
368
|
+
**Example prompt:**
|
|
369
|
+
> "Update my email to newemail@example.com"
|
|
370
|
+
|
|
371
|
+
### Team Management
|
|
372
|
+
|
|
373
|
+
#### `getTeam`
|
|
374
|
+
Get team information including concurrency limits, allowed parallel VMs, and mobile concurrency.
|
|
375
|
+
|
|
376
|
+
**Example prompt:**
|
|
377
|
+
> "Show my team information"
|
|
378
|
+
> "What are my team's concurrency limits?"
|
|
379
|
+
|
|
380
|
+
#### `getUsersInTeam`
|
|
381
|
+
List all users in your team with their roles and access levels.
|
|
382
|
+
|
|
383
|
+
**Parameters:**
|
|
384
|
+
- `offset` (optional): Pagination offset (default: 0)
|
|
385
|
+
- `limit` (optional): Number of users to retrieve (default: 10, max: 100)
|
|
386
|
+
|
|
387
|
+
**Example prompt:**
|
|
388
|
+
> "Show me all team members"
|
|
389
|
+
> "List users in my team"
|
|
390
|
+
|
|
391
|
+
#### `getUserFromTeam`
|
|
392
|
+
Get detailed information about a specific team member by user ID.
|
|
393
|
+
|
|
394
|
+
**Parameters:**
|
|
395
|
+
- `userId`: The user ID to retrieve
|
|
396
|
+
|
|
397
|
+
**Example prompt:**
|
|
398
|
+
> "Show details for user 12345"
|
|
399
|
+
|
|
400
|
+
### Chrome DevTools Protocol (CDP)
|
|
401
|
+
|
|
402
|
+
#### `createCdpSession`
|
|
403
|
+
Create a Chrome DevTools Protocol session for advanced browser automation. Returns a WebSocket URL to connect to the browser.
|
|
404
|
+
|
|
405
|
+
**Parameters:**
|
|
406
|
+
- `browserName`: Browser name (chrome, firefox, safari, edge, etc.)
|
|
407
|
+
- `browserVersion` (optional): Browser version or "latest" (default: latest)
|
|
408
|
+
- `platform`: Operating system platform
|
|
409
|
+
- `screenResolution` (optional): Screen resolution (e.g., "1920x1080")
|
|
410
|
+
- `name` (optional): Session name
|
|
411
|
+
- `build` (optional): Build identifier
|
|
412
|
+
|
|
413
|
+
**Example prompt:**
|
|
414
|
+
> "Create a CDP session on Chrome latest with Windows 11"
|
|
415
|
+
> "Start a CDP session on Firefox 120 for automation"
|
|
416
|
+
|
|
417
|
+
### Tunnel Management
|
|
418
|
+
|
|
419
|
+
#### `getTunnelList`
|
|
420
|
+
Get a list of all active TestingBot tunnels. Tunnels allow testing websites behind firewalls or on your local machine.
|
|
421
|
+
|
|
422
|
+
**Example prompt:**
|
|
423
|
+
> "Show me all active tunnels"
|
|
424
|
+
> "List my TestingBot tunnels"
|
|
425
|
+
|
|
426
|
+
#### `deleteTunnel`
|
|
427
|
+
Delete an active TestingBot tunnel by ID. This terminates the tunnel connection.
|
|
428
|
+
|
|
429
|
+
**Parameters:**
|
|
430
|
+
- `tunnelId`: The tunnel ID to delete
|
|
431
|
+
|
|
432
|
+
**Example prompt:**
|
|
433
|
+
> "Delete tunnel 12345"
|
|
434
|
+
|
|
435
|
+
## Usage Examples
|
|
436
|
+
|
|
437
|
+
### Example 1: Running Cross-Browser Tests
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
User: "Show me all available browsers for web testing"
|
|
441
|
+
Assistant: [Lists all web browsers]
|
|
442
|
+
|
|
443
|
+
User: "Take a screenshot of https://myapp.com on Chrome latest and Firefox latest on Windows 11"
|
|
444
|
+
Assistant: [Creates screenshot job and returns ID]
|
|
445
|
+
|
|
446
|
+
User: "Get the screenshots for job abc123"
|
|
447
|
+
Assistant: [Returns screenshot URLs]
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Example 2: Managing Mobile App Tests
|
|
451
|
+
|
|
452
|
+
```
|
|
453
|
+
User: "Upload my app from https://example.com/app.apk"
|
|
454
|
+
Assistant: [Uploads app and returns tb://app123]
|
|
455
|
+
|
|
456
|
+
User: "Show me all my uploaded apps"
|
|
457
|
+
Assistant: [Lists storage files]
|
|
458
|
+
|
|
459
|
+
User: "Show me the last 10 tests"
|
|
460
|
+
Assistant: [Shows recent test results]
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### Example 3: Build Management
|
|
464
|
+
|
|
465
|
+
```
|
|
466
|
+
User: "Show me my recent builds"
|
|
467
|
+
Assistant: [Lists recent builds]
|
|
468
|
+
|
|
469
|
+
User: "Show all tests for build 12345"
|
|
470
|
+
Assistant: [Lists tests in that build]
|
|
471
|
+
|
|
472
|
+
User: "Mark test xyz789 as passed with build name 'Release 1.0'"
|
|
473
|
+
Assistant: [Updates test]
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Example 4: Team & Tunnel Management
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
User: "Show me my team information"
|
|
480
|
+
Assistant: [Shows team concurrency limits and settings]
|
|
481
|
+
|
|
482
|
+
User: "List all team members"
|
|
483
|
+
Assistant: [Lists all users in the team]
|
|
484
|
+
|
|
485
|
+
User: "Show me all active tunnels"
|
|
486
|
+
Assistant: [Lists active TestingBot tunnels]
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
### Example 5: CDP Automation
|
|
490
|
+
|
|
491
|
+
```
|
|
492
|
+
User: "Create a CDP session on Chrome latest with Windows 11"
|
|
493
|
+
Assistant: [Creates session and returns WebSocket URL]
|
|
494
|
+
|
|
495
|
+
User: "Show me test execution steps for session abc123"
|
|
496
|
+
Assistant: [Shows detailed command history with timestamps]
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
## Development
|
|
500
|
+
|
|
501
|
+
### Setup
|
|
502
|
+
|
|
503
|
+
```bash
|
|
504
|
+
# Clone the repository
|
|
505
|
+
git clone https://github.com/testingbot/mcp-server.git
|
|
506
|
+
cd testingbot-mcp-server
|
|
507
|
+
|
|
508
|
+
# Install dependencies
|
|
509
|
+
npm install
|
|
510
|
+
|
|
511
|
+
# Set up environment variables
|
|
512
|
+
cp .env.example .env
|
|
513
|
+
# Edit .env with your credentials
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Commands
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
# Build the project (runs lint, format, test, and compile)
|
|
520
|
+
npm run build
|
|
521
|
+
|
|
522
|
+
# Development mode with watch
|
|
523
|
+
npm run dev
|
|
524
|
+
|
|
525
|
+
# Run tests
|
|
526
|
+
npm test
|
|
527
|
+
|
|
528
|
+
# Lint code
|
|
529
|
+
npm run lint
|
|
530
|
+
|
|
531
|
+
# Format code
|
|
532
|
+
npm run format
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### Running Locally
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
# Development mode
|
|
539
|
+
npm run dev
|
|
540
|
+
|
|
541
|
+
# Production mode
|
|
542
|
+
npm start
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### Testing with MCP Inspector
|
|
546
|
+
|
|
547
|
+
Use the MCP Inspector to test tools during development:
|
|
548
|
+
|
|
549
|
+
```bash
|
|
550
|
+
npx @modelcontextprotocol/inspector node dist/index.js
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
Then open http://localhost:5173 in your browser.
|
|
554
|
+
|
|
555
|
+
## Project Structure
|
|
556
|
+
|
|
557
|
+
```
|
|
558
|
+
testingbot-mcp-server/
|
|
559
|
+
โโโ src/
|
|
560
|
+
โ โโโ index.ts # Entry point
|
|
561
|
+
โ โโโ server-factory.ts # MCP server setup
|
|
562
|
+
โ โโโ config.ts # Configuration management
|
|
563
|
+
โ โโโ lib/
|
|
564
|
+
โ โ โโโ types.ts # TypeScript types
|
|
565
|
+
โ โ โโโ constants.ts # Constants and enums
|
|
566
|
+
โ โ โโโ error.ts # Error classes
|
|
567
|
+
โ โ โโโ logger.ts # Logging setup
|
|
568
|
+
โ โ โโโ utils.ts # Utility functions
|
|
569
|
+
โ โ โโโ get-auth.ts # Authentication helpers
|
|
570
|
+
โ โโโ tools/
|
|
571
|
+
โ โโโ browsers.ts # Browser & device tools
|
|
572
|
+
โ โโโ tests.ts # Test management tools
|
|
573
|
+
โ โโโ builds.ts # Build management tools
|
|
574
|
+
โ โโโ storage.ts # Storage tools
|
|
575
|
+
โ โโโ screenshots.ts # Screenshot tools
|
|
576
|
+
โ โโโ user.ts # User management tools
|
|
577
|
+
โ โโโ team.ts # Team management tools
|
|
578
|
+
โ โโโ cdp.ts # Chrome DevTools Protocol tools
|
|
579
|
+
โ โโโ tunnels.ts # Tunnel management tools
|
|
580
|
+
โ โโโ live.ts # Live testing session tools
|
|
581
|
+
โโโ tests/
|
|
582
|
+
โ โโโ tools/ # Unit tests
|
|
583
|
+
โโโ dist/ # Compiled output
|
|
584
|
+
โโโ package.json
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
## Troubleshooting
|
|
588
|
+
|
|
589
|
+
### Authentication Errors
|
|
590
|
+
|
|
591
|
+
If you see authentication errors:
|
|
592
|
+
1. Verify your credentials at https://testingbot.com/members/user/edit
|
|
593
|
+
2. Ensure environment variables are set correctly
|
|
594
|
+
3. Check that there are no extra spaces in your credentials
|
|
595
|
+
|
|
596
|
+
### Connection Issues
|
|
597
|
+
|
|
598
|
+
If the MCP server won't connect:
|
|
599
|
+
1. Restart your MCP client (Claude Desktop, VS Code, etc.)
|
|
600
|
+
2. Check the MCP client logs for errors
|
|
601
|
+
3. Verify Node.js version is >= 18
|
|
602
|
+
|
|
603
|
+
### Tool Execution Errors
|
|
604
|
+
|
|
605
|
+
If tools fail to execute:
|
|
606
|
+
1. Check the server logs for detailed error messages
|
|
607
|
+
2. Verify you have sufficient permissions/quota in your TestingBot account
|
|
608
|
+
3. Ensure all required parameters are provided
|
|
609
|
+
|
|
610
|
+
### Debug Logging
|
|
611
|
+
|
|
612
|
+
To enable debug logging, set the `LOG_LEVEL` environment variable:
|
|
613
|
+
|
|
614
|
+
```bash
|
|
615
|
+
export LOG_LEVEL=debug
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
Or in your MCP client configuration:
|
|
619
|
+
|
|
620
|
+
```json
|
|
621
|
+
{
|
|
622
|
+
"mcpServers": {
|
|
623
|
+
"testingbot": {
|
|
624
|
+
"command": "npx",
|
|
625
|
+
"args": ["-y", "@testingbot/mcp-server"],
|
|
626
|
+
"env": {
|
|
627
|
+
"TESTINGBOT_KEY": "your-api-key",
|
|
628
|
+
"TESTINGBOT_SECRET": "your-api-secret",
|
|
629
|
+
"LOG_LEVEL": "debug"
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
## Contributing
|
|
637
|
+
|
|
638
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
639
|
+
|
|
640
|
+
1. Fork the repository
|
|
641
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
642
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
643
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
644
|
+
5. Open a Pull Request
|
|
645
|
+
|
|
646
|
+
## License
|
|
647
|
+
|
|
648
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
649
|
+
|
|
650
|
+
## Support
|
|
651
|
+
|
|
652
|
+
- ๐ง Email: support@testingbot.com
|
|
653
|
+
- ๐ Issues: [GitHub Issues](https://github.com/testingbot/mcp-server/issues)
|
|
654
|
+
- ๐ Documentation: [TestingBot Documentation](https://testingbot.com/support)
|
|
655
|
+
- ๐ฌ Community: [TestingBot Forum](https://testingbot.com/support/forums)
|
|
656
|
+
|
|
657
|
+
## Related
|
|
658
|
+
|
|
659
|
+
- [TestingBot API Package](https://github.com/testingbot/testingbot-api)
|
|
660
|
+
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
661
|
+
- [TestingBot Platform](https://testingbot.com)
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@testingbot/mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"mcpName": "io.testingbot/mcp-server",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/testingbot/mcp-server.git"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "npm run lint && npm run format && npm test && tsc",
|
|
13
|
+
"start": "node dist/index.js",
|
|
14
|
+
"dev": "NODE_ENV=development tsx watch --clear-screen=false src/index.ts",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"test:coverage": "vitest run --coverage",
|
|
18
|
+
"lint": "eslint . --ext .ts",
|
|
19
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
20
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
21
|
+
"format:check": "prettier --check \"src/**/*.ts\""
|
|
22
|
+
},
|
|
23
|
+
"bin": {
|
|
24
|
+
"testingbot-mcp-server": "dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"mcp",
|
|
36
|
+
"testingbot",
|
|
37
|
+
"model-context-protocol",
|
|
38
|
+
"testing",
|
|
39
|
+
"selenium",
|
|
40
|
+
"browser-testing",
|
|
41
|
+
"mobile-testing",
|
|
42
|
+
"cross-browser",
|
|
43
|
+
"ai-tools"
|
|
44
|
+
],
|
|
45
|
+
"author": "TestingBot",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"description": "TestingBot's official MCP Server for AI-powered testing automation",
|
|
48
|
+
"homepage": "https://github.com/testingbot/mcp-server#readme",
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/testingbot/mcp-server/issues"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
54
|
+
"dotenv": "^16.4.5",
|
|
55
|
+
"pino": "^9.6.0",
|
|
56
|
+
"pino-pretty": "^13.0.0",
|
|
57
|
+
"testingbot-api": "^1.1.0",
|
|
58
|
+
"zod": "^3.24.1"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@eslint/js": "^9.25.0",
|
|
62
|
+
"@types/node": "^22.14.1",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.30.1",
|
|
64
|
+
"@typescript-eslint/parser": "^8.30.1",
|
|
65
|
+
"@vitest/coverage-v8": "^3.1.3",
|
|
66
|
+
"eslint": "^9.25.0",
|
|
67
|
+
"prettier": "^3.5.3",
|
|
68
|
+
"tsx": "^4.19.3",
|
|
69
|
+
"typescript": "^5.8.3",
|
|
70
|
+
"typescript-eslint": "^8.30.1",
|
|
71
|
+
"vite": "^6.3.5",
|
|
72
|
+
"vitest": "^3.1.3"
|
|
73
|
+
}
|
|
74
|
+
}
|