@democratize-quality/mcp-server 1.1.0 โ 1.1.2
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 +891 -420
- package/package.json +3 -1
- package/src/chatmodes//360/237/214/220 api-generator.chatmode.md" +337 -318
- package/src/chatmodes//360/237/214/220 api-planner.chatmode.md" +760 -237
- package/src/tools/api/api-generator.js +841 -112
- package/src/tools/api/api-planner.js +690 -25
- package/src/tools/api/api-project-setup.js +313 -0
- package/src/tools/api/prompts/README.md +293 -0
- package/src/tools/api/prompts/generation-prompts.js +599 -0
- package/src/tools/api/prompts/healing-prompts.js +143 -0
- package/src/tools/api/prompts/index.js +25 -0
- package/src/tools/api/prompts/orchestrator.js +333 -0
- package/src/tools/api/prompts/validation-rules.js +251 -0
- package/src/utils/agentInstaller.js +0 -1
package/README.md
CHANGED
|
@@ -1,640 +1,1111 @@
|
|
|
1
1
|
# ๐ฏ Democratize Quality MCP Server
|
|
2
2
|
|
|
3
|
-
A comprehensive
|
|
3
|
+
**Intelligent API Testing Made Simple** - A comprehensive Model Context Protocol (MCP) server that brings professional-grade API testing capabilities to everyone, from QA engineers to developers.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Transform your API testing workflow with AI-powered agents that plan, generate, and heal your tests automatically.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ๐ฆ Quick Installation
|
|
10
|
+
|
|
11
|
+
### Option 1: Agent Mode Installation (Recommended)
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
**The fastest way to get started** - Install with intelligent testing agents for GitHub Copilot:
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
```bash
|
|
16
|
+
npx @democratize-quality/mcp-server --agents
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**What this does:**
|
|
20
|
+
- โ
Installs the MCP server
|
|
21
|
+
- โ
Sets up 3 AI-powered testing agents
|
|
22
|
+
- โ
Configures VS Code integration automatically
|
|
23
|
+
- โ
Creates project folders (`.github/chatmodes/`, `.vscode/`)
|
|
24
|
+
|
|
25
|
+
**One-Click Alternative:**
|
|
12
26
|
|
|
13
27
|
[<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522democratize-quality%2522%252C%2522type%2522%253A%2522stdio%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540democratize-quality%252Fmcp-server%2522%255D%252C%2522cwd%2522%253A%2522%2524%257BworkspaceFolder%257D%2522%252C%2522env%2522%253A%257B%2522NODE_ENV%2522%253A%2522production%2522%252C%2522OUTPUT_DIR%2522%253A%2522.%252Fapi-test-reports%2522%257D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522democratize-quality%2522%252C%2522type%2522%253A%2522stdio%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540democratize-quality%252Fmcp-server%2522%255D%252C%2522cwd%2522%253A%2522%2524%257BworkspaceFolder%257D%2522%252C%2522env%2522%253A%257B%2522NODE_ENV%2522%253A%2522production%2522%252C%2522OUTPUT_DIR%2522%253A%2522.%252Fapi-test-reports%2522%257D%257D)
|
|
14
28
|
|
|
29
|
+
**Prerequisites:**
|
|
30
|
+
- Node.js 14+ installed
|
|
31
|
+
- VS Code with GitHub Copilot extension (for agents)
|
|
32
|
+
- Active internet connection
|
|
15
33
|
|
|
16
|
-
|
|
34
|
+
### Option 2: Manual Installation
|
|
17
35
|
|
|
18
|
-
|
|
36
|
+
**For Claude Desktop or other MCP clients:**
|
|
19
37
|
|
|
38
|
+
Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"democratize-quality": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["@democratize-quality/mcp-server"],
|
|
46
|
+
"env": {
|
|
47
|
+
"NODE_ENV": "production",
|
|
48
|
+
"OUTPUT_DIR": "./api-test-reports"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Global installation option:**
|
|
20
56
|
```bash
|
|
21
|
-
|
|
22
|
-
|
|
57
|
+
npm install -g @democratize-quality/mcp-server
|
|
58
|
+
|
|
59
|
+
# Then use anywhere
|
|
60
|
+
democratize-quality-mcp --help
|
|
23
61
|
```
|
|
24
62
|
|
|
25
|
-
|
|
63
|
+
---
|
|
26
64
|
|
|
27
|
-
|
|
65
|
+
## ๐ ๏ธ Available Tools
|
|
28
66
|
|
|
29
|
-
|
|
30
|
-
|-------|---------|---------------|
|
|
31
|
-
| **๐ @api-planner** | Analyze API schemas and create comprehensive test plans | `@๐ api-planner analyze the OpenAPI spec at https://api.example.com/swagger.json` |
|
|
32
|
-
| **๐ @api-generator** | Generate executable tests from test plans | `@๐ api-generator create Jest tests from ./api-test-plan.md` |
|
|
33
|
-
| **๐ @api-healer** | Debug and automatically fix failing API tests | `@๐ api-healer fix the failing tests in ./tests/api.test.js` |
|
|
67
|
+
This MCP server provides **7 powerful tools** for comprehensive API testing:
|
|
34
68
|
|
|
35
|
-
###
|
|
69
|
+
### ๐ค AI-Powered Testing Tools
|
|
36
70
|
|
|
37
|
-
|
|
71
|
+
| Tool | Purpose | When to Use |
|
|
72
|
+
|------|---------|-------------|
|
|
73
|
+
| **`api_planner`** | Analyzes API schemas (OpenAPI/Swagger, GraphQL) and creates comprehensive test plans with realistic sample data | Starting a new API testing project, documenting API behavior, validating API endpoints |
|
|
74
|
+
| **`api_generator`** | Generates executable tests (Jest, Playwright, Postman) from test plans using AI-powered code generation | Converting test plans to runnable code in TypeScript or JavaScript |
|
|
75
|
+
| **`api_healer`** | Debugs and automatically fixes failing tests by analyzing errors and applying healing strategies | Tests break after API changes, schema updates, or authentication issues |
|
|
76
|
+
| **`api_project_setup`** | Detects project configuration (framework and language) for smart test generation | Before using `api_generator` - auto-detects Playwright/Jest and TypeScript/JavaScript |
|
|
38
77
|
|
|
39
|
-
|
|
40
|
-
# 1. Analyze your API and create a comprehensive test plan
|
|
41
|
-
@๐ api-planner analyze our REST API using the OpenAPI spec at /docs/api-spec.yaml
|
|
78
|
+
### ๐ง Core API Testing Tools
|
|
42
79
|
|
|
43
|
-
|
|
44
|
-
|
|
80
|
+
| Tool | Purpose | When to Use |
|
|
81
|
+
|------|---------|-------------|
|
|
82
|
+
| **`api_request`** | Executes HTTP requests with validation and request chaining | Making individual API calls, testing specific endpoints, chaining multiple requests |
|
|
83
|
+
| **`api_session_status`** | Queries test session status and logs | Checking progress of test sequences, viewing request history |
|
|
84
|
+
| **`api_session_report`** | Generates comprehensive HTML test reports | Creating shareable test documentation with detailed analytics |
|
|
45
85
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
86
|
+
**Key Capabilities:**
|
|
87
|
+
- โ
**Smart Validation**: Automatic "expected vs actual" comparison with detailed failure messages
|
|
88
|
+
- ๐ **Request Chaining**: Extract data from one response and use in subsequent requests
|
|
89
|
+
- ๐ **Session Tracking**: Monitor multi-step API workflows across multiple requests
|
|
90
|
+
- ๐ **Visual Reports**: Interactive HTML reports with timing analysis and validation results
|
|
91
|
+
- ๐ฏ **All HTTP Methods**: GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD
|
|
92
|
+
- ๐ **Authentication**: Support for Bearer tokens, API keys, custom headers
|
|
93
|
+
- ๐จ **Realistic Sample Data**: Auto-generates context-aware test data (names, emails, dates, etc.)
|
|
94
|
+
- ๐ **Optional Validation**: Validate endpoints by making actual API calls with response time metrics
|
|
49
95
|
|
|
50
|
-
### โจ Key Agent Capabilities
|
|
51
96
|
|
|
52
|
-
|
|
53
|
-
- **๐ Intelligent Planning**: Generate comprehensive test scenarios covering functional, security, and edge cases
|
|
54
|
-
- **โก Multi-Format Generation**: Create Jest, Playwright, and Postman tests from the same plan
|
|
55
|
-
- **๐ ๏ธ Automatic Healing**: Detect and fix common test failures like changed endpoints, updated schemas, and authentication issues
|
|
56
|
-
- **๐ Workflow Integration**: Seamlessly work together to maintain your API test suite
|
|
97
|
+
## ๐ Chat Modes (AI Agents)
|
|
57
98
|
|
|
58
|
-
|
|
99
|
+
When you install with `--agents`, you get 3 intelligent testing assistants:
|
|
59
100
|
|
|
60
|
-
|
|
101
|
+
### 1. ๐ @api-planner - The Strategist
|
|
61
102
|
|
|
62
|
-
|
|
103
|
+
**What it does:** Analyzes your API and creates comprehensive test strategies
|
|
63
104
|
|
|
64
|
-
|
|
105
|
+
**Best for:**
|
|
106
|
+
- Starting new testing projects
|
|
107
|
+
- Documenting API behavior
|
|
108
|
+
- Creating test scenarios for complex workflows
|
|
109
|
+
- Security and edge case planning
|
|
65
110
|
|
|
66
|
-
|
|
111
|
+
**Example: Analyze a Real API**
|
|
112
|
+
```
|
|
113
|
+
1. Select the "๐ api-planner" chatmode from GitHub Copilot Chat window and enter following prompt:
|
|
67
114
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- **`api_generator`**: Generate executable tests (Jest, Playwright, Postman) from test plans
|
|
71
|
-
- **`api_healer`**: Debug and automatically fix failing API tests
|
|
115
|
+
2. Analyze this API and create a comprehensive test plan:
|
|
116
|
+
https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json
|
|
72
117
|
|
|
73
|
-
|
|
74
|
-
- **`api_request`**: HTTP requests with validation and session management
|
|
75
|
-
- **`api_session_status`**: Query API test session status and logs
|
|
76
|
-
- **`api_session_report`**: Generate comprehensive HTML test reports
|
|
118
|
+
3. Agent: I'll call the API planner once to analyze the OpenAPI schema at the provided URL and generate a comprehensive test plan with realistic sample data plus live validation of 5 endpoints; expected outcome: a saved test plan in ./api-test-reports/fakerest-test-plan.md and a validation summary. I'll run the planner now.
|
|
77
119
|
|
|
78
|
-
|
|
79
|
-
- ๐ค **AI-Powered Agents**: Intelligent test planning, generation, and healing
|
|
80
|
-
- โ
**Enhanced Validation**: Shows "expected vs actual" values in validation failures
|
|
81
|
-
- ๐ **Request Chaining**: Use response data in subsequent requests
|
|
82
|
-
- ๐ **Session Management**: Track API test sequences across multiple requests
|
|
83
|
-
- ๐ **HTML Reports**: Beautiful, interactive test reports with detailed validation results
|
|
84
|
-
- ๐ฏ **Comprehensive Testing**: Support for all HTTP methods with advanced validation options
|
|
120
|
+
4. When prompted to allow the tool call " Run api_plannerdemocratize-quality (MCP Server)".
|
|
85
121
|
|
|
86
|
-
|
|
122
|
+
```
|
|
87
123
|
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
124
|
+
**What you get:**
|
|
125
|
+
- Comprehensive markdown test plan with 40+ test scenarios
|
|
126
|
+
- Realistic sample requests for each endpoint
|
|
127
|
+
- Expected response structures
|
|
128
|
+
- Error scenarios and edge cases
|
|
129
|
+
- Ready for test generation
|
|
92
130
|
|
|
93
|
-
###
|
|
131
|
+
### 2. ๐ @api-generator - The Builder
|
|
94
132
|
|
|
95
|
-
**
|
|
133
|
+
**What it does:** Converts test plans into executable code
|
|
96
134
|
|
|
97
|
-
|
|
135
|
+
**Best for:**
|
|
136
|
+
- Generating Jest test suites
|
|
137
|
+
- Creating Playwright automation scripts
|
|
138
|
+
- Building Postman collections
|
|
98
139
|
|
|
99
|
-
|
|
100
|
-
# Install agents in your VS Code project
|
|
101
|
-
npx @democratize-quality/mcp-server --agents
|
|
140
|
+
**Example: Generate Tests from Plan**
|
|
102
141
|
```
|
|
142
|
+
1. Once you have the test plan generated as part of API Planner mode, now change the chatmode to : "๐ api-generator", open the test plan MD file created in previous step (so that it can be in context) and enter following prompt
|
|
143
|
+
Create Playwright tests in TypeScript for the Books API section
|
|
103
144
|
|
|
104
|
-
|
|
105
|
-
- ๐ Copy chatmode files to `.github/chatmodes/`
|
|
106
|
-
- โ๏ธ Set up MCP configuration in `.vscode/mcp.json`
|
|
107
|
-
- ๐ฏ Enable `@๐ api-planner`, `@๐ api-generator`, and `@๐ api-healer` agents
|
|
145
|
+
2. Agent: I'm going to detect the project's test framework/language (required first step) so I can generate Playwright TypeScript tests in the correct layout; expected outcome: detection result with suggested framework/language. Then ask you to allow the another tool "Run api_project_setupdemocratize-quality (MCP Server)" for capturing the project info e.g. if you have an empty project then it will ask to select the framework/language otherwise if your project is playwright typescript it will create playwright test(s) accordingly.
|
|
108
146
|
|
|
109
|
-
|
|
147
|
+
3. After you answer, it invoke tool "Run api_generatordemocratize-quality (MCP Server)" which will actually generate your tests, click "Allow"
|
|
110
148
|
|
|
111
|
-
|
|
149
|
+
Created files:
|
|
150
|
+
โ
With Books CRUD operations
|
|
151
|
+
โ
Show on screen instructions for running the tests
|
|
112
152
|
|
|
113
|
-
|
|
153
|
+
Tests include:
|
|
154
|
+
- โ
GET /api/v1/Books - List all books
|
|
155
|
+
- โ
GET /api/v1/Books/{id} - Get book by ID
|
|
156
|
+
- โ
POST /api/v1/Books - Create new book
|
|
157
|
+
- โ
PUT /api/v1/Books/{id} - Update book
|
|
158
|
+
- โ
DELETE /api/v1/Books/{id} - Delete book
|
|
159
|
+
- โ
Error handling for invalid IDs
|
|
160
|
+
- โ
Validation for required fields
|
|
114
161
|
|
|
115
|
-
|
|
162
|
+
```
|
|
116
163
|
|
|
117
|
-
**
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
|
|
164
|
+
**Example: Generate Postman Collection**
|
|
165
|
+
```
|
|
166
|
+
You: @๐ api-generator create a Postman collection from the entire test plan
|
|
167
|
+
|
|
168
|
+
Agent: Creating Postman collection for Fake REST API...
|
|
169
|
+
|
|
170
|
+
Generated:
|
|
171
|
+
โ
postman/FakeRestAPI.postman_collection.json
|
|
172
|
+
โ
postman/environment.json (with base URL variables)
|
|
121
173
|
|
|
122
|
-
|
|
174
|
+
Sample Collection includes:
|
|
175
|
+
- ๐ Books (5 requests)
|
|
176
|
+
- ๐ Users (4 requests)
|
|
177
|
+
- ๐ Authors (4 requests)
|
|
178
|
+
- ๐ Activities (3 requests)
|
|
179
|
+
- ๐ CoverPhotos (4 requests)
|
|
180
|
+
|
|
181
|
+
Import into Postman and start testing!
|
|
123
182
|
```
|
|
124
183
|
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
# Install globally
|
|
128
|
-
npm install -g @democratize-quality/mcp-server
|
|
184
|
+
### 3. ๐ @api-healer - The Fixer
|
|
129
185
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
186
|
+
**What it does:** Automatically diagnoses and repairs failing tests
|
|
187
|
+
|
|
188
|
+
**Best for:**
|
|
189
|
+
- Fixing broken tests after API changes
|
|
190
|
+
- Updating endpoint URLs
|
|
191
|
+
- Resolving authentication issues
|
|
192
|
+
- Schema mismatch corrections
|
|
193
|
+
|
|
194
|
+
**Example: Fix Failing Tests**
|
|
133
195
|
```
|
|
196
|
+
You: @๐ api-healer the Books tests are failing with 404 errors.
|
|
197
|
+
Please analyze and fix them.
|
|
134
198
|
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
# Clone and install dependencies
|
|
138
|
-
git clone https://github.com/uppadhyayraj/democratize-quality-mcp-server.git
|
|
139
|
-
cd mcp-server
|
|
140
|
-
npm install
|
|
199
|
+
Agent: Analyzing test failures in tests/books.spec.ts...
|
|
141
200
|
|
|
142
|
-
|
|
143
|
-
|
|
201
|
+
Issues found:
|
|
202
|
+
โ Endpoint changed: /api/Books โ /api/v1/Books
|
|
203
|
+
โ Response schema updated: added "pageCount" field
|
|
204
|
+
โ ID format changed: number โ string
|
|
144
205
|
|
|
145
|
-
|
|
146
|
-
|
|
206
|
+
Applying fixes:
|
|
207
|
+
โ
Updated all endpoint URLs to include /v1/ prefix
|
|
208
|
+
โ
Updated response assertions to include pageCount
|
|
209
|
+
โ
Fixed ID type in test data (42 โ "42")
|
|
210
|
+
โ
Backed up original file to tests/books.spec.ts.backup
|
|
211
|
+
|
|
212
|
+
Re-running tests... โ
All 15 tests now passing!
|
|
147
213
|
```
|
|
148
214
|
|
|
149
|
-
|
|
215
|
+
**Example: Fix Schema Mismatches**
|
|
216
|
+
```
|
|
217
|
+
You: @๐ api-healer fix assertion errors in tests/users.spec.ts
|
|
150
218
|
|
|
151
|
-
|
|
219
|
+
Agent: Analyzing assertion failures...
|
|
152
220
|
|
|
153
|
-
|
|
221
|
+
Found 3 schema mismatches:
|
|
222
|
+
โ Expected userName, API returns username (camelCase issue)
|
|
223
|
+
โ Password field removed from response (security update)
|
|
224
|
+
โ New field added: profileImageUrl
|
|
154
225
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"NODE_ENV": "production"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
226
|
+
Healing actions:
|
|
227
|
+
โ
Updated assertions: userName โ username
|
|
228
|
+
โ
Removed password field validation
|
|
229
|
+
โ
Added profileImageUrl to expected response
|
|
230
|
+
โ
Updated TypeScript interfaces
|
|
231
|
+
|
|
232
|
+
Tests healed successfully! โ
12/12 passing
|
|
167
233
|
```
|
|
168
234
|
|
|
169
|
-
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## ๐ก Usage Examples - E2E Testing Scenarios
|
|
170
238
|
|
|
171
|
-
###
|
|
239
|
+
### Scenario 1: Testing the Fake REST API (Complete Workflow)
|
|
172
240
|
|
|
173
|
-
**
|
|
174
|
-
|
|
175
|
-
|
|
241
|
+
**Real-world example using: https://fakerestapi.azurewebsites.net**
|
|
242
|
+
|
|
243
|
+
**Step 1: Plan your tests**
|
|
244
|
+
```
|
|
245
|
+
@๐ api-planner analyze the OpenAPI spec at
|
|
246
|
+
https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json
|
|
247
|
+
and create a comprehensive test plan focusing on Books and Authors endpoints
|
|
176
248
|
```
|
|
177
249
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
250
|
+
**What happens:**
|
|
251
|
+
- โ
Agent analyzes the Fake REST API schema
|
|
252
|
+
- โ
Identifies 5 resource types (Books, Authors, Users, Activities, CoverPhotos)
|
|
253
|
+
- โ
Creates 40+ test scenarios covering:
|
|
254
|
+
- Happy paths (GET all books, GET book by ID, CREATE book)
|
|
255
|
+
- Error cases (404 for invalid IDs, 400 for bad data)
|
|
256
|
+
- Edge cases (empty lists, ID boundaries)
|
|
257
|
+
- Data validation (response schema checks)
|
|
258
|
+
- โ
Generates realistic sample data:
|
|
259
|
+
```json
|
|
260
|
+
{
|
|
261
|
+
"id": 1,
|
|
262
|
+
"title": "The Great Gatsby",
|
|
263
|
+
"description": "A classic American novel",
|
|
264
|
+
"pageCount": 180,
|
|
265
|
+
"excerpt": "In my younger and more vulnerable years...",
|
|
266
|
+
"publishDate": "1925-04-10T00:00:00Z"
|
|
185
267
|
}
|
|
186
|
-
|
|
187
|
-
```
|
|
268
|
+
```
|
|
188
269
|
|
|
189
|
-
**
|
|
190
|
-
```
|
|
191
|
-
|
|
270
|
+
**Step 2: Generate executable tests**
|
|
271
|
+
```
|
|
272
|
+
@๐ api-generator create Playwright tests in TypeScript from the test plan,
|
|
273
|
+
focusing on the Books API section
|
|
192
274
|
```
|
|
193
275
|
|
|
194
|
-
**
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
276
|
+
**What you get:**
|
|
277
|
+
- `tests/books.spec.ts` - Complete Books CRUD test suite
|
|
278
|
+
```typescript
|
|
279
|
+
import { test, expect } from '@playwright/test';
|
|
280
|
+
|
|
281
|
+
test.describe('Books API', () => {
|
|
282
|
+
test('GET /api/v1/Books - should return all books', async ({ request }) => {
|
|
283
|
+
const response = await request.get('https://fakerestapi.azurewebsites.net/api/v1/Books');
|
|
284
|
+
expect(response.ok()).toBeTruthy();
|
|
285
|
+
expect(response.status()).toBe(200);
|
|
286
|
+
const books = await response.json();
|
|
287
|
+
expect(Array.isArray(books)).toBeTruthy();
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
test('POST /api/v1/Books - should create a new book', async ({ request }) => {
|
|
291
|
+
const newBook = {
|
|
292
|
+
id: 201,
|
|
293
|
+
title: "Test Book",
|
|
294
|
+
pageCount: 350
|
|
295
|
+
};
|
|
296
|
+
const response = await request.post('https://fakerestapi.azurewebsites.net/api/v1/Books', {
|
|
297
|
+
data: newBook
|
|
298
|
+
});
|
|
299
|
+
expect(response.status()).toBe(200);
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Step 3: Run and heal tests**
|
|
305
|
+
```
|
|
306
|
+
# Run tests
|
|
307
|
+
npx playwright test tests/books.spec.ts
|
|
198
308
|
|
|
199
|
-
#
|
|
200
|
-
|
|
309
|
+
# If any tests fail due to API changes:
|
|
310
|
+
@๐ api-healer fix the failing tests in tests/books.spec.ts
|
|
201
311
|
```
|
|
202
312
|
|
|
203
|
-
|
|
313
|
+
**What healer fixes:**
|
|
314
|
+
- โ
Endpoint URL updates (if API version changes)
|
|
315
|
+
- โ
Response schema corrections (new/removed fields)
|
|
316
|
+
- โ
Data type adjustments (string vs number IDs)
|
|
317
|
+
- โ
Status code updates
|
|
204
318
|
|
|
205
|
-
###
|
|
319
|
+
### Scenario 2: Quick API Documentation with Postman
|
|
206
320
|
|
|
207
|
-
**
|
|
321
|
+
**What healer fixes:**
|
|
322
|
+
- โ
Endpoint URL updates (if API version changes)
|
|
323
|
+
- โ
Response schema corrections (new/removed fields)
|
|
324
|
+
- โ
Data type adjustments (string vs number IDs)
|
|
325
|
+
- โ
Status code updates
|
|
208
326
|
|
|
209
|
-
|
|
210
|
-
# 1. ๐ Analyze API and create comprehensive test plan
|
|
211
|
-
@๐ api-planner analyze our user management API using the OpenAPI spec at https://api.example.com/swagger.json
|
|
327
|
+
### Scenario 2: Quick API Documentation with Postman
|
|
212
328
|
|
|
213
|
-
|
|
214
|
-
@๐ api-generator create Jest and Playwright tests from the generated test plan
|
|
329
|
+
**Goal:** Generate a ready-to-use Postman collection for the Fake REST API
|
|
215
330
|
|
|
216
|
-
# 3. ๐ ๏ธ Automatically heal any failing tests
|
|
217
|
-
@๐ api-healer fix the failing authentication tests in ./tests/user-api.test.js
|
|
218
331
|
```
|
|
332
|
+
Step 1:
|
|
333
|
+
@๐ api-planner create test plan from
|
|
334
|
+
https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json
|
|
335
|
+
with validation enabled to test actual endpoints
|
|
219
336
|
|
|
220
|
-
|
|
337
|
+
Step 2:
|
|
338
|
+
@๐ api-generator create Postman collection from the test plan
|
|
339
|
+
with all endpoints and example requests
|
|
221
340
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
341
|
+
Step 3:
|
|
342
|
+
Import the generated collection into Postman and start testing!
|
|
343
|
+
```
|
|
225
344
|
|
|
226
|
-
|
|
227
|
-
|
|
345
|
+
**What you get:**
|
|
346
|
+
- ๐ฆ `postman/FakeRestAPI.postman_collection.json` - Complete collection
|
|
347
|
+
- ๐ `postman/environment.json` - Environment variables
|
|
348
|
+
- โ
20+ pre-configured requests across all resource types
|
|
349
|
+
- ๐ Example request bodies with realistic data
|
|
350
|
+
- โ๏ธ Response validation tests included
|
|
228
351
|
|
|
229
|
-
|
|
230
|
-
@๐ api-healer analyze and fix all failing tests in ./tests/ directory with detailed healing report
|
|
231
|
-
```
|
|
352
|
+
**Result:** Professional Postman collection ready to share with your team
|
|
232
353
|
|
|
233
|
-
|
|
354
|
+
---
|
|
234
355
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
356
|
+
## ๐ง Calling Individual Tools
|
|
357
|
+
|
|
358
|
+
### When to Use Individual Tools
|
|
359
|
+
|
|
360
|
+
**Use agents (@api-planner, @api-generator, @api-healer) when:**
|
|
361
|
+
- You want AI assistance and recommendations
|
|
362
|
+
- You're working on complex, multi-step workflows
|
|
363
|
+
- You need explanations and best practices
|
|
364
|
+
|
|
365
|
+
**Use individual tools when:**
|
|
366
|
+
- You need precise control over parameters
|
|
367
|
+
- You're automating tests in CI/CD
|
|
368
|
+
- You're integrating with other tools
|
|
369
|
+
- You want to script repetitive tasks
|
|
239
370
|
|
|
240
|
-
|
|
241
|
-
@๐ api-generator create Jest tests with environment-specific configurations for dev, staging, and prod
|
|
371
|
+
### Tool 1: `api_planner`
|
|
242
372
|
|
|
243
|
-
|
|
244
|
-
@๐ api-
|
|
373
|
+
```
|
|
374
|
+
@๐ api-generator create Jest tests with environment-specific configurations
|
|
375
|
+
for dev (api-dev.example.com), staging (api-staging.example.com),
|
|
376
|
+
and prod (api.example.com) environments
|
|
245
377
|
```
|
|
246
378
|
|
|
247
|
-
**
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
|
|
379
|
+
**What you get:**
|
|
380
|
+
```javascript
|
|
381
|
+
// tests/config/environments.js
|
|
382
|
+
module.exports = {
|
|
383
|
+
dev: { baseURL: 'https://api-dev.example.com', timeout: 5000 },
|
|
384
|
+
staging: { baseURL: 'https://api-staging.example.com', timeout: 3000 },
|
|
385
|
+
prod: { baseURL: 'https://api.example.com', timeout: 2000 }
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
// Run with: NODE_ENV=staging npm test
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
## ๏ฟฝ Calling Individual Tools
|
|
394
|
+
|
|
395
|
+
### When to Use Individual Tools
|
|
396
|
+
|
|
397
|
+
**Use agents (@api-planner, @api-generator, @api-healer) when:**
|
|
398
|
+
- You want AI assistance and recommendations
|
|
399
|
+
- You're working on complex, multi-step workflows
|
|
400
|
+
- You need explanations and best practices
|
|
401
|
+
|
|
402
|
+
**Use individual tools when:**
|
|
403
|
+
- You need precise control over parameters
|
|
404
|
+
- You're automating tests in CI/CD
|
|
405
|
+
- You're integrating with other tools
|
|
406
|
+
- You want to script repetitive tasks
|
|
251
407
|
|
|
252
|
-
|
|
253
|
-
@๐ api-generator create comprehensive Playwright tests with modern async/await patterns
|
|
408
|
+
### Tool 1: `api_planner`
|
|
254
409
|
|
|
255
|
-
|
|
256
|
-
|
|
410
|
+
**Purpose:** Analyze API schemas and generate comprehensive test plans with realistic sample data
|
|
411
|
+
|
|
412
|
+
**Basic usage:**
|
|
413
|
+
```javascript
|
|
414
|
+
// In Claude Desktop or MCP client
|
|
415
|
+
{
|
|
416
|
+
"tool": "api_planner",
|
|
417
|
+
"parameters": {
|
|
418
|
+
"schemaUrl": "https://api.example.com/swagger.json",
|
|
419
|
+
"schemaType": "openapi",
|
|
420
|
+
"outputPath": "./test-plan.md"
|
|
421
|
+
}
|
|
422
|
+
}
|
|
257
423
|
```
|
|
258
424
|
|
|
259
|
-
|
|
425
|
+
**With endpoint validation:**
|
|
426
|
+
```javascript
|
|
427
|
+
{
|
|
428
|
+
"tool": "api_planner",
|
|
429
|
+
"parameters": {
|
|
430
|
+
"schemaUrl": "https://petstore3.swagger.io/api/v3/openapi.json",
|
|
431
|
+
"schemaType": "openapi",
|
|
432
|
+
"outputPath": "./api-test-plan.md",
|
|
433
|
+
"includeAuth": true,
|
|
434
|
+
"includeSecurity": true,
|
|
435
|
+
"includeErrorHandling": true,
|
|
436
|
+
"testCategories": ["functional", "security", "edge-cases"],
|
|
437
|
+
"validateEndpoints": true,
|
|
438
|
+
"validationSampleSize": 3,
|
|
439
|
+
"validationTimeout": 5000
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
```
|
|
260
443
|
|
|
261
|
-
**
|
|
444
|
+
**Parameters explained:**
|
|
445
|
+
- `schemaUrl` - URL to fetch API schema (OpenAPI/Swagger, GraphQL introspection endpoint)
|
|
446
|
+
- `schemaContent` - Direct schema content as JSON/YAML string (alternative to schemaUrl)
|
|
447
|
+
- `schemaType` - Type of schema: `openapi`, `swagger`, `graphql`, `auto` (default: auto)
|
|
448
|
+
- `apiBaseUrl` - Base URL of the API (overrides schema baseUrl if provided)
|
|
449
|
+
- `includeAuth` - Include authentication testing scenarios (default: true)
|
|
450
|
+
- `includeSecurity` - Include security testing scenarios (default: true)
|
|
451
|
+
- `includeErrorHandling` - Include error handling scenarios (default: true)
|
|
452
|
+
- `outputPath` - File path to save test plan (default: ./api-test-plan.md)
|
|
453
|
+
- `testCategories` - Types of tests: `functional`, `security`, `performance`, `integration`, `edge-cases`
|
|
454
|
+
- `validateEndpoints` - Make actual API calls to validate endpoints (default: false)
|
|
455
|
+
- `validationSampleSize` - Number of endpoints to validate, use -1 for all (default: 3)
|
|
456
|
+
- `validationTimeout` - Timeout per validation request in ms (default: 5000)
|
|
457
|
+
|
|
458
|
+
### Tool 2: `api_generator`
|
|
459
|
+
|
|
460
|
+
**Purpose:** Generate executable tests (Playwright, Jest, Postman) from test plans using AI
|
|
461
|
+
|
|
462
|
+
**Generate Playwright tests:**
|
|
463
|
+
```javascript
|
|
464
|
+
{
|
|
465
|
+
"tool": "api_generator",
|
|
466
|
+
"parameters": {
|
|
467
|
+
"testPlanPath": "./test-plan.md",
|
|
468
|
+
"outputFormat": "playwright",
|
|
469
|
+
"outputDir": "./tests",
|
|
470
|
+
"includeSetup": true,
|
|
471
|
+
"language": "typescript"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
```
|
|
262
475
|
|
|
263
|
-
|
|
476
|
+
**Generate Jest tests:**
|
|
477
|
+
```javascript
|
|
478
|
+
{
|
|
479
|
+
"tool": "api_generator",
|
|
480
|
+
"parameters": {
|
|
481
|
+
"testPlanPath": "./test-plan.md",
|
|
482
|
+
"outputFormat": "jest",
|
|
483
|
+
"outputDir": "./tests",
|
|
484
|
+
"testFramework": "jest",
|
|
485
|
+
"baseUrl": "https://api.example.com"
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
```
|
|
264
489
|
|
|
490
|
+
**Generate Postman collection:**
|
|
265
491
|
```javascript
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
492
|
+
{
|
|
493
|
+
"tool": "api_generator",
|
|
494
|
+
"parameters": {
|
|
495
|
+
"testPlanPath": "./test-plan.md",
|
|
496
|
+
"outputFormat": "postman",
|
|
497
|
+
"outputDir": "./postman",
|
|
498
|
+
"includeAuth": true
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
**Generate all formats:**
|
|
504
|
+
```javascript
|
|
505
|
+
{
|
|
506
|
+
"tool": "api_generator",
|
|
507
|
+
"parameters": {
|
|
508
|
+
"testPlanPath": "./test-plan.md",
|
|
509
|
+
"outputFormat": "all",
|
|
510
|
+
"outputDir": "./tests",
|
|
511
|
+
"language": "typescript"
|
|
273
512
|
}
|
|
274
|
-
}
|
|
513
|
+
}
|
|
275
514
|
```
|
|
276
515
|
|
|
277
|
-
|
|
516
|
+
**Parameters explained:**
|
|
517
|
+
- `testPlanPath` - Path to test plan markdown file
|
|
518
|
+
- `testPlanContent` - Direct test plan content as markdown (alternative to testPlanPath)
|
|
519
|
+
- `outputFormat` - Format: `playwright`, `postman`, `jest`, `all` (default: all)
|
|
520
|
+
- `outputDir` - Directory to save generated tests (default: ./tests)
|
|
521
|
+
- `sessionId` - Session ID for tracking generated tests
|
|
522
|
+
- `includeAuth` - Include authentication setup (default: true)
|
|
523
|
+
- `includeSetup` - Include test setup/teardown code (default: true)
|
|
524
|
+
- `testFramework` - Framework: `jest`, `mocha`, `playwright-test`
|
|
525
|
+
- `baseUrl` - Base URL for API (optional)
|
|
526
|
+
- `language` - Language: `javascript`, `typescript` (default: typescript)
|
|
527
|
+
|
|
528
|
+
### Tool 3: `api_healer`
|
|
529
|
+
|
|
530
|
+
**Purpose:** Debug and automatically fix failing API tests
|
|
278
531
|
|
|
532
|
+
**Fix specific test file:**
|
|
279
533
|
```javascript
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
body: { name: "John Doe" }
|
|
534
|
+
{
|
|
535
|
+
"tool": "api_healer",
|
|
536
|
+
"parameters": {
|
|
537
|
+
"testPath": "./tests/auth.test.js",
|
|
538
|
+
"testType": "auto",
|
|
539
|
+
"autoFix": true,
|
|
540
|
+
"backupOriginal": true
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
**Fix multiple test files:**
|
|
546
|
+
```javascript
|
|
547
|
+
{
|
|
548
|
+
"tool": "api_healer",
|
|
549
|
+
"parameters": {
|
|
550
|
+
"testFiles": ["./tests/auth.test.js", "./tests/users.test.js"],
|
|
551
|
+
"testType": "playwright",
|
|
552
|
+
"healingStrategies": ["schema-update", "endpoint-fix", "auth-repair"]
|
|
300
553
|
}
|
|
301
|
-
}
|
|
554
|
+
}
|
|
555
|
+
```
|
|
302
556
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
557
|
+
**Analysis only (no fixes):**
|
|
558
|
+
```javascript
|
|
559
|
+
{
|
|
560
|
+
"tool": "api_healer",
|
|
561
|
+
"parameters": {
|
|
562
|
+
"testPath": "./tests/api.test.js",
|
|
563
|
+
"analysisOnly": true
|
|
564
|
+
}
|
|
565
|
+
}
|
|
308
566
|
```
|
|
309
567
|
|
|
310
|
-
|
|
568
|
+
**Parameters explained:**
|
|
569
|
+
- `testPath` - Path to a specific test file to heal
|
|
570
|
+
- `testFiles` - Array of test file paths (alternative to testPath)
|
|
571
|
+
- `testType` - Type: `jest`, `playwright`, `postman`, `auto` (default: auto)
|
|
572
|
+
- `sessionId` - Session ID for tracking healing process
|
|
573
|
+
- `maxHealingAttempts` - Max attempts per test (default: 3)
|
|
574
|
+
- `autoFix` - Automatically apply fixes (default: true)
|
|
575
|
+
- `backupOriginal` - Create backup files (default: true)
|
|
576
|
+
- `analysisOnly` - Only analyze without fixing (default: false)
|
|
577
|
+
- `healingStrategies` - Specific strategies: `schema-update`, `endpoint-fix`, `auth-repair`, `data-correction`, `assertion-update`
|
|
578
|
+
|
|
579
|
+
### Tool 4: `api_project_setup`
|
|
311
580
|
|
|
581
|
+
**Purpose:** Detect project configuration for test generation
|
|
582
|
+
|
|
583
|
+
**Detect project configuration:**
|
|
312
584
|
```javascript
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
585
|
+
{
|
|
586
|
+
"tool": "api_project_setup",
|
|
587
|
+
"parameters": {
|
|
588
|
+
"outputDir": "./tests"
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
**What it does:**
|
|
594
|
+
- Scans for `playwright.config.ts/js`, `jest.config.ts/js`, `tsconfig.json`
|
|
595
|
+
- Auto-detects framework (Playwright/Jest) and language (TypeScript/JavaScript)
|
|
596
|
+
- Returns configuration or prompts user if ambiguous
|
|
597
|
+
- **Must be called BEFORE `api_generator`** for optimal test generation
|
|
598
|
+
|
|
599
|
+
**Response (when auto-detected):**
|
|
600
|
+
```json
|
|
601
|
+
{
|
|
602
|
+
"success": true,
|
|
603
|
+
"autoDetected": true,
|
|
604
|
+
"config": {
|
|
605
|
+
"framework": "playwright",
|
|
606
|
+
"language": "typescript",
|
|
607
|
+
"hasTypeScript": true,
|
|
608
|
+
"hasPlaywrightConfig": true,
|
|
609
|
+
"configFiles": ["playwright.config.ts", "tsconfig.json"]
|
|
610
|
+
},
|
|
611
|
+
"nextStep": "Call api_generator with outputFormat: 'playwright' and language: 'typescript'"
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
**Response (when user input needed):**
|
|
616
|
+
```json
|
|
617
|
+
{
|
|
618
|
+
"success": true,
|
|
619
|
+
"needsUserInput": true,
|
|
620
|
+
"prompts": [
|
|
317
621
|
{
|
|
318
|
-
name: "
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
data: { name: "Jane Doe", email: "jane@example.com" },
|
|
322
|
-
expect: { status: 201 },
|
|
323
|
-
extract: { userId: "id" }
|
|
622
|
+
"name": "framework",
|
|
623
|
+
"question": "Which test framework would you like to use?",
|
|
624
|
+
"choices": ["playwright", "jest", "postman", "all"]
|
|
324
625
|
},
|
|
325
626
|
{
|
|
326
|
-
name: "
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
expect: {
|
|
330
|
-
status: 200,
|
|
331
|
-
body: { name: "Jane Doe" }
|
|
332
|
-
}
|
|
627
|
+
"name": "language",
|
|
628
|
+
"question": "Which language would you like to use?",
|
|
629
|
+
"choices": ["typescript", "javascript"]
|
|
333
630
|
}
|
|
334
631
|
]
|
|
335
|
-
}
|
|
632
|
+
}
|
|
336
633
|
```
|
|
337
634
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
635
|
+
**Parameters:**
|
|
636
|
+
- `outputDir` - Directory for tests (default: `./tests`). Used to locate project root
|
|
637
|
+
- `promptUser` - Force user prompts even if config detected (default: false)
|
|
341
638
|
|
|
342
|
-
###
|
|
639
|
+
### Tool 5: `api_request`
|
|
343
640
|
|
|
344
|
-
|
|
641
|
+
**Purpose:** Execute individual HTTP requests with validation
|
|
345
642
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
643
|
+
**Simple GET request:**
|
|
644
|
+
```javascript
|
|
645
|
+
{
|
|
646
|
+
"tool": "api_request",
|
|
647
|
+
"parameters": {
|
|
648
|
+
"method": "GET",
|
|
649
|
+
"url": "https://api.example.com/users/1",
|
|
650
|
+
"expect": {
|
|
651
|
+
"status": 200,
|
|
652
|
+
"contentType": "application/json"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
350
656
|
```
|
|
351
657
|
|
|
352
|
-
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
658
|
+
**POST with authentication:**
|
|
659
|
+
```javascript
|
|
660
|
+
{
|
|
661
|
+
"tool": "api_request",
|
|
662
|
+
"parameters": {
|
|
663
|
+
"method": "POST",
|
|
664
|
+
"url": "https://api.example.com/users",
|
|
665
|
+
"headers": {
|
|
666
|
+
"Authorization": "Bearer your-token-here",
|
|
667
|
+
"Content-Type": "application/json"
|
|
668
|
+
},
|
|
669
|
+
"data": {
|
|
670
|
+
"name": "John Doe",
|
|
671
|
+
"email": "john@example.com"
|
|
672
|
+
},
|
|
673
|
+
"expect": {
|
|
674
|
+
"status": 201,
|
|
675
|
+
"body": {
|
|
676
|
+
"name": "John Doe",
|
|
677
|
+
"email": "john@example.com"
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
364
682
|
```
|
|
365
683
|
|
|
366
|
-
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
|
|
684
|
+
**Request chaining (use response in next request):**
|
|
685
|
+
```javascript
|
|
686
|
+
{
|
|
687
|
+
"tool": "api_request",
|
|
688
|
+
"parameters": {
|
|
689
|
+
"sessionId": "user-workflow",
|
|
690
|
+
"chain": [
|
|
691
|
+
{
|
|
692
|
+
"name": "create_user",
|
|
693
|
+
"method": "POST",
|
|
694
|
+
"url": "https://api.example.com/users",
|
|
695
|
+
"data": { "name": "Jane Doe" },
|
|
696
|
+
"extract": { "userId": "id" }
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"name": "get_user",
|
|
700
|
+
"method": "GET",
|
|
701
|
+
"url": "https://api.example.com/users/{{ create_user.userId }}",
|
|
702
|
+
"expect": { "status": 200 }
|
|
703
|
+
}
|
|
704
|
+
]
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
```
|
|
370
708
|
|
|
371
|
-
|
|
372
|
-
|
|
709
|
+
**Parameters explained:**
|
|
710
|
+
- `method` - HTTP method (GET, POST, PUT, DELETE, PATCH, etc.)
|
|
711
|
+
- `url` - Target endpoint
|
|
712
|
+
- `headers` - Custom headers (authentication, content-type)
|
|
713
|
+
- `data` - Request body for POST/PUT/PATCH
|
|
714
|
+
- `expect` - Validation rules (status, headers, body)
|
|
715
|
+
- `sessionId` - Group related requests
|
|
716
|
+
- `chain` - Execute multiple requests in sequence
|
|
373
717
|
|
|
374
|
-
|
|
375
|
-
npx @democratize-quality/mcp-server --agents --rollback
|
|
376
|
-
```
|
|
718
|
+
### Tool 6: `api_session_status`
|
|
377
719
|
|
|
378
|
-
|
|
720
|
+
**Purpose:** Check status of API test sessions
|
|
379
721
|
|
|
380
|
-
|
|
381
|
-
|
|
722
|
+
**Check session progress:**
|
|
723
|
+
```javascript
|
|
724
|
+
{
|
|
725
|
+
"tool": "api_session_status",
|
|
726
|
+
"parameters": {
|
|
727
|
+
"sessionId": "user-workflow"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
```
|
|
382
731
|
|
|
732
|
+
**Response example:**
|
|
383
733
|
```json
|
|
384
734
|
{
|
|
385
|
-
"
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
"OUTPUT_DIR": "./api-test-reports"
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
"inputs": []
|
|
735
|
+
"sessionId": "user-workflow",
|
|
736
|
+
"totalRequests": 5,
|
|
737
|
+
"successfulRequests": 4,
|
|
738
|
+
"failedRequests": 1,
|
|
739
|
+
"status": "completed",
|
|
740
|
+
"startTime": "2025-10-23T10:00:00Z",
|
|
741
|
+
"endTime": "2025-10-23T10:05:00Z",
|
|
742
|
+
"duration": "5 minutes"
|
|
398
743
|
}
|
|
399
744
|
```
|
|
400
745
|
|
|
401
|
-
|
|
746
|
+
### Tool 7: `api_session_report`
|
|
402
747
|
|
|
403
|
-
|
|
404
|
-
|
|
748
|
+
**Purpose:** Generate comprehensive HTML test reports
|
|
749
|
+
|
|
750
|
+
**Generate report:**
|
|
751
|
+
```javascript
|
|
405
752
|
{
|
|
406
|
-
"
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
"OUTPUT_DIR": "~/api-test-reports"
|
|
412
|
-
}
|
|
413
|
-
}
|
|
753
|
+
"tool": "api_session_report",
|
|
754
|
+
"parameters": {
|
|
755
|
+
"sessionId": "user-workflow",
|
|
756
|
+
"outputPath": "./reports/user-workflow-report.html",
|
|
757
|
+
"includeCharts": true
|
|
414
758
|
}
|
|
415
759
|
}
|
|
416
760
|
```
|
|
417
761
|
|
|
418
|
-
|
|
762
|
+
**What you get:**
|
|
763
|
+
- ๐ Visual charts (success rate, response times)
|
|
764
|
+
- ๐ Request/response details
|
|
765
|
+
- โ
Validation results (pass/fail with diffs)
|
|
766
|
+
- ๐ Timing information
|
|
767
|
+
- ๐ธ Screenshots (if applicable)
|
|
768
|
+
|
|
769
|
+
---
|
|
770
|
+
---
|
|
771
|
+
|
|
772
|
+
## โ๏ธ Configuration
|
|
773
|
+
|
|
774
|
+
### Environment Variables
|
|
775
|
+
|
|
776
|
+
```bash
|
|
777
|
+
NODE_ENV=production # Run in production mode (default)
|
|
778
|
+
OUTPUT_DIR=./api-test-reports # Where to save reports (default)
|
|
779
|
+
MCP_FEATURES_ENABLEDEBUGMODE=true # Enable detailed logging
|
|
780
|
+
```
|
|
781
|
+
|
|
782
|
+
### Command-Line Options
|
|
783
|
+
|
|
784
|
+
```bash
|
|
785
|
+
npx @democratize-quality/mcp-server [options]
|
|
786
|
+
|
|
787
|
+
Options:
|
|
788
|
+
--help, -h Show help information
|
|
789
|
+
--version, -v Display version number
|
|
790
|
+
--agents Install AI testing agents for GitHub Copilot
|
|
791
|
+
--debug Enable debug mode with detailed logs
|
|
792
|
+
--verbose Show detailed installation output
|
|
793
|
+
--port <number> Specify server port (if needed)
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
### VS Code MCP Configuration
|
|
797
|
+
|
|
798
|
+
After running `--agents`, this file is created at `.vscode/mcp.json`:
|
|
799
|
+
|
|
419
800
|
```json
|
|
420
801
|
{
|
|
421
|
-
"
|
|
802
|
+
"servers": {
|
|
422
803
|
"democratize-quality": {
|
|
804
|
+
"type": "stdio",
|
|
423
805
|
"command": "npx",
|
|
424
|
-
"args": ["@democratize-quality/mcp-server"
|
|
806
|
+
"args": ["@democratize-quality/mcp-server"],
|
|
807
|
+
"cwd": "${workspaceFolder}",
|
|
425
808
|
"env": {
|
|
426
|
-
"
|
|
809
|
+
"NODE_ENV": "production",
|
|
810
|
+
"OUTPUT_DIR": "./api-test-reports"
|
|
427
811
|
}
|
|
428
812
|
}
|
|
429
813
|
}
|
|
430
814
|
}
|
|
431
815
|
```
|
|
432
816
|
|
|
433
|
-
### Output Directory
|
|
434
|
-
- **VS Code/Local**: Uses `./output` in your project directory
|
|
435
|
-
- **Claude Desktop**: Uses `~/.mcp-browser-control` (in your home directory)
|
|
436
|
-
- **Custom**: Set `OUTPUT_DIR` environment variable to specify location
|
|
817
|
+
### Output Directory Locations
|
|
437
818
|
|
|
438
|
-
|
|
819
|
+
- **VS Code/Local Projects**: `./api-test-reports` in your project
|
|
820
|
+
- **Claude Desktop**: `~/.mcp-browser-control` in your home directory
|
|
821
|
+
- **Custom Location**: Set `OUTPUT_DIR` environment variable
|
|
439
822
|
|
|
440
|
-
|
|
823
|
+
---
|
|
824
|
+
|
|
825
|
+
---
|
|
826
|
+
|
|
827
|
+
## ๏ฟฝ Troubleshooting
|
|
441
828
|
|
|
442
829
|
### Agent Installation Issues
|
|
443
830
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
831
|
+
<details>
|
|
832
|
+
<summary><strong>Agents not appearing in GitHub Copilot Chat</strong></summary>
|
|
833
|
+
|
|
834
|
+
**Solution:**
|
|
835
|
+
1. Restart VS Code completely
|
|
836
|
+
2. Verify `.vscode/mcp.json` exists in your project root
|
|
837
|
+
3. Check that GitHub Copilot extension is installed and active
|
|
838
|
+
4. Reload the workspace: `Cmd/Ctrl + Shift + P` โ "Developer: Reload Window"
|
|
839
|
+
|
|
840
|
+
</details>
|
|
841
|
+
|
|
842
|
+
<details>
|
|
843
|
+
<summary><strong>"democratize-quality server not found" error</strong></summary>
|
|
844
|
+
|
|
845
|
+
**Solution:**
|
|
846
|
+
1. Test the server: `npx @democratize-quality/mcp-server --help`
|
|
847
|
+
2. Check `.vscode/mcp.json` configuration
|
|
848
|
+
3. Try manual installation of chatmode files
|
|
849
|
+
4. Ensure Node.js 14+ is installed
|
|
449
850
|
|
|
450
|
-
|
|
451
|
-
- Check the MCP configuration in `.vscode/mcp.json`
|
|
452
|
-
- Ensure the server is running: Test with `npx @democratize-quality/mcp-server --help`
|
|
453
|
-
- Try manual installation: Copy `.github/chatmodes/` files and recreate `.vscode/mcp.json`
|
|
851
|
+
</details>
|
|
454
852
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
- Restore from backup: `.vscode/mcp.json.backup.{timestamp}`
|
|
458
|
-
- The installer safely merges configurations, preserving existing servers
|
|
853
|
+
<details>
|
|
854
|
+
<summary><strong>Installation overwrites existing MCP config</strong></summary>
|
|
459
855
|
|
|
460
|
-
**
|
|
461
|
-
-
|
|
462
|
-
-
|
|
463
|
-
-
|
|
856
|
+
**Solution:**
|
|
857
|
+
- Automatic backups are created: `.vscode/mcp.json.backup.{timestamp}`
|
|
858
|
+
- The installer safely merges configurations
|
|
859
|
+
- To restore: Copy backup file back to `mcp.json`
|
|
464
860
|
|
|
465
|
-
|
|
861
|
+
</details>
|
|
466
862
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
- The server automatically creates `~/.mcp-browser-control` in your home directory
|
|
470
|
-
- API test reports will be saved there instead of your project folder
|
|
863
|
+
<details>
|
|
864
|
+
<summary><strong>Permission errors during installation</strong></summary>
|
|
471
865
|
|
|
472
|
-
**
|
|
473
|
-
|
|
474
|
-
|
|
866
|
+
**Solution:**
|
|
867
|
+
1. Check directory permissions for `.github/` and `.vscode/`
|
|
868
|
+
2. Run with elevated permissions if needed: `sudo npx @democratize-quality/mcp-server --agents`
|
|
869
|
+
3. Ensure write access to project directory
|
|
475
870
|
|
|
476
|
-
|
|
477
|
-
- Verify the npx package is published: `npx @democratize-quality/mcp-server --help`
|
|
478
|
-
- Check Claude Desktop logs for detailed error messages
|
|
479
|
-
- Try running directly in terminal first to test functionality
|
|
871
|
+
</details>
|
|
480
872
|
|
|
481
|
-
|
|
482
|
-
- The enhanced validation feature shows "expected vs actual" values
|
|
483
|
-
- Check the generated HTML reports for detailed comparison views
|
|
484
|
-
- Enable debug mode for more detailed logging
|
|
873
|
+
### Common Runtime Issues
|
|
485
874
|
|
|
486
|
-
|
|
875
|
+
<details>
|
|
876
|
+
<summary><strong>API test reports not appearing in expected location</strong></summary>
|
|
487
877
|
|
|
878
|
+
**Solution:**
|
|
879
|
+
- Check the configured `OUTPUT_DIR` environment variable
|
|
880
|
+
- For Claude Desktop: Look in `~/.mcp-browser-control/`
|
|
881
|
+
- For VS Code: Look in `./api-test-reports/` in your project
|
|
882
|
+
- Set custom location: `OUTPUT_DIR=/your/custom/path`
|
|
883
|
+
|
|
884
|
+
</details>
|
|
885
|
+
|
|
886
|
+
<details>
|
|
887
|
+
<summary><strong>Server not starting in Claude Desktop</strong></summary>
|
|
888
|
+
|
|
889
|
+
**Solution:**
|
|
890
|
+
1. Test package availability: `npx @democratize-quality/mcp-server --help`
|
|
891
|
+
2. Check Claude Desktop logs for detailed errors
|
|
892
|
+
3. Verify configuration in `claude_desktop_config.json`
|
|
893
|
+
4. Try running in terminal first to isolate issues
|
|
894
|
+
|
|
895
|
+
</details>
|
|
896
|
+
|
|
897
|
+
<details>
|
|
898
|
+
<summary><strong>API validation failures not showing details</strong></summary>
|
|
899
|
+
|
|
900
|
+
**Solution:**
|
|
901
|
+
- Enhanced validation automatically shows "expected vs actual"
|
|
902
|
+
- Check generated HTML reports for detailed comparisons
|
|
903
|
+
- Enable debug mode: `MCP_FEATURES_ENABLEDEBUGMODE=true`
|
|
904
|
+
- Review session logs with `api_session_status` tool
|
|
905
|
+
|
|
906
|
+
</details>
|
|
907
|
+
|
|
908
|
+
### Getting Help
|
|
909
|
+
|
|
910
|
+
**Enable debug mode for detailed logging:**
|
|
488
911
|
```bash
|
|
489
|
-
#
|
|
912
|
+
# CLI
|
|
490
913
|
npx @democratize-quality/mcp-server --debug
|
|
491
914
|
|
|
492
|
-
#
|
|
915
|
+
# Environment variable
|
|
493
916
|
MCP_FEATURES_ENABLEDEBUGMODE=true node mcpServer.js
|
|
494
917
|
```
|
|
495
918
|
|
|
496
|
-
**
|
|
497
|
-
- **Production
|
|
498
|
-
- **Debug
|
|
499
|
-
|
|
500
|
-
## ๐ Advanced API Testing Features
|
|
919
|
+
**Log levels:**
|
|
920
|
+
- **Production**: Essential startup messages and errors only
|
|
921
|
+
- **Debug**: Detailed request/response logs and validation details
|
|
501
922
|
|
|
502
|
-
|
|
503
|
-
- **๐ง Intelligent Planning**: Automatically analyze API schemas and generate comprehensive test scenarios
|
|
504
|
-
- **โก Multi-Format Generation**: Create Jest, Playwright, and Postman tests from the same test plan
|
|
505
|
-
- **๐ ๏ธ Automatic Healing**: Detect and fix authentication issues, endpoint changes, and schema updates
|
|
506
|
-
- **๐ Schema Analysis**: Parse OpenAPI/Swagger specs and GraphQL schemas automatically
|
|
507
|
-
- **๐ฏ End-to-End Workflow**: Complete testing pipeline from planning to generation to maintenance
|
|
923
|
+
---
|
|
508
924
|
|
|
509
|
-
|
|
510
|
-
- **๐ Session Management**: Track API test sequences across multiple requests
|
|
511
|
-
- **๐ Request Chaining**: Use response data from one request in subsequent requests
|
|
512
|
-
- **โ
Enhanced Validation**: Shows "expected vs actual" values when validation fails
|
|
513
|
-
- **๐ Interactive Reports**: Beautiful HTML test reports with detailed validation results
|
|
514
|
-
- **๐ฏ Comprehensive Testing**: Support for all HTTP methods (GET, POST, PUT, DELETE, PATCH, etc.)
|
|
515
|
-
- **๐ Response Extraction**: Extract and reuse data from API responses
|
|
516
|
-
- **๐ Detailed Logging**: Complete request/response logging for debugging
|
|
925
|
+
## ๏ฟฝ Additional Resources
|
|
517
926
|
|
|
518
|
-
|
|
927
|
+
### Documentation
|
|
519
928
|
|
|
520
|
-
|
|
929
|
+
- ๐ [Getting Started Guide](docs/getting-started.md) - Complete setup walkthrough
|
|
930
|
+
- ๐ง [Tool Reference](docs/api/tool-reference.md) - Detailed tool documentation
|
|
931
|
+
- ๐ฏ [API Tools Usage Guide](docs/api_tools_usage.md) - Advanced examples and patterns
|
|
932
|
+
- ๏ฟฝโ๐ป [Developer Guide](docs/development/adding-tools.md) - Extend the server
|
|
933
|
+
- โ๏ธ [Configuration Guide](docs/development/configuration.md) - Advanced settings
|
|
934
|
+
- ๏ฟฝ [Examples](docs/examples/) - Real-world usage examples
|
|
521
935
|
|
|
522
|
-
|
|
936
|
+
### Quick Links
|
|
523
937
|
|
|
524
|
-
|
|
938
|
+
| Resource | Description |
|
|
939
|
+
|----------|-------------|
|
|
940
|
+
| [GitHub Repository](https://github.com/uppadhyayraj/democratize-quality-mcp-server) | Source code and issues |
|
|
941
|
+
| [Discussions](https://github.com/uppadhyayraj/democratize-quality-mcp-server/discussions) | Community Q&A |
|
|
942
|
+
| [Issue Tracker](https://github.com/uppadhyayraj/democratize-quality-mcp-server/issues) | Bug reports and feature requests |
|
|
943
|
+
| [NPM Package](https://www.npmjs.com/package/@democratize-quality/mcp-server) | Package information |
|
|
525
944
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
- [๐ Getting Started](docs/getting-started.md) - Quick start guide
|
|
529
|
-
- [๐ง Tool Reference](docs/api/tool-reference.md) - Complete tool documentation
|
|
530
|
-
- [๐ฏ API Tools Usage Guide](docs/api_tools_usage.md) - Comprehensive API testing examples and patterns
|
|
531
|
-
- [๐จโ๐ป Developer Guide](docs/development/adding-tools.md) - Extending the server
|
|
532
|
-
- [โ๏ธ Configuration](docs/development/configuration.md) - Advanced configuration
|
|
533
|
-
- [๐ก Examples](docs/examples/) - Real-world usage examples
|
|
945
|
+
---
|
|
534
946
|
|
|
535
947
|
## ๐๏ธ Architecture
|
|
536
948
|
|
|
949
|
+
### Project Structure
|
|
950
|
+
|
|
537
951
|
```
|
|
538
|
-
|
|
539
|
-
โโโ
|
|
540
|
-
โโโ
|
|
541
|
-
|
|
952
|
+
democratize-quality-mcp-server/
|
|
953
|
+
โโโ src/
|
|
954
|
+
โ โโโ tools/
|
|
955
|
+
โ โ โโโ api/ # API testing tools
|
|
956
|
+
โ โ โ โโโ api-planner.js
|
|
957
|
+
โ โ โ โโโ api-generator.js
|
|
958
|
+
โ โ โ โโโ api-healer.js
|
|
959
|
+
โ โ โ โโโ api-project-setup.js
|
|
960
|
+
โ โ โ โโโ api-request.js
|
|
961
|
+
โ โ โ โโโ api-session-status.js
|
|
962
|
+
โ โ โ โโโ api-session-report.js
|
|
963
|
+
โ โ โโโ base/ # Tool framework
|
|
964
|
+
โ โโโ chatmodes/ # AI agent definitions
|
|
965
|
+
โ โ โโโ ๐ api-planner.chatmode.md
|
|
966
|
+
โ โ โโโ ๐ api-generator.chatmode.md
|
|
967
|
+
โ โ โโโ ๐ api-healer.chatmode.md
|
|
968
|
+
โ โโโ config/ # Configuration management
|
|
969
|
+
โ โโโ utils/ # Utility functions
|
|
970
|
+
โโโ docs/ # Documentation
|
|
971
|
+
โโโ mcpServer.js # Main MCP server
|
|
972
|
+
โโโ cli.js # Command-line interface
|
|
542
973
|
```
|
|
543
974
|
|
|
544
975
|
### Key Features
|
|
545
|
-
- **Automatic Tool Discovery**: API tools are automatically loaded and registered
|
|
546
|
-
- **Configuration System**: Environment-based configuration with sensible defaults
|
|
547
|
-
- **Error Handling**: Comprehensive error handling and validation with detailed reporting
|
|
548
|
-
- **Session Management**: Track and manage API test sessions
|
|
549
976
|
|
|
550
|
-
|
|
977
|
+
- **๐ Automatic Tool Discovery**: Tools are automatically loaded and registered
|
|
978
|
+
- **โ๏ธ Configuration System**: Environment-based config with sensible defaults
|
|
979
|
+
- **๐ก๏ธ Error Handling**: Comprehensive validation and detailed error reporting
|
|
980
|
+
- **๐ Session Management**: Track and manage multi-step API test workflows
|
|
981
|
+
|
|
982
|
+
---
|
|
983
|
+
|
|
984
|
+
## ๐ Security Considerations
|
|
985
|
+
|
|
986
|
+
### Security Posture
|
|
987
|
+
|
|
988
|
+
- **โ
API-Only Mode**: Enabled by default for secure deployments
|
|
989
|
+
- **โ
Standard HTTP Libraries**: All requests use trusted Node.js libraries
|
|
990
|
+
- **โ
No File System Access**: API tools only write to configured output directory
|
|
991
|
+
- **โ
No Browser Automation**: No browser processes in API-only mode
|
|
992
|
+
|
|
993
|
+
### Production Deployment Best Practices
|
|
994
|
+
|
|
995
|
+
```json
|
|
996
|
+
{
|
|
997
|
+
"mcpServers": {
|
|
998
|
+
"democratize-quality": {
|
|
999
|
+
"command": "npx",
|
|
1000
|
+
"args": ["@democratize-quality/mcp-server"],
|
|
1001
|
+
"env": {
|
|
1002
|
+
"NODE_ENV": "production",
|
|
1003
|
+
"OUTPUT_DIR": "~/api-test-reports"
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
```
|
|
1009
|
+
|
|
1010
|
+
### Security Recommendations
|
|
1011
|
+
|
|
1012
|
+
1. **๐ Secure Output Directory**: Set appropriate permissions on report directories
|
|
1013
|
+
2. **๐ Regular Updates**: Keep the package updated for security patches
|
|
1014
|
+
3. **๐ Environment Separation**: Use different configs for dev vs production
|
|
1015
|
+
4. **๐ Monitoring**: Enable debug mode during initial deployment to monitor usage
|
|
1016
|
+
5. **๏ฟฝ API Keys**: Never commit API keys or tokens to version control
|
|
1017
|
+
6. **๐ Network Security**: Use HTTPS endpoints for production API testing
|
|
1018
|
+
|
|
1019
|
+
---
|
|
1020
|
+
|
|
1021
|
+
## ๐จโ๐ป Development & Contributing
|
|
1022
|
+
|
|
1023
|
+
### Adding New Tools
|
|
551
1024
|
|
|
552
|
-
### Adding New API Tools
|
|
553
1025
|
1. Create tool file in `src/tools/api/`
|
|
554
1026
|
2. Extend `ToolBase` class
|
|
555
1027
|
3. Define tool schema and implementation
|
|
556
1028
|
4. Tools are automatically discovered!
|
|
557
1029
|
|
|
558
|
-
|
|
1030
|
+
**Example tool structure:**
|
|
559
1031
|
```javascript
|
|
1032
|
+
const ToolBase = require('../base/ToolBase');
|
|
1033
|
+
|
|
560
1034
|
class MyApiTool extends ToolBase {
|
|
561
1035
|
static definition = {
|
|
562
1036
|
name: "my_api_tool",
|
|
563
|
-
description: "Performs API testing operations",
|
|
564
|
-
input_schema: {
|
|
565
|
-
|
|
1037
|
+
description: "Performs custom API testing operations",
|
|
1038
|
+
input_schema: {
|
|
1039
|
+
type: "object",
|
|
1040
|
+
properties: {
|
|
1041
|
+
endpoint: { type: "string", description: "API endpoint URL" }
|
|
1042
|
+
},
|
|
1043
|
+
required: ["endpoint"]
|
|
1044
|
+
}
|
|
566
1045
|
};
|
|
567
1046
|
|
|
568
1047
|
async execute(parameters) {
|
|
569
|
-
//
|
|
570
|
-
return {
|
|
1048
|
+
// Implementation
|
|
1049
|
+
return {
|
|
1050
|
+
success: true,
|
|
1051
|
+
data: { /* results */ }
|
|
1052
|
+
};
|
|
571
1053
|
}
|
|
572
1054
|
}
|
|
1055
|
+
|
|
1056
|
+
module.exports = MyApiTool;
|
|
573
1057
|
```
|
|
574
1058
|
|
|
575
|
-
|
|
1059
|
+
### Running Tests
|
|
576
1060
|
|
|
577
1061
|
```bash
|
|
578
|
-
# Run
|
|
1062
|
+
# Run test suite
|
|
579
1063
|
npm test
|
|
580
1064
|
|
|
581
|
-
# Run
|
|
582
|
-
npm run
|
|
583
|
-
```
|
|
1065
|
+
# Run MCP inspector for development
|
|
1066
|
+
npm run inspector
|
|
584
1067
|
|
|
585
|
-
|
|
1068
|
+
# Start server in debug mode
|
|
1069
|
+
npm run dev
|
|
1070
|
+
```
|
|
586
1071
|
|
|
587
|
-
###
|
|
588
|
-
- **API-Only Mode**: Enabled by default for secure, lightweight deployments
|
|
589
|
-
- **HTTP Requests**: All API requests are performed using standard HTTP libraries
|
|
590
|
-
- **No File System Access**: API tools don't access local file system (except for report generation)
|
|
591
|
-
- **No Browser Automation**: No browser processes are launched in API-only mode
|
|
1072
|
+
### Contributing Guidelines
|
|
592
1073
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
"args": ["@democratize-quality/mcp-server"],
|
|
600
|
-
"env": {
|
|
601
|
-
"NODE_ENV": "production",
|
|
602
|
-
"OUTPUT_DIR": "~/api-test-reports"
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
```
|
|
1074
|
+
1. ๐ด Fork the repository
|
|
1075
|
+
2. ๐ฟ Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
1076
|
+
3. โ
Add tests for your changes
|
|
1077
|
+
4. ๐ Update documentation
|
|
1078
|
+
5. ๐ Ensure tests pass (`npm test`)
|
|
1079
|
+
6. ๐ค Submit a pull request
|
|
608
1080
|
|
|
609
|
-
|
|
610
|
-
-
|
|
1081
|
+
**What to include in PRs:**
|
|
1082
|
+
- Clear description of changes
|
|
1083
|
+
- Test coverage for new features
|
|
1084
|
+
- Updated documentation
|
|
1085
|
+
- Examples of usage (if applicable)
|
|
611
1086
|
|
|
612
|
-
|
|
613
|
-
1. **Secure Output Directory**: Ensure output directories have appropriate permissions
|
|
614
|
-
2. **Regular Updates**: Keep the package updated for security patches
|
|
615
|
-
3. **Environment Separation**: Use different configurations for development vs production
|
|
616
|
-
4. **Monitoring**: Enable debug mode during initial deployment to monitor API usage
|
|
1087
|
+
---
|
|
617
1088
|
|
|
618
1089
|
## ๐ License
|
|
619
1090
|
|
|
620
|
-
|
|
1091
|
+
ISC License - See [LICENSE](LICENSE) file for details
|
|
621
1092
|
|
|
622
|
-
|
|
1093
|
+
---
|
|
623
1094
|
|
|
624
|
-
|
|
625
|
-
2. Create a feature branch
|
|
626
|
-
3. Add your changes with tests
|
|
627
|
-
4. Update documentation
|
|
628
|
-
5. Submit a pull request
|
|
1095
|
+
## ๐ Acknowledgments
|
|
629
1096
|
|
|
630
|
-
|
|
1097
|
+
Built with the [Model Context Protocol](https://modelcontextprotocol.io/) framework.
|
|
631
1098
|
|
|
632
|
-
|
|
633
|
-
- [Discussions](https://github.com/uppadhyayraj/democratize-quality-mcp-server/discussions) - Questions and community support
|
|
634
|
-
- [Documentation](docs/) - Comprehensive guides and references
|
|
1099
|
+
Special thanks to the MCP community and all contributors!
|
|
635
1100
|
|
|
636
1101
|
---
|
|
637
1102
|
|
|
638
|
-
|
|
1103
|
+
<div align="center">
|
|
1104
|
+
|
|
1105
|
+
**Ready to democratize quality through intelligent API testing!** ๐ฏ
|
|
1106
|
+
|
|
1107
|
+
Made with โค๏ธ by [Raj Uppadhyay](https://github.com/uppadhyayraj)
|
|
1108
|
+
|
|
1109
|
+
[โญ Star on GitHub](https://github.com/uppadhyayraj/democratize-quality-mcp-server) โข [๐ฆ View on NPM](https://www.npmjs.com/package/@democratize-quality/mcp-server) โข [๐ Report Bug](https://github.com/uppadhyayraj/democratize-quality-mcp-server/issues) โข [๐ก Request Feature](https://github.com/uppadhyayraj/democratize-quality-mcp-server/issues)
|
|
639
1110
|
|
|
640
|
-
|
|
1111
|
+
</div>
|