@gc-mcp/errordiag
v1.0.0
Published
Intelligent Error Diagnosis MCP Server for automated error diagnosis and fix suggestions
Maintainers
Readme
Intelligent Error Diagnosis MCP Server
An intelligent MCP server that automatically diagnoses service failures, suggests fix strategies, predicts potential failure causes, analyzes error patterns, and recommends prevention measures for microservices architectures.
Features
- 🔍 Service Failure Diagnosis: Automatically diagnose service failures and identify root causes
- 🔧 Fix Strategy Suggestions: Provide intelligent fix strategies for diagnosed issues
- 🔮 Failure Prediction: Predict potential failure causes based on current metrics
- 📊 Error Pattern Analysis: Analyze error patterns and trends across services
- 🛡️ Prevention Measures: Recommend prevention measures based on error history
Tools
1. diagnose_service_failure
Diagnose service failures and identify root causes based on symptoms and context.
Input:
service: Name of the service experiencing issuessymptoms: Array of observed symptoms (logs, metrics, behaviors, etc.)context: Service context including environment, urgency, team expertise
Output:
- Diagnosis with error type, root cause, and confidence level
- Alternative diagnoses
- Next steps and estimated resolution time
2. suggest_fix_strategies
Suggest fix strategies for diagnosed issues with risk assessment.
Input:
diagnosis: The diagnosis to suggest fixes forconstraints: Optional constraints (time limit, resources, risk tolerance)
Output:
- Array of fix strategies with steps and rollback plans
- Recommended strategy
- Risk assessment and mitigation strategies
3. predict_failure_causes
Predict potential failure causes based on current metrics and patterns.
Input:
service: Name of the service to analyzefeatures: Current metrics, logs, and performance indicatorstimeHorizon: Optional time horizon for prediction
Output:
- Predictions with confidence levels and timeframes
- Risk level assessment
- Recommended actions and monitoring suggestions
4. analyze_error_patterns
Analyze error patterns and trends across services.
Input:
service: Name of the service to analyzetimeRange: Time range for analysiserrorTypes: Optional specific error types to focus onseverity: Optional minimum severity level
Output:
- Identified error patterns
- Trend analysis
- Insights and recommendations
5. recommend_prevention_measures
Recommend prevention measures based on error history and current configuration.
Input:
service: Name of the serviceerrorHistory: Historical error datacurrentConfiguration: Current service configurationteamCapabilities: Team's technical capabilities
Output:
- Prevention measures with implementation details
- Implementation plan with phases and timeline
- Success metrics and monitoring strategy
Installation
# Clone the repository
git clone <repository-url>
cd intelligent-error-diagnosis
# Install dependencies
npm install
# Build the project
npm run buildUsage
As MCP Server
# Run the server
npm start
# Or use the binary
./bin/mcp-error-diagnosisDocker
# Build the Docker image
npm run docker:build
# Run with Docker Compose
docker-compose up
# Or run directly
npm run docker:runConfiguration
The server can be configured using environment variables:
# Server configuration
SERVER_NAME=intelligent-error-diagnosis-mcp-server
SERVER_VERSION=1.0.0
PORT=3000
HOST=localhost
# Diagnosis configuration
CONFIDENCE_THRESHOLD=0.5
MAX_SYMPTOMS=100
PATTERN_RECOGNITION_ENABLED=true
PREDICTION_ENABLED=true
# Monitoring configuration
MONITORING_ENABLED=false
METRICS_ENDPOINT=/metrics
HEALTH_CHECK_INTERVAL=30
# Logging configuration
LOG_LEVEL=info
ENABLE_DEBUG=falseTesting
# Run unit tests
npm test
# Run tests with coverage
npm run test:coverage
# Run end-to-end tests
npm run test:e2e
# Run tests with UI
npm run test:uiDevelopment
# Start development mode
npm run dev
# Run linting
npm run lint
# Fix linting issues
npm run lint:fix
# Type checking
npm run type-checkArchitecture
The server consists of several core components:
- ErrorPatternRecognizer: Recognizes error patterns from symptoms
- DiagnosisEngine: Performs root cause analysis and generates diagnoses
- FixSuggestionEngine: Suggests fix strategies based on diagnoses
- PreventionEngine: Recommends prevention measures
- FailurePredictor: Predicts potential failure causes
Error Types Supported
- Memory leaks and resource exhaustion
- Database connection pool exhaustion
- Circuit breaker patterns
- Performance degradation
- Service dependency failures
- Configuration issues
License
MIT
