saralegui-solutions/mcp-node-expert
If you are the rightful owner of mcp-node-expert and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A sophisticated Model Context Protocol (MCP) server providing comprehensive Node.js and NPM expertise for code validation, best practices analysis, and intelligent auto-fixing capabilities.
Node.js Expert MCP Server
A sophisticated Model Context Protocol (MCP) server providing comprehensive Node.js and NPM expertise for code validation, best practices analysis, and intelligent auto-fixing capabilities. Features advanced learning integration with autonomous pattern recognition and cross-server knowledge sharing.
๐ Features
๐ Core Validation & Analysis
- Project Validation: Complete Node.js project configuration analysis
- Code Review: JavaScript/TypeScript code quality assessment
- Module System Validation: CommonJS, ESM, and mixed module system analysis
- TypeScript Configuration: Comprehensive tsconfig.json validation
- Package.json Analysis: Dependency management and configuration validation
- Best Practices: Context-aware recommendations and improvements
๐ง Learning Integration
- Autonomous Learning: Records all validation and fix operations
- Pattern Recognition: Learns from repeated issues and successful fixes
- Knowledge Enhancement: Applies learned insights to improve validation results
- Cross-server Communication: Integrates with MCP Self-Learning Server
- Performance Optimization: Continuously improves based on usage patterns
๐ ๏ธ Auto-fixing Capabilities
- Safe Fixes: Automatic application of low-risk corrections
- Backup Creation: Automatic file backups before modifications
- Smart Suggestions: Context-aware fix recommendations
- Batch Operations: Multiple issue fixes in single operation
๐ Integration Ready
- Claudio Orchestration: Full integration with multi-agent coordination
- MessageBus Communication: Real-time learning event broadcasting
- Claude Desktop: Seamless Claude Code integration
- Non-blocking Architecture: Graceful degradation when services unavailable
๐ Quick Start
Prerequisites
- Node.js 18.0.0 or higher
- npm or yarn package manager
- TypeScript 5.6.0 or higher
Installation
-
Clone and Navigate
cd /home/ben/saralegui-solutions-llc/mcp-servers/node-expert
-
Install Dependencies
npm install
-
Build the Server
npm run build
-
Configure Claude Desktop Add to your Claude Desktop
claude_desktop_config.json
:{ "mcpServers": { "node-expert": { "command": "node", "args": ["/home/ben/saralegui-solutions-llc/mcp-servers/node-expert/dist/index.js"] } } }
-
Test Installation
npm test
๐ ๏ธ Available Tools
validate_project
Validates entire Node.js project configuration and structure.
Parameters:
projectPath
(required): Path to the Node.js project directoryautoFix
(optional): Automatically apply safe fixes (default: false)includeOptional
(optional): Include optional best practice suggestions (default: true)
Example:
{
"projectPath": "/path/to/your/project",
"autoFix": false,
"includeOptional": true
}
review_code
Reviews JavaScript/TypeScript code for common issues and best practices.
Parameters:
code
(required): Code content to reviewfileName
(optional): Name or path of the filecontext
(optional): Additional context (moduleSystem, hasTypeScript, projectPath)
Example:
{
"code": "const fs = require('fs');\nimport path from 'path';",
"fileName": "example.js",
"context": {
"moduleSystem": "mixed",
"hasTypeScript": false
}
}
suggest_fixes
Provides specific fixes for identified issues.
Parameters:
issues
(required): Array of issues from validationcode
(optional): Original code contentpreferences
(optional): Fix preferences (preferEsm, strictMode, modernSyntax)
auto_fix
Automatically applies safe fixes to code or configuration.
Parameters:
filePath
(required): Path to file to fixissues
(required): Array of specific issues to fixbackup
(optional): Create backup before fixing (default: true)
check_compatibility
Checks dependency compatibility and Node.js version requirements.
Parameters:
packageJsonPath
(required): Path to package.json filenodeVersion
(optional): Target Node.js version (e.g., "18.0.0")
get_best_practices
Retrieves best practices and recommendations for Node.js development.
Parameters:
category
(optional): Specific category (module-system, typescript, package-json, dependencies, all)level
(optional): Experience level (beginner, intermediate, advanced, all)
๐ Learning Features
Event Recording
Automatically records:
- Tool usage patterns
- Success/failure rates
- Performance metrics
- Context information
- User preferences
Pattern Recognition
- Identifies common issue patterns
- Learns successful fix strategies
- Adapts recommendations based on project context
- Improves validation accuracy over time
Knowledge Sharing
- Broadcasts learning events to MCP Self-Learning Server
- Receives insights from other MCP servers
- Updates local knowledge base with learned patterns
- Enhances validation results with community knowledge
โ๏ธ Configuration
Environment Variables
LEARNING_ENABLED
: Enable/disable learning features (default: true)CLAUDIO_ENABLED
: Enable/disable Claudio integration (default: true)MESSAGE_BUS_URL
: MessageBus WebSocket URL (default: ws://localhost:3001)CLAUDIO_URL
: Claudio orchestrator URL (default: http://localhost:3001)LEARNING_BATCH_SIZE
: Learning event batch size (default: 10)LEARNING_FLUSH_INTERVAL
: Event flush interval in ms (default: 30000)
Learning Configuration
# Enable full learning integration
LEARNING_ENABLED=true
CLAUDIO_ENABLED=true
MESSAGE_BUS_URL=ws://localhost:3001
# Disable learning (standalone mode)
LEARNING_ENABLED=false
๐งช Testing
Run All Tests
npm test
Test Learning Integration
./scripts/test-learning.sh
Test Server Integration
./scripts/test-server.sh
Manual Testing
# Test with Claude Desktop
# Use any of the 6 tools through Claude Desktop interface
# Direct MCP testing
echo '{"method":"tools/list","params":{},"id":1,"jsonrpc":"2.0"}' | node dist/index.js
๐๏ธ Architecture
Core Components
- MCP Server: Main Model Context Protocol server implementation
- Validators: Specialized validators for different aspects (module system, TypeScript, package.json)
- Analyzers: Code analysis engines for pattern detection
- Auto-fixers: Intelligent code fixing mechanisms
- Knowledge Base: Local storage for best practices and patterns
- Learning Integration: Autonomous learning and pattern recognition
- Claudio Bridge: Communication with orchestration system
Learning Flow
- Event Capture: All tool interactions are recorded
- Pattern Analysis: Learning integration analyzes usage patterns
- Knowledge Update: Local knowledge base is updated with insights
- Result Enhancement: Validation results are improved with learned patterns
- Cross-server Sharing: Insights are shared with other MCP servers
๐ค Integration
With MCP Self-Learning Server
# Start the learning system
./scripts/start-learning-system.sh
With Claudio Orchestrator
The server automatically registers with Claudio when available and participates in:
- Multi-agent workflows
- Cross-server knowledge sharing
- Performance optimization
- Learning coordination
Standalone Usage
The server operates fully independently when learning services are unavailable:
- All 6 tools function normally
- Local knowledge base provides recommendations
- Graceful degradation ensures reliability
๐ Performance
Metrics Tracked
- Tool execution time
- Validation accuracy
- Fix success rate
- Memory usage
- Learning event processing
Optimization Features
- Non-blocking learning initialization
- Asynchronous event processing
- Local caching of best practices
- Efficient TypeScript compilation
๐ก๏ธ Security
Safe Operations
- All auto-fixes create backups
- No sensitive data in learning events
- Path sanitization in event recording
- Graceful error handling
Data Privacy
- User paths are sanitized before sharing
- No sensitive file content in logs
- Local knowledge base encryption ready
- Opt-out learning configuration
๐ Examples
See the examples/
directory for:
- Basic project validation
- Code review workflows
- Auto-fixing examples
- Learning integration demos
- Claude Desktop usage patterns
๐ง Development
Building from Source
git clone <repository>
cd node-expert
npm install
npm run build
Development Mode
npm run dev
Linting
npm run lint
๐ค Contributing
See CONTRIBUTING.md for development guidelines and contribution process.
๐ Support
- Documentation: See docs/ directory for detailed guides
- Issues: Report issues through the issue tracker
- Integration Help: See INTEGRATION.md for setup assistance
Saralegui Solutions LLC - Autonomous AI Development Tools