Skip to main content
Glama

Fast Mermaid Validator MCP

by ai-of-mine
LATEST_CHANGES.md•6.42 kB
# Latest Changes Summary - Mermaid Validator MCP ## Version Updates: 1.0.15 → 1.0.17 ### šŸ†• NEW in v1.0.17: LLM Integration & Fixed ER Diagrams **LLM-Ready Features:** - āœ… Enhanced validation responses with `applicableSyntax` field for AI integration - āœ… Comprehensive validation instructions for automated diagram fixing - āœ… Fixed ER diagram examples with proper Mermaid syntax **Files Added/Updated:** - `src/services/validationInstructions.js`: LLM-friendly syntax guidance generator - `example/lgicus01_fixed.md`: Fixed invalid ER diagrams with proper node IDs - `example/lgtestp2_fixed.md`: Fixed data types and relationship syntax - `docs/API_RESPONSES.md`: Updated with `applicableSyntax` field documentation - `k8s/hpa-zero-failure.yaml`: Zero-failure HPA configuration for enterprise scaling ### šŸš€ Major Feature: 100% Environment Variable Configuration **Problem Solved**: All validation limits were hardcoded, preventing dynamic configuration per environment. **Solution Implemented**: Complete environment variable support with unlimited mode capability. #### Files Modified: - `src/config/config.js`: Added `parseUnlimitedValue()` and `isUnlimited()` utilities - `src/middleware/security.js`: Replaced all hardcoded limits with configurable values #### New Configuration Options: ```bash # Previously hardcoded, now configurable: MAX_DIAGRAM_CONTENT_LENGTH=1048576 # Was: hardcoded 50000 (now 1MB) MAX_TIMEOUT_MS=60000 # Was: hardcoded 60000 MAX_FILENAME_LENGTH=255 # Was: hardcoded 255 MERMAID_MAX_TEXT_SIZE=1048576 # Was: hardcoded 50000 (now 1MB) MERMAID_MAX_EDGES=10000 # Was: hardcoded 500 (now 10k) MERMAID_MAX_VERTICES=5000 # Was: hardcoded 200 (now 5k) # Production increases: MAX_FILES=100000 # Was: 20 (now 100k files) MAX_FILE_SIZE=104857600 # Was: 10MB (now 100MB) # Unlimited mode support: MAX_FILE_SIZE=-1 # Set any limit to -1 for unlimited ``` ### šŸŽÆ Rate Limiting Delegation (v1.0.15) **Problem Solved**: Application-level rate limiting conflicted with API Gateway billing control. **Solution**: Removed rate limiting from application, delegated to API Gateway. #### Changes: - `src/middleware/security.js`: Converted rate limiter to pass-through function - `src/config/config.js`: Removed rate limiting configuration - Simplified security middleware stack ### šŸ”§ LLM-Friendly Validation Instructions **New Feature**: Enhanced error responses with syntax guidance for automated diagram fixing. #### Files Added: - `src/services/validationInstructions.js`: Comprehensive syntax rule generator #### Enhanced API Response Format: ```json { "valid": false, "errors": [ { "type": "syntax_error", "message": "Invalid node ID format", "line": 2, "applicableSyntax": "Node IDs must use alphanumeric characters and underscores only. Replace 'WS-TRANSID' with 'WS_TRANSID'" } ], "metadata": { "diagramType": "erDiagram", "validationMethod": "jison_grammar" } } ``` ### šŸ“ˆ Performance & Infrastructure Optimization **Zero-Error User Experience:** - āœ… Nginx reverse proxy for 500+ concurrent connections - āœ… HPA with 25% CPU/memory thresholds for aggressive auto-scaling - āœ… 5-30 pod scaling range for enterprise workloads - āœ… Zero-failure configuration guarantees no connection drops #### New Infrastructure Files: - `k8s/hpa-zero-failure.yaml`: Enterprise-grade HPA configuration - `nginx-sidecar.yaml`: High-performance nginx + app deployment - `k8s/overlays/unlimited/`: Complete unlimited processing overlay ### šŸ¤– Model Context Protocol (MCP) Features **MCP Server Integration:** - āœ… Complete MCP server implementation with all latest features - āœ… 28+ grammar parsers integrated and tested - āœ… HTTP, stdio, and secure transport options - āœ… LLM-ready validation responses through MCP tools **MCP Tools Available:** - `validate_mermaid`: Direct diagram validation with `applicableSyntax` - `validate_file`: File processing with enhanced error reporting - `get_examples`: Sample diagrams for all 28+ supported types ### šŸ“Š Enterprise Scaling Evidence **Performance Metrics:** - Single Pod: 500+ concurrent connections (with nginx proxy) - Cluster Scale: 10,000+ concurrent connections (20 pods) - Processing Rate: 145+ req/sec sustained - Zero-Error Rate: 100% with proper HPA configuration **Load Testing Results:** | Configuration | Concurrent | Success Rate | Response Time | |---------------|------------|-------------|---------------| | Direct Express | 100 | 92.8% | 2051ms | | Nginx + Express | 500 | 100% | 3425ms | | HPA Cluster | 10,000+ | 100% | <5000ms | ### šŸ—ļø Documentation & Examples **New Documentation:** - `docs/CONFIGURATION.md`: Complete configuration guide - `docs/PERFORMANCE_TESTING.md`: Load testing methodology - `docs/LOAD_TESTING_EVIDENCE.md`: Performance benchmarks - `docs/API_RESPONSES.md`: Enhanced API response documentation - `MCP_TEST_EVIDENCE.md`: Complete MCP test results **Fixed Examples:** - `example/lgicus01_fixed.md`: Valid ER diagram with proper syntax - `example/lgtestp2_fixed.md`: Fixed data model with correct relationships ### šŸŽÆ Key Benefits for v1.0.17 1. **LLM Integration Ready**: Enhanced responses with validation instructions 2. **Fixed ER Examples**: Proper Mermaid syntax for complex business models 3. **Enterprise Performance**: Zero-error scaling with unlimited processing 4. **Complete MCP Support**: Full Model Context Protocol server integration 5. **Production Ready**: Comprehensive testing and deployment configurations ### šŸ”§ Deployment Configuration **Development (Unlimited):** ```bash MAX_FILES=-1 MAX_FILE_SIZE=-1 MAX_DIAGRAM_CONTENT_LENGTH=-1 MERMAID_MAX_TEXT_SIZE=-1 ``` **Production (Enterprise):** ```bash MAX_FILES=100000 MAX_FILE_SIZE=104857600 # 100MB MAX_DIAGRAM_CONTENT_LENGTH=1048576 # 1MB MERMAID_MAX_TEXT_SIZE=1048576 # 1MB ``` **Zero-Failure HPA:** ```yaml minReplicas: 5 # Higher baseline capacity maxReplicas: 30 # Increased maximum scaling targetCPUUtilizationPercentage: 25 # Earlier scaling trigger ``` The MCP version now provides enterprise-grade Mermaid validation with complete LLM integration, unlimited processing capabilities, and comprehensive Model Context Protocol support for AI development workflows.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ai-of-mine/fast-mermaid-validator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server