MeerModii/AI-MCP-Server
If you are the rightful owner of AI-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Automated Testing Suite MCP Server is a robust, enterprise-grade server designed for generating automated testing suites using AI.
Automated Testing Suite MCP Server
A high-end, enterprise-grade MCP server for automated testing suite generation. This server scans codebases, identifies functions, generates unit tests using AI, and integrates with testing frameworks like Jest. Built with robustness, security, and scalability in mind for big tech companies.
Features
Core Functionality
- Advanced Codebase Scanning: Identifies functions and classes in large codebases with security validation
- AI-Powered Test Generation: Uses OpenAI GPT-4 to generate comprehensive unit tests with caching
- Framework Integration: Supports Jest and other testing frameworks
- Company-Standard: Designed for use in complex, enterprise-level projects
Enterprise Features
- Structured Logging: Winston-based logging with file and console outputs
- Response Caching: Node-cache for improved performance on repeated requests
- Rate Limiting: Built-in rate limiting to prevent abuse
- Security Controls: Path validation and access control for secure operations
- Error Handling: Comprehensive error handling with graceful degradation
- Health Monitoring: Built-in health check endpoint for monitoring
- Configuration Management: Environment-based configuration with validation
- Graceful Shutdown: Proper cleanup on process termination
Setup
- Install dependencies:
npm install - Copy environment configuration:
cp .env.example .env - Set your OpenAI API key in
.env - Build the project:
npm run build - Run the server:
node build/index.js
Configuration
Create a .env file based on .env.example:
# OpenAI API Configuration
OPENAI_API_KEY=your_openai_api_key_here
# Logging Configuration
LOG_LEVEL=info
# Security Configuration (comma-separated allowed paths)
ALLOWED_PATHS=/path/to/allowed/codebase1,/path/to/allowed/codebase2
# Server Configuration
PORT=3000
Usage
Connect this MCP server to your AI client (e.g., Claude Desktop) using the provided .vscode/mcp.json configuration.
Available Tools
-
scan_codebase: Scan codebase with security validation
- Input:
{"path": "/path/to/codebase"} - Returns: Array of identified functions with metadata
- Input:
-
generate_tests: Generate AI-powered unit tests
- Input:
{"functionsData": [...], "language": "javascript"} - Returns: Generated test code with caching
- Input:
-
run_tests: Execute test files
- Input:
{"testFiles": ["test/file1.js", "test/file2.js"]} - Returns: Test execution results
- Input:
-
health_check: Server health and status
- Input:
{} - Returns: Server health metrics and statistics
- Input:
Security
- Path access validation prevents unauthorized file system access
- Rate limiting protects against abuse
- Input validation using Zod schemas
- Secure environment variable handling
- File size limits prevent memory exhaustion
Monitoring
- Comprehensive logging to
logs/directory - Health check endpoint for monitoring systems
- Cache statistics and performance metrics
- Rate limiting status tracking
Requirements
- Node.js 18+
- OpenAI API key
- TypeScript
- 2GB+ RAM recommended for large codebases
Architecture
- Transport: MCP stdio protocol
- Logging: Winston with structured JSON logs
- Caching: Node-cache with TTL
- Validation: Zod schemas
- AI: OpenAI GPT-4 with response caching
- Security: Path validation and rate limiting