wopee-mcp 1.0.1
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/INTEGRATION.md +441 -0
- package/LICENSE +200 -0
- package/QUICK_START.md +50 -0
- package/README.md +658 -0
- package/dist/config.d.ts +48 -0
- package/dist/config.js +165 -0
- package/dist/config.js.map +1 -0
- package/dist/graphql/client.d.ts +34 -0
- package/dist/graphql/client.js +75 -0
- package/dist/graphql/client.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +672 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/wopee_dispatch_agent.d.ts +8 -0
- package/dist/tools/wopee_dispatch_agent.js +41 -0
- package/dist/tools/wopee_dispatch_agent.js.map +1 -0
- package/dist/tools/wopee_dispatch_analysis.d.ts +8 -0
- package/dist/tools/wopee_dispatch_analysis.js +50 -0
- package/dist/tools/wopee_dispatch_analysis.js.map +1 -0
- package/dist/tools/wopee_fetch_analysis_suites.d.ts +8 -0
- package/dist/tools/wopee_fetch_analysis_suites.js +81 -0
- package/dist/tools/wopee_fetch_analysis_suites.js.map +1 -0
- package/dist/tools/wopee_generate_app_context.d.ts +8 -0
- package/dist/tools/wopee_generate_app_context.js +62 -0
- package/dist/tools/wopee_generate_app_context.js.map +1 -0
- package/dist/tools/wopee_generate_general_user_stories.d.ts +8 -0
- package/dist/tools/wopee_generate_general_user_stories.js +62 -0
- package/dist/tools/wopee_generate_general_user_stories.js.map +1 -0
- package/dist/tools/wopee_generate_test_cases.d.ts +8 -0
- package/dist/tools/wopee_generate_test_cases.js +74 -0
- package/dist/tools/wopee_generate_test_cases.js.map +1 -0
- package/dist/tools/wopee_generate_user_stories.d.ts +8 -0
- package/dist/tools/wopee_generate_user_stories.js +74 -0
- package/dist/tools/wopee_generate_user_stories.js.map +1 -0
- package/dist/tools/wopee_get_app_context.d.ts +8 -0
- package/dist/tools/wopee_get_app_context.js +41 -0
- package/dist/tools/wopee_get_app_context.js.map +1 -0
- package/dist/tools/wopee_get_test_cases.d.ts +9 -0
- package/dist/tools/wopee_get_test_cases.js +43 -0
- package/dist/tools/wopee_get_test_cases.js.map +1 -0
- package/dist/tools/wopee_get_user_stories.d.ts +8 -0
- package/dist/tools/wopee_get_user_stories.js +41 -0
- package/dist/tools/wopee_get_user_stories.js.map +1 -0
- package/dist/types/index.d.ts +425 -0
- package/dist/types/index.js +143 -0
- package/dist/types/index.js.map +1 -0
- package/env.example +7 -0
- package/package.json +117 -0
package/README.md
ADDED
|
@@ -0,0 +1,658 @@
|
|
|
1
|
+
# Wopee MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server for integrating with the Wopee testing platform. This server provides tools for dispatching analysis, generating app context, user stories, test cases, and running test executions through GraphQL API calls.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Dispatch Analysis**: Start analysis of web applications to understand their structure and behavior
|
|
8
|
+
- **Dispatch Agent**: Execute tests for specific projects and suites
|
|
9
|
+
- **Generate App Context**: Create detailed application context based on analysis results
|
|
10
|
+
- **Generate General User Stories**: Generate high-level user stories from analysis data
|
|
11
|
+
- **Generate User Stories**: Generate detailed user stories and acceptance criteria from analysis data
|
|
12
|
+
- **Generate Test Cases**: Generate comprehensive test cases from analysis and user stories
|
|
13
|
+
- **Get App Context**: Retrieve existing app context for a project and suite
|
|
14
|
+
- **Get User Stories**: Retrieve existing user stories for a project and suite
|
|
15
|
+
- **Get Test Cases**: Retrieve existing test cases for a project and suite
|
|
16
|
+
- **Fetch Analysis Suites**: Fetch all analysis suites for a project
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
### Option 1: One-Click Installation (Recommended)
|
|
21
|
+
|
|
22
|
+
**For VS Code:**
|
|
23
|
+
1. Open VS Code
|
|
24
|
+
2. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac)
|
|
25
|
+
3. Type "MCP: Install Server" and select it
|
|
26
|
+
4. Enter: `wopee-mcp`
|
|
27
|
+
5. Configure your API key when prompted
|
|
28
|
+
|
|
29
|
+
**For Cursor:**
|
|
30
|
+
1. Open Cursor
|
|
31
|
+
2. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac)
|
|
32
|
+
3. Type "MCP: Install Server" and select it
|
|
33
|
+
4. Enter: `wopee-mcp`
|
|
34
|
+
5. Configure your API key when prompted
|
|
35
|
+
|
|
36
|
+
### Option 2: Manual Installation
|
|
37
|
+
|
|
38
|
+
1. Install the package globally:
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g wopee-mcp
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
2. Set up environment variables using a `.env` file:
|
|
44
|
+
```bash
|
|
45
|
+
# Create a .env file in the project root
|
|
46
|
+
cp env.example .env
|
|
47
|
+
|
|
48
|
+
# Edit the .env file with your API key
|
|
49
|
+
# WOPEE_API_KEY=your_api_key_here
|
|
50
|
+
# WOPEE_API_URL=https://api.wopee.io/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Alternative: Set system environment variables:**
|
|
54
|
+
```bash
|
|
55
|
+
export WOPEE_API_KEY=your_api_key_here
|
|
56
|
+
export WOPEE_API_URL=https://api.wopee.io/
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Option 3: Development Installation
|
|
60
|
+
|
|
61
|
+
1. Clone the repository:
|
|
62
|
+
```bash
|
|
63
|
+
git clone <repository-url>
|
|
64
|
+
cd wopee-mcp
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
2. Install dependencies:
|
|
68
|
+
```bash
|
|
69
|
+
npm install
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
3. Set up environment variables:
|
|
73
|
+
```bash
|
|
74
|
+
cp env.example .env
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
4. Edit `.env` file with your Wopee API credentials:
|
|
78
|
+
```env
|
|
79
|
+
WOPEE_API_KEY=your_api_key_here
|
|
80
|
+
WOPEE_API_URL=https://api.wopee.io/
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## VS Code & Cursor Integration
|
|
84
|
+
|
|
85
|
+
### Prerequisites
|
|
86
|
+
|
|
87
|
+
Before using the Wopee MCP server, ensure you have:
|
|
88
|
+
|
|
89
|
+
1. **VS Code** with the MCP extension installed, or **Cursor** (which has built-in MCP support)
|
|
90
|
+
2. A **Wopee API key** from [wopee.io](https://wopee.io)
|
|
91
|
+
3. **Node.js 18+** installed on your system
|
|
92
|
+
|
|
93
|
+
### VS Code Setup
|
|
94
|
+
|
|
95
|
+
#### Method 1: One-Click Installation (Easiest)
|
|
96
|
+
|
|
97
|
+
1. **Open VS Code** and ensure you have the MCP extension installed
|
|
98
|
+
2. **Open Command Palette**: `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (Mac)
|
|
99
|
+
3. **Type**: `MCP: Install Server`
|
|
100
|
+
4. **Enter package name**: `wopee-mcp`
|
|
101
|
+
5. **Configure API key** when prompted
|
|
102
|
+
|
|
103
|
+
#### Method 2: Manual Configuration
|
|
104
|
+
|
|
105
|
+
1. **Install the package globally**:
|
|
106
|
+
```bash
|
|
107
|
+
npm install -g wopee-mcp
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
2. **Open VS Code settings** (`Ctrl+,` or `Cmd+,`)
|
|
111
|
+
|
|
112
|
+
3. **Search for "MCP"** and find the MCP settings
|
|
113
|
+
|
|
114
|
+
4. **Add server configuration**:
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcp.servers": {
|
|
118
|
+
"wopee": {
|
|
119
|
+
"command": "wopee-mcp",
|
|
120
|
+
"args": [],
|
|
121
|
+
"env": {
|
|
122
|
+
"WOPEE_API_KEY": "your_api_key_here",
|
|
123
|
+
"WOPEE_API_URL": "https://api.wopee.io/"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
5. **Restart VS Code** to load the new MCP server
|
|
131
|
+
|
|
132
|
+
### Cursor Setup
|
|
133
|
+
|
|
134
|
+
#### Method 1: One-Click Installation (Easiest)
|
|
135
|
+
|
|
136
|
+
1. **Open Cursor** (MCP support is built-in)
|
|
137
|
+
2. **Open Command Palette**: `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (Mac)
|
|
138
|
+
3. **Type**: `MCP: Install Server`
|
|
139
|
+
4. **Enter package name**: `wopee-mcp`
|
|
140
|
+
5. **Configure API key** when prompted
|
|
141
|
+
|
|
142
|
+
#### Method 2: Manual Configuration
|
|
143
|
+
|
|
144
|
+
1. **Install the package globally**:
|
|
145
|
+
```bash
|
|
146
|
+
npm install -g wopee-mcp
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
2. **Open Cursor settings** (`Ctrl+,` or `Cmd+,`)
|
|
150
|
+
|
|
151
|
+
3. **Navigate to MCP settings** in the sidebar
|
|
152
|
+
|
|
153
|
+
4. **Add server configuration**:
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"mcp.servers": {
|
|
157
|
+
"wopee": {
|
|
158
|
+
"command": "wopee-mcp",
|
|
159
|
+
"args": [],
|
|
160
|
+
"env": {
|
|
161
|
+
"WOPEE_API_KEY": "your_api_key_here",
|
|
162
|
+
"WOPEE_API_URL": "https://api.wopee.io/"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
5. **Restart Cursor** to load the new MCP server
|
|
170
|
+
|
|
171
|
+
### Using the Tools
|
|
172
|
+
|
|
173
|
+
Once configured, you can use the Wopee tools in your chat interface:
|
|
174
|
+
|
|
175
|
+
#### Dispatch Analysis
|
|
176
|
+
```
|
|
177
|
+
@wopee wopee_dispatch_analysis
|
|
178
|
+
Project UUID: project-123
|
|
179
|
+
Iterations: 5
|
|
180
|
+
Suite Analysis Config:
|
|
181
|
+
- Starting URL: https://example.com
|
|
182
|
+
- Username: testuser
|
|
183
|
+
- Password: testpass
|
|
184
|
+
- Cookies Preference: ACCEPT_ALL
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### Dispatch Agent
|
|
188
|
+
```
|
|
189
|
+
@wopee wopee_dispatch_agent
|
|
190
|
+
Project UUID: project-123
|
|
191
|
+
Suite UUID: suite-123
|
|
192
|
+
Analysis Identifier: analysis-123
|
|
193
|
+
Test Cases: [{"testCaseId": "test-1", "userStoryId": "story-1"}]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### Generate App Context
|
|
197
|
+
```
|
|
198
|
+
@wopee wopee_generate_app_context
|
|
199
|
+
Project UUID: project-123
|
|
200
|
+
Suite UUID: suite-123
|
|
201
|
+
Extra Prompt: Focus on user authentication flows
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
#### Generate General User Stories
|
|
205
|
+
```
|
|
206
|
+
@wopee wopee_generate_general_user_stories
|
|
207
|
+
Project UUID: project-123
|
|
208
|
+
Suite UUID: suite-123
|
|
209
|
+
Extra Prompt: Include high-level business requirements
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
#### Generate User Stories
|
|
213
|
+
```
|
|
214
|
+
@wopee wopee_generate_user_stories
|
|
215
|
+
Project UUID: project-123
|
|
216
|
+
Suite UUID: suite-123
|
|
217
|
+
Extra Prompt: Include edge cases and error scenarios
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
#### Generate Test Cases
|
|
221
|
+
```
|
|
222
|
+
@wopee wopee_generate_test_cases
|
|
223
|
+
Project UUID: project-123
|
|
224
|
+
Suite UUID: suite-123
|
|
225
|
+
Extra Prompt: Generate comprehensive test coverage
|
|
226
|
+
Selected User Stories: ["story-1", "story-2"]
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### 7. wopee_get_app_context
|
|
230
|
+
|
|
231
|
+
Get existing app context for a project and suite.
|
|
232
|
+
|
|
233
|
+
**Parameters:**
|
|
234
|
+
- `projectUuid` (string, required): UUID of the project
|
|
235
|
+
- `suiteUuid` (string, required): UUID of the test suite
|
|
236
|
+
|
|
237
|
+
**Example:**
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"projectUuid": "project-123",
|
|
241
|
+
"suiteUuid": "suite-123"
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### 8. wopee_get_user_stories
|
|
246
|
+
|
|
247
|
+
Get existing user stories for a project and suite.
|
|
248
|
+
|
|
249
|
+
**Parameters:**
|
|
250
|
+
- `projectUuid` (string, required): UUID of the project
|
|
251
|
+
- `suiteUuid` (string, required): UUID of the test suite
|
|
252
|
+
|
|
253
|
+
**Example:**
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"projectUuid": "project-123",
|
|
257
|
+
"suiteUuid": "suite-123"
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### 9. wopee_get_test_cases
|
|
262
|
+
|
|
263
|
+
Get existing test cases for a project and suite.
|
|
264
|
+
|
|
265
|
+
**Parameters:**
|
|
266
|
+
- `projectUuid` (string, required): UUID of the project
|
|
267
|
+
- `suiteUuid` (string, required): UUID of the test suite
|
|
268
|
+
|
|
269
|
+
**Example:**
|
|
270
|
+
```json
|
|
271
|
+
{
|
|
272
|
+
"projectUuid": "project-123",
|
|
273
|
+
"suiteUuid": "suite-123"
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### 10. wopee_fetch_analysis_suites
|
|
278
|
+
|
|
279
|
+
Fetch all analysis suites for a given project.
|
|
280
|
+
|
|
281
|
+
**Parameters:**
|
|
282
|
+
- `projectUuid` (string, required): UUID of the project
|
|
283
|
+
|
|
284
|
+
**Example:**
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"projectUuid": "project-123"
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Response:**
|
|
292
|
+
Returns an array of analysis suites with detailed information including:
|
|
293
|
+
- Suite UUID, name, and type
|
|
294
|
+
- Upload and execution status
|
|
295
|
+
- Analysis identifier
|
|
296
|
+
- Suite running status
|
|
297
|
+
- Generation state for app context, user stories, and test cases
|
|
298
|
+
- Creation and update timestamps
|
|
299
|
+
|
|
300
|
+
### Troubleshooting
|
|
301
|
+
|
|
302
|
+
#### Common Issues
|
|
303
|
+
|
|
304
|
+
1. **"Command not found" error**:
|
|
305
|
+
- Ensure the package is installed globally: `npm install -g wopee-mcp`
|
|
306
|
+
- Check that Node.js is in your PATH
|
|
307
|
+
|
|
308
|
+
2. **"API key not configured" error**:
|
|
309
|
+
- Verify your API key is set in the environment variables
|
|
310
|
+
- Check the MCP server configuration in VS Code/Cursor settings
|
|
311
|
+
|
|
312
|
+
3. **"Connection failed" error**:
|
|
313
|
+
- Verify your internet connection
|
|
314
|
+
- Check if the Wopee API URL is correct
|
|
315
|
+
- Ensure your API key is valid
|
|
316
|
+
|
|
317
|
+
4. **Tools not appearing**:
|
|
318
|
+
- Restart VS Code/Cursor after configuration
|
|
319
|
+
- Check the MCP server logs for errors
|
|
320
|
+
- Verify the server is running: `wopee-mcp --version`
|
|
321
|
+
|
|
322
|
+
#### Getting Help
|
|
323
|
+
|
|
324
|
+
- **Check logs**: Look in the MCP server output panel
|
|
325
|
+
- **Verify installation**: Run `wopee-mcp --help` in terminal
|
|
326
|
+
- **Test connection**: Use the `wopee_start_analysis` tool with a simple URL
|
|
327
|
+
|
|
328
|
+
## Configuration
|
|
329
|
+
|
|
330
|
+
The server loads configuration from a `.env` file in the project root directory (where `package.json` is located).
|
|
331
|
+
|
|
332
|
+
### Environment Variables
|
|
333
|
+
|
|
334
|
+
- `WOPEE_API_KEY` (required): Your Wopee API key
|
|
335
|
+
- `WOPEE_PROJECT_UUID` (required): Your Wopee project UUID
|
|
336
|
+
- `WOPEE_API_URL` (optional): Wopee API endpoint (defaults to `https://api.wopee.io/`)
|
|
337
|
+
|
|
338
|
+
### Setting up .env file
|
|
339
|
+
|
|
340
|
+
1. **Copy the example file:**
|
|
341
|
+
```bash
|
|
342
|
+
cp env.example .env
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
2. **Edit the .env file in the project root:**
|
|
346
|
+
```bash
|
|
347
|
+
# Wopee API Configuration
|
|
348
|
+
WOPEE_API_KEY=your_actual_api_key_here
|
|
349
|
+
WOPEE_PROJECT_UUID=your_project_uuid_here
|
|
350
|
+
WOPEE_API_URL=https://api.dev.wopee.io/
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
3. **For MCP integration, update your `mcp.json`:**
|
|
354
|
+
```json
|
|
355
|
+
{
|
|
356
|
+
"mcpServers": {
|
|
357
|
+
"wopee": {
|
|
358
|
+
"command": "node",
|
|
359
|
+
"args": ["/path/to/wopee-mcp/dist/index.js"],
|
|
360
|
+
"env": {}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Note:** The server automatically loads API keys from the `.env` file in the project root. No need to hardcode them in the MCP configuration.
|
|
367
|
+
|
|
368
|
+
## Usage
|
|
369
|
+
|
|
370
|
+
### Development
|
|
371
|
+
|
|
372
|
+
Run the server in development mode:
|
|
373
|
+
```bash
|
|
374
|
+
npm run dev
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Production
|
|
378
|
+
|
|
379
|
+
Build and run the server:
|
|
380
|
+
```bash
|
|
381
|
+
npm run build
|
|
382
|
+
npm start
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Testing
|
|
386
|
+
|
|
387
|
+
Run the test suite:
|
|
388
|
+
```bash
|
|
389
|
+
npm test
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Run tests in watch mode:
|
|
393
|
+
```bash
|
|
394
|
+
npm run test:watch
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
Run tests with coverage:
|
|
398
|
+
```bash
|
|
399
|
+
npm run test:coverage
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Package Management
|
|
403
|
+
|
|
404
|
+
#### Building the Package
|
|
405
|
+
|
|
406
|
+
Clean build (removes dist and rebuilds):
|
|
407
|
+
```bash
|
|
408
|
+
npm run build:clean
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Validate the package:
|
|
412
|
+
```bash
|
|
413
|
+
npm run validate
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
#### Publishing to npm
|
|
417
|
+
|
|
418
|
+
**Prerequisites:**
|
|
419
|
+
1. Create an npm account at [npmjs.com](https://www.npmjs.com)
|
|
420
|
+
2. Login to npm: `npm login`
|
|
421
|
+
3. Ensure you have publish permissions for the package
|
|
422
|
+
|
|
423
|
+
**Publishing Workflow:**
|
|
424
|
+
|
|
425
|
+
1. **Prepare for release:**
|
|
426
|
+
```bash
|
|
427
|
+
./scripts/prepare-release.sh
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
2. **Publish the package:**
|
|
431
|
+
```bash
|
|
432
|
+
./scripts/publish.sh
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
3. **Or use npm scripts directly:**
|
|
436
|
+
```bash
|
|
437
|
+
# Dry run (test without publishing)
|
|
438
|
+
npm run publish:dry-run
|
|
439
|
+
|
|
440
|
+
# Publish patch version (1.0.0 -> 1.0.1)
|
|
441
|
+
npm run publish:patch
|
|
442
|
+
|
|
443
|
+
# Publish minor version (1.0.0 -> 1.1.0)
|
|
444
|
+
npm run publish:minor
|
|
445
|
+
|
|
446
|
+
# Publish major version (1.0.0 -> 2.0.0)
|
|
447
|
+
npm run publish:major
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**Manual Publishing:**
|
|
451
|
+
```bash
|
|
452
|
+
# 1. Update version
|
|
453
|
+
npm version patch # or minor, major
|
|
454
|
+
|
|
455
|
+
# 2. Publish
|
|
456
|
+
npm publish
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
## Available Tools
|
|
460
|
+
|
|
461
|
+
### 1. wopee_start_analysis
|
|
462
|
+
|
|
463
|
+
Start a new analysis for a given URL.
|
|
464
|
+
|
|
465
|
+
**Parameters:**
|
|
466
|
+
- `url` (string, required): URL of the application to analyze
|
|
467
|
+
|
|
468
|
+
**Example:**
|
|
469
|
+
```json
|
|
470
|
+
{
|
|
471
|
+
"url": "https://example.com"
|
|
472
|
+
}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### 2. wopee_generate_app_context
|
|
476
|
+
|
|
477
|
+
Generate application context based on analysis results.
|
|
478
|
+
|
|
479
|
+
**Parameters:**
|
|
480
|
+
- `analysisId` (string, required): ID of the analysis to generate context from
|
|
481
|
+
- `prompt` (string, optional): Optional prompt to modify the app context generation
|
|
482
|
+
|
|
483
|
+
**Example:**
|
|
484
|
+
```json
|
|
485
|
+
{
|
|
486
|
+
"analysisId": "analysis-123",
|
|
487
|
+
"prompt": "Focus on user authentication flows"
|
|
488
|
+
}
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### 3. wopee_generate_user_stories
|
|
492
|
+
|
|
493
|
+
Generate user stories based on analysis results.
|
|
494
|
+
|
|
495
|
+
**Parameters:**
|
|
496
|
+
- `analysisId` (string, required): ID of the analysis to generate user stories from
|
|
497
|
+
- `prompt` (string, optional): Optional prompt to modify the user story generation
|
|
498
|
+
|
|
499
|
+
**Example:**
|
|
500
|
+
```json
|
|
501
|
+
{
|
|
502
|
+
"analysisId": "analysis-123",
|
|
503
|
+
"prompt": "Include edge cases and error scenarios"
|
|
504
|
+
}
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### 4. wopee_generate_tests
|
|
508
|
+
|
|
509
|
+
Generate test files by fetching generated scenarios from the Wopee platform.
|
|
510
|
+
|
|
511
|
+
**Parameters:**
|
|
512
|
+
- `projectUuid` (string, required): UUID of the project
|
|
513
|
+
- `suiteUuid` (string, required): UUID of the test suite
|
|
514
|
+
- `bucket` (string, required): Bucket name containing the generated scenarios
|
|
515
|
+
|
|
516
|
+
**Example:**
|
|
517
|
+
```json
|
|
518
|
+
{
|
|
519
|
+
"projectUuid": "e70d893f-b70a-4e45-a93a-7c08ef289aa9",
|
|
520
|
+
"suiteUuid": "f0cd35a5-0e11-4d33-995b-433706e10542",
|
|
521
|
+
"bucket": "project-suite-generated-scenarios"
|
|
522
|
+
}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
### 5. wopee_run_tests
|
|
526
|
+
|
|
527
|
+
Run tests either by analysis ID or specific test IDs.
|
|
528
|
+
|
|
529
|
+
**Parameters:**
|
|
530
|
+
- `analysisId` (string, optional): ID of the analysis to run tests for
|
|
531
|
+
- `testIds` (array of strings, optional): Array of specific test IDs to run
|
|
532
|
+
|
|
533
|
+
**Note:** Either `analysisId` or `testIds` must be provided.
|
|
534
|
+
|
|
535
|
+
**Example with analysis ID:**
|
|
536
|
+
```json
|
|
537
|
+
{
|
|
538
|
+
"analysisId": "analysis-123"
|
|
539
|
+
}
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
**Example with test IDs:**
|
|
543
|
+
```json
|
|
544
|
+
{
|
|
545
|
+
"testIds": ["test-1", "test-2", "test-3"]
|
|
546
|
+
}
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
## Response Format
|
|
550
|
+
|
|
551
|
+
All tools return responses in the following format:
|
|
552
|
+
|
|
553
|
+
```json
|
|
554
|
+
{
|
|
555
|
+
"success": true,
|
|
556
|
+
"data": { /* tool-specific data */ },
|
|
557
|
+
"message": "Success message",
|
|
558
|
+
"error": "Error message (only present if success is false)"
|
|
559
|
+
}
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
## Error Handling
|
|
563
|
+
|
|
564
|
+
The server provides detailed error messages for:
|
|
565
|
+
- Invalid parameters
|
|
566
|
+
- GraphQL API errors
|
|
567
|
+
- Network connectivity issues
|
|
568
|
+
- Configuration problems
|
|
569
|
+
|
|
570
|
+
## Development
|
|
571
|
+
|
|
572
|
+
### Project Structure
|
|
573
|
+
|
|
574
|
+
```
|
|
575
|
+
src/
|
|
576
|
+
├── config.ts # Configuration management
|
|
577
|
+
├── graphql/
|
|
578
|
+
│ └── client.ts # GraphQL client implementation
|
|
579
|
+
├── tools/ # Individual tool implementations
|
|
580
|
+
│ ├── wopee_start_analysis.ts
|
|
581
|
+
│ ├── wopee_generate_app_context.ts
|
|
582
|
+
│ ├── wopee_generate_user_stories.ts
|
|
583
|
+
│ ├── wopee_generate_tests.ts
|
|
584
|
+
│ └── wopee_run_tests.ts
|
|
585
|
+
├── types/
|
|
586
|
+
│ └── index.ts # TypeScript type definitions
|
|
587
|
+
└── index.ts # Main MCP server implementation
|
|
588
|
+
|
|
589
|
+
tests/
|
|
590
|
+
├── config.test.ts # Configuration tests
|
|
591
|
+
└── tools/ # Tool-specific tests
|
|
592
|
+
├── wopee_start_analysis.test.ts
|
|
593
|
+
├── wopee_generate_tests.test.ts
|
|
594
|
+
└── wopee_run_tests.test.ts
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
### Adding New Tools
|
|
598
|
+
|
|
599
|
+
1. Create a new tool file in `src/tools/`
|
|
600
|
+
2. Define the tool's parameters using Zod schemas in `src/types/index.ts`
|
|
601
|
+
3. Implement the tool function with proper error handling
|
|
602
|
+
4. Add the tool to the MCP server in `src/index.ts`
|
|
603
|
+
5. Write tests for the new tool
|
|
604
|
+
|
|
605
|
+
### Code Quality
|
|
606
|
+
|
|
607
|
+
The project includes:
|
|
608
|
+
- TypeScript for type safety
|
|
609
|
+
- ESLint for code linting
|
|
610
|
+
- Jest for testing
|
|
611
|
+
- Comprehensive error handling
|
|
612
|
+
- JSDoc documentation
|
|
613
|
+
|
|
614
|
+
## License
|
|
615
|
+
|
|
616
|
+
MIT License
|
|
617
|
+
|
|
618
|
+
## Contributing
|
|
619
|
+
|
|
620
|
+
1. Fork the repository
|
|
621
|
+
2. Create a feature branch
|
|
622
|
+
3. Make your changes
|
|
623
|
+
4. Add tests for new functionality
|
|
624
|
+
5. Ensure all tests pass
|
|
625
|
+
6. Submit a pull request
|
|
626
|
+
|
|
627
|
+
## GitHub Automation
|
|
628
|
+
|
|
629
|
+
This repository includes comprehensive GitHub Actions workflows for:
|
|
630
|
+
|
|
631
|
+
- **CI/CD Pipeline** - Automated testing and validation
|
|
632
|
+
- **npm Publishing** - Automated package publishing
|
|
633
|
+
- **Release Management** - Version management and releases
|
|
634
|
+
- **Security Scanning** - Vulnerability and security checks
|
|
635
|
+
- **Performance Testing** - Performance monitoring
|
|
636
|
+
- **Dependency Updates** - Automated dependency management
|
|
637
|
+
|
|
638
|
+
See [AUTOMATION.md](AUTOMATION.md) for detailed information about the automation setup.
|
|
639
|
+
|
|
640
|
+
### Quick Publishing
|
|
641
|
+
|
|
642
|
+
To publish a new version:
|
|
643
|
+
|
|
644
|
+
1. **Automatic (recommended):**
|
|
645
|
+
```bash
|
|
646
|
+
git tag v1.0.0
|
|
647
|
+
git push origin v1.0.0
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
2. **Manual via GitHub Actions:**
|
|
651
|
+
- Go to Actions → Release Management
|
|
652
|
+
- Click "Run workflow"
|
|
653
|
+
- Select version bump type
|
|
654
|
+
- Run workflow
|
|
655
|
+
|
|
656
|
+
## Support
|
|
657
|
+
|
|
658
|
+
For issues and questions, please create an issue in the repository.
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { WopeeConfig } from './types/index';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration manager for Wopee MCP server
|
|
4
|
+
*/
|
|
5
|
+
export declare class ConfigManager {
|
|
6
|
+
private static instance;
|
|
7
|
+
private config;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Get singleton instance of ConfigManager
|
|
11
|
+
*/
|
|
12
|
+
static getInstance(): ConfigManager;
|
|
13
|
+
/**
|
|
14
|
+
* Load and validate configuration from environment variables
|
|
15
|
+
*/
|
|
16
|
+
private loadConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Load .env file from project root directory
|
|
19
|
+
*/
|
|
20
|
+
private loadEnvFiles;
|
|
21
|
+
/**
|
|
22
|
+
* Get detailed error message for configuration issues
|
|
23
|
+
*/
|
|
24
|
+
private getConfigErrorMessage;
|
|
25
|
+
/**
|
|
26
|
+
* Get the current configuration
|
|
27
|
+
*/
|
|
28
|
+
getConfig(): WopeeConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Get API key
|
|
31
|
+
*/
|
|
32
|
+
getApiKey(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Get API URL
|
|
35
|
+
*/
|
|
36
|
+
getApiUrl(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Get Project UUID
|
|
39
|
+
*/
|
|
40
|
+
getProjectUuid(): string;
|
|
41
|
+
/**
|
|
42
|
+
* Reload configuration (useful for testing)
|
|
43
|
+
*/
|
|
44
|
+
reloadConfig(): void;
|
|
45
|
+
}
|
|
46
|
+
export declare const configManager: {
|
|
47
|
+
getInstance(): ConfigManager;
|
|
48
|
+
};
|