gotrasoft-gotrapowers
v1.0.2
Published
Comprehensive quality gate MCP for Laravel + Go + React development - ensuring production-ready, AI slop-free code with GC architecture validation
Maintainers
Readme
🚀 gotrasoft-gotrapowers
Comprehensive quality gate MCP for Laravel + Go + React development - ensuring production-ready, AI slop-free code with GC architecture validation.
📋 Overview
gotrapowers is a Model Context Protocol (MCP) server that provides quality assurance tools specifically designed for:
- Laravel 10+ with GC (CRUD Generator) architecture
- React/JavaScript frontend development
- Go utility functions
- Integration with Spatie Query Builder, Laravel Sanctum, and custom patterns
🎯 Philosophy
Anti-AI Slop - Ensures code generated by AI or humans meets production standards:
- ✅ Enforces existing architectural patterns
- ✅ Validates GC-generated code integrity
- ✅ Catches common mistakes before deployment
- ✅ Maintains consistency across the codebase
🛠️ Features
Phase 1: Core Quality Gates
1. validate_gc_architecture
Validates GC-generated CRUD modules for completeness and pattern compliance.
Checks:
- Model uses HasUuids + Queryable traits
- Query class exists with proper configuration
- Controller uses ApiResponse trait
- Form Requests (Store + Update) present
- Route registered in api_v1.php
- All files follow GC patterns
Usage:
// Validate all GC modules
gotrapowers.validate_gc_architecture({
project_path: "/path/to/laravel-project"
})
// Validate specific module
gotrapowers.validate_gc_architecture({
project_path: "/path/to/laravel-project",
model_name: "Product"
})2. analyze_laravel_code
Comprehensive code quality analysis for Laravel projects.
Checks:
- Laravel Pint code style
- ApiResponse trait usage
- Queryable trait implementation
- Form Request validation
- Debug code detection
Usage:
// Analyze code
gotrapowers.analyze_laravel_code({
project_path: "/path/to/laravel-project"
})
// Analyze and auto-fix
gotrapowers.analyze_laravel_code({
project_path: "/path/to/laravel-project",
auto_fix: true
})3. run_tests
Execute Laravel test suite and parse results.
Usage:
gotrapowers.run_tests({
project_path: "/path/to/laravel-project",
test_type: "all", // or "feature", "unit"
with_coverage: true
})4. security_scan
Multi-language security scanning.
Checks:
- Mass assignment protection
- SQL injection risks
- XSS vulnerabilities
- Hardcoded secrets
- File upload security
Usage:
gotrapowers.security_scan({
project_path: "/path/to/project",
languages: ["php", "javascript"]
})5. pre_deploy_checklist
Comprehensive deployment readiness validation.
Checklist:
- All tests passing
- Code quality score ≥ 80
- Security score ≥ 90
- No debug code
- GC modules validated
- Migrations safe
- Documentation current
Usage:
gotrapowers.pre_deploy_checklist({
project_path: "/path/to/laravel-project",
branch: "main",
min_quality_score: 80,
min_security_score: 90
})6. check_debug_code
Scan for debug statements across multiple languages.
Usage:
gotrapowers.check_debug_code({
project_path: "/path/to/project",
languages: ["php", "javascript", "go"]
})7. gc_doctor
Health check for GC-generated codebase.
Usage:
gotrapowers.gc_doctor({
project_path: "/path/to/laravel-project",
auto_heal: false
})8. gc_generate ⭐ NEW
Generate complete GC module scaffolding with best practices.
Features:
- Creates Model with HasUuids + Queryable traits
- Generates Query class with filters and sorts
- Creates Controller with ApiResponse trait
- Generates Form Requests (Store + Update)
- Creates Migration with UUID primary key
- Automatically registers API routes
- Optional: Factory and Test files
Usage:
// Generate basic module
gotrapowers.gc_generate({
project_path: "/path/to/laravel-project",
model_name: "Product",
table_name: "products",
fillable: ["name", "description", "price", "category_id"],
relationships: ["belongsTo:category", "hasMany:reviews"]
})
// Generate with factory and tests
gotrapowers.gc_generate({
project_path: "/path/to/laravel-project",
model_name: "User",
fillable: ["name", "email", "phone"],
with_factory: true,
with_test: true
})9. gc_migration_check ⭐ NEW
Check migration status and safety before running migrations.
Features:
- Lists pending migrations
- Detects destructive operations (drop, truncate, delete)
- Validates migration syntax
- Provides safety recommendations
Usage:
gotrapowers.gc_migration_check({
project_path: "/path/to/laravel-project"
})Phase 2: Guided Workflow System ⭐ NEW
10. workflow_start
Start a guided development workflow for consistent development.
Workflow Types:
new_feature: Complete workflow for creating new CRUD modulebug_fix: Workflow for fixing bugs with test-first approachrefactor: Safe refactoring workflowtesting: Testing-focused workflow
Usage:
// Start new feature workflow
gotrapowers.workflow_start({
workflow_type: "new_feature",
feature_name: "Product"
})
// Returns 8-step checklist:
// Step 1: Generate GC Module (gc_generate)
// Step 2: Validate Architecture (validate_gc_architecture)
// Step 3: Check Migration Safety (gc_migration_check)
// Step 4: Run Migration
// Step 5: Code Quality Analysis (analyze_laravel_code)
// Step 6: Security Scan (security_scan)
// Step 7: Run Tests (run_tests)
// Step 8: Final Health Check (gc_doctor)11. gc_command_helper
Get help with GC commands and their MCP tool equivalents.
Usage:
gotrapowers.gc_command_helper({
command_type: "generate" // or: migrate, test, validate
})
// Returns:
// - Command description
// - Corresponding MCP tool
// - Usage examples
// - Best practices12. get_best_practices
Get comprehensive GC development best practices guide.
Usage:
gotrapowers.get_best_practices({})
// Returns complete guide:
// - Standard development workflow
// - Tool usage order
// - Golden rules for consistency
// - Common patterns for different tasks
// - Anti-patterns to avoid📦 Installation
As Global Package (Recommended)
npm install -g gotrasoft-gotrapowersLocal Development
git clone <repository-url>
cd gotrapowers
npm install
npm run build⚙️ Configuration
For Claude Desktop / MCP Clients
Add to your MCP configuration file:
{
"mcpServers": {
"gotrasoft-gotrapowers": {
"command": "npx",
"args": ["-y", "gotrasoft-gotrapowers"]
}
}
}Or if installed globally:
{
"mcpServers": {
"gotrasoft-gotrapowers": {
"command": "gotrasoft-gotrapowers"
}
}
}🔧 Integration with Other MCPs
gotrapowers works seamlessly with:
- gotrasoft-api-testing - API endpoint testing
- gotrasoft-postman - HTTP request execution
- mysql - Database validation
Complete Quality Workflow
// 1. Validate GC Architecture
gotrapowers.validate_gc_architecture({ project_path: "..." })
// 2. Code Quality Analysis
gotrapowers.analyze_laravel_code({ project_path: "...", auto_fix: true })
// 3. Security Scan
gotrapowers.security_scan({ project_path: "..." })
// 4. API Testing (via api-testing MCP)
api_testing.scan_project_full({ project_path: "..." })
api_testing.generate_test_cases({ ... })
// 5. Execute Tests (via postman MCP)
postman.make_request({ ... })
// 6. Run Test Suite
gotrapowers.run_tests({ project_path: "..." })
// 7. Pre-Deploy Validation
gotrapowers.pre_deploy_checklist({ project_path: "...", branch: "main" })📊 Quality Thresholds
Default thresholds (configurable per project):
- Code Quality: ≥ 80/100
- Security Score: ≥ 90/100
- Test Coverage: ≥ 70%
- GC Module Completeness: 100%
🏗️ Architecture Patterns Validated
GC Module Pattern
Model (HasUuids + Queryable)
↓
Query Class (Spatie Query Builder)
↓
Controller (ApiResponse trait)
↓
Form Requests (Store + Update)
↓
Routes (api_v1.php)API Response Pattern
// Success
responseSuccess($data, $message)
// Created
responseCreated($data, $message)
// Paginated
responseData($paginatedData, $message)
// Error
responseError($message, $statusCode)🔍 Example Workflow
Scenario: Review code before deployment
// Step 1: Health check
const health = await gotrapowers.gc_doctor({
project_path: "/Users/dev/my-laravel-app"
});
// Result: All modules healthy
// Step 2: Code quality
const quality = await gotrapowers.analyze_laravel_code({
project_path: "/Users/dev/my-laravel-app"
});
// Result: Score 85/100 - ✅ Good
// Step 3: Security scan
const security = await gotrapowers.security_scan({
project_path: "/Users/dev/my-laravel-app"
});
// Result: Score 95/100 - ✅ Secure
// Step 4: Pre-deploy check
const deploy = await gotrapowers.pre_deploy_checklist({
project_path: "/Users/dev/my-laravel-app",
branch: "main"
});
// Result: ✅ GO - Ready to deploy🤝 Contributing
Contributions are welcome! This MCP is designed to grow with your project's needs.
📄 License
MIT License - see LICENSE file for details.
👤 Author
I Komang Gede Yuliana
🔗 Related Projects
- gotrasoft-api-testing - Laravel API testing MCP
- gotrasoft-postman - Postman-like HTTP client MCP
📚 Documentation
For detailed documentation on GC commands and patterns, see your project's gc:help command output or refer to the GC documentation in your Laravel project.
⭐ Features Coming Soon
- Phase 2: Advanced architecture validation
- Phase 3: Design system compliance checking
- Phase 4: Workflow automation
- React component analysis
- Go code quality checks
- Performance profiling
- Dependency vulnerability scanning
Built with ❤️ for production-ready code
