QA MCP
by iankar8
README.md
# ๐งช QA MCP - Comprehensive Localhost Quality Assurance
A comprehensive MCP (Model Context Protocol) extension for automated QA testing of localhost applications. Designed for Claude Code to provide intelligent bug detection, console monitoring, and detailed issue reporting.
## ๐ฏ What It Does
**QA MCP** transforms localhost testing from manual checking into **automated, comprehensive quality assurance**:
### โ
**Health Check & Diagnostics**
- **Detailed failure analysis** when localhost isn't working
- **Specific error diagnosis**: ECONNREFUSED, timeouts, HTTP errors
- **Step-by-step troubleshooting** with exact commands to fix issues
### โ
**Real-Time Console Monitoring**
- **JavaScript error detection** with stack traces
- **Network failure analysis** (404s, 500s, CORS issues)
- **Security warning detection** (Mixed content, CSP violations)
- **Performance bottleneck identification**
### โ
**Comprehensive Functional QA**
- **Form testing** and validation checks
- **Navigation link verification**
- **Responsive design testing** across device sizes
- **Accessibility auditing** (missing alt text, form labels)
- **Custom user flow testing**
### โ
**Professional Bug Reports**
- **Issue categorization** by severity (Critical/Major/Minor)
- **Root cause analysis** with specific fix recommendations
- **Visual evidence** via automated screenshots
- **Actionable priority rankings** for development planning
## ๐ Quick Start
### Installation
```bash
# Install globally
npm install -g qa-mcp
# Or clone and build locally
git clone https://github.com/iankar8/qa-mcp.git
cd qa-mcp
npm install
npm run build
npm link
```
### Claude Code Configuration
Add to your Claude Desktop config (`~/.anthropic/claude_desktop_config.json`):
```json
{
"mcpServers": {
"qa-mcp": {
"command": "qa-mcp",
"env": {}
}
}
}
```
### Install the QA Engineer Subagent
```bash
# Copy the subagent to Claude Code
cp qa-engineer.md ~/.anthropic/subagents/
```
### Usage
1. **Start your application:**
```bash
npm run dev # or npm start
```
2. **In Claude Code, ask:**
```
"QA test my localhost application"
```
## ๐ ๏ธ Available Tools
### `health_check`
Advanced endpoint testing with detailed failure analysis:
```javascript
health_check({
url: "http://localhost:3000",
timeout: 10000,
expectedStatus: 200
})
```
### `console_monitor`
Real-time console monitoring with error categorization:
```javascript
console_monitor({
url: "http://localhost:3000",
duration: 30000,
filters: {
errors: true,
warnings: true,
network: true,
security: true
}
})
```
### `functional_qa`
Comprehensive functional testing suite:
```javascript
functional_qa({
url: "http://localhost:3000",
testSuite: "comprehensive", // basic, auth, forms, navigation, responsive
userFlows: [
{
name: "User Signup",
steps: [
{ action: "goto", value: "/auth/signup" },
{ action: "type", selector: "#email", value: "test@example.com" },
{ action: "click", selector: "#signup-button" },
{ action: "verify", selector: "#success", expected: "Account created" }
]
}
]
})
```
### Other Tools
- `capture_screenshot` - Visual evidence collection
- `detect_framework` - Automatic framework detection
- `test_endpoints` - Batch endpoint testing
- `generate_test_report` - Comprehensive HTML/JSON reports
## ๐ Example Workflows
### Broken Application Diagnosis
```
User: "My localhost isn't working"
QA Engineer: ๐จ CRITICAL ISSUE DETECTED
โ Health check FAILED: connect ECONNREFUSED 127.0.0.1:3000
๐ ๏ธ IMMEDIATE ACTIONS REQUIRED:
1. Start development server: npm run dev
2. Check if port 3000 is correct
3. Verify server configuration
๐ก RECOMMENDED: cd /your/project && npm run dev
```
### Comprehensive QA Testing
```
User: "QA test my localhost thoroughly"
QA Engineer: โ
Starting comprehensive QA analysis...
๐ QA RESULTS:
- Total Tests: 15
- Passed: 12 โ
- Failed: 3 โ
- Critical Issues: 1 ๐จ
- Major Issues: 2 โ ๏ธ
๐จ CRITICAL: JavaScript error breaks chat functionality
โ ๏ธ MAJOR: Form validation allows invalid emails
๐ MINOR: Missing alt text on 3 images
๐ Full report generated: qa-report-2024-01-15.html
```
## ๐ง Smart Features
### **Framework-Aware Testing**
- **Next.js**: API route testing, SSR validation
- **React**: Component rendering, console errors
- **Vue.js**: Reactive updates, dev tools
- **Express**: Route testing, middleware validation
- **Generic**: Universal HTTP health checks
### **Intelligent Issue Detection**
- **JavaScript Errors**: Automatic categorization and stack traces
- **Network Failures**: Request/response analysis with suggestions
- **UI Problems**: Layout issues, responsive design failures
- **Performance**: Memory leaks, slow queries, bundle analysis
### **Automated Categorization**
- **Critical**: Breaks core functionality, prevents usage
- **Major**: Significantly impacts user experience
- **Minor**: Polish improvements, accessibility enhancements
## ๐ Sample QA Report
```html
๐งช QA Test Report
Framework: Next.js | Generated: 2024-01-15 14:30:21
๐ QA Summary:
Total Tests: 15 | Passed: 12 | Failed: 3
Critical: 1 | Major: 2 | Minor: 4
๐ Issues Found:
๐จ CRITICAL: TypeError in /api/chat - Chat functionality broken
โ ๏ธ MAJOR: Form validation bypassed on signup page
โ ๏ธ MAJOR: Navigation link returns 404: /pricing
๐ MINOR: Missing alt text on product images
๐ MINOR: Page titles missing for SEO
๐ MINOR: Slow API response: /api/analyze (2.1s)
๐ MINOR: Form labels missing for accessibility
๐ฅ๏ธ Console Monitoring: 1 error, 2 warnings detected
๐งช Functional QA: 12/15 tests passed
๐ธ Visual Evidence: 4 screenshots captured
```
## ๐ค Framework Support
| Framework | Health Checks | Console Monitoring | Functional Testing | Performance |
|-----------|---------------|-------------------|-------------------|-------------|
| Next.js | โ
API routes | โ
SSR errors | โ
Full suite | โ
Bundle |
| React | โ
Dev server | โ
Component errors| โ
UI testing | โ
Memory |
| Vue.js | โ
Dev server | โ
Reactive issues | โ
Component tests| โ
Performance |
| Express | โ
Endpoints | โ
Server errors | โ
Route testing | โ
Response |
| Generic | โ
HTTP checks | โ
JS errors | โ
Basic testing | โ
Load times |
## ๐ Documentation
- [Installation Guide](INSTALLATION.md) - Complete setup instructions
- [QA Demo](QA_DEMO.md) - Comprehensive usage examples
- [Tool Reference](docs/tools.md) - Detailed API documentation
- [Examples](examples/) - Sample configurations and workflows
## ๐ง Development
```bash
# Clone repository
git clone https://github.com/iankar8/qa-mcp.git
cd qa-mcp
# Install dependencies
npm install
# Build
npm run build
# Development mode
npm run dev
# Run tests
npm test
```
## ๐ License
MIT License - see [LICENSE](LICENSE) file for details.
## ๐โโ๏ธ Support
- **Issues**: [GitHub Issues](https://github.com/iankar8/qa-mcp/issues)
- **Discussions**: [GitHub Discussions](https://github.com/iankar8/qa-mcp/discussions)
- **Documentation**: [GitHub Wiki](https://github.com/iankar8/qa-mcp/wiki)
## ๐ Features at a Glance
| Feature | Description | Benefit |
|---------|-------------|---------|
| ๐ฅ Health Diagnostics | Detailed failure analysis | Faster debugging |
| ๐ฅ๏ธ Console Monitoring | Real-time error detection | Catch issues early |
| ๐งช Functional QA | Comprehensive testing suite | Prevent user issues |
| ๐ Bug Reports | Professional issue tracking | Actionable development |
| ๐ธ Visual Evidence | Automated screenshots | Clear problem documentation |
| ๐ฏ Priority Ranking | Issue severity classification | Efficient development focus |
| ๐ค Framework Detection | Automatic project analysis | Zero configuration |
| ๐ Performance Analysis | Speed and memory monitoring | Optimization insights |
---
**QA MCP** - Your automated QA engineer for localhost applications! ๐This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues