Provides intelligent analysis of SonicWall firewall logs through natural language queries, real-time threat detection, connection search and investigation, network statistics and security metrics, and log export capabilities for both SonicOS 7.x and 8.x versions
SonicWall MCP Server
Professional SonicWall log analysis and threat detection via Model Context Protocol
🧪 Community Testing Needed
⚠️ IMPORTANT: This project needs community testing and validation!
👥 We need your help to test this with real SonicWall devices and environments.
- 🔍 Test it with your SonicWall setup
- 🐛 Report issues via GitHub Issues
- 🔧 Fix bugs and submit PRs
- 📝 Improve documentation based on real-world usage
- 💡 Contribute features and enhancements
Your testing and contributions will help make this production-ready for everyone!
A production-ready MCP server that provides intelligent analysis of SonicWall firewall logs through natural language queries. Fully compliant with MCP 2025-06-18 specification with comprehensive support for both SonicOS 7.x and 8.x including accurate API endpoints and version-specific features.
✨ Features
- 🔍 Natural Language Log Analysis - Query firewall logs using conversational AI
- 🛡️ Real-time Threat Detection - Advanced threat correlation and behavioral analysis
- 🌐 Complete SonicOS Support - Accurate API endpoints for both 7.x and 8.x versions
- 🎯 Version-Aware Integration - Automatic endpoint resolution and feature detection
- 🚀 Enterprise Ready - Production deployment with comprehensive security
- 📊 Advanced Analytics - Network intelligence and security metrics
- 🔒 MCP 2025-06-18 Compliant - Latest protocol compliance with enhanced JSON-RPC 2.0
- ⚡ High Performance - In-memory caching with intelligent TTL management
- 🔐 Security First - Authentication, authorization, and comprehensive audit logging
📋 Quick Start
Prerequisites
- SonicWall Device running SonicOS 7.x or 8.x
- API Access enabled on your SonicWall (MANAGE > System Setup > Appliance > SonicOS API)
- Docker & Docker Compose (recommended) or Node.js 20+
1. Get the Server
2. Configure Environment
Required configuration:
3. Start the Server
Using Docker (Recommended):
Using Node.js:
4. Verify Installation
🔗 Connect to Claude
Add to your Claude Desktop configuration (claude_desktop_config.json
):
That's it! Start using SonicWall analysis in Claude:
"Show me blocked connections from the last hour"
"Find critical security threats from today"
"Analyze VPN authentication failures"
🎯 Latest Improvements
⚡ Enhanced SonicOS Support (v1.0.0)
- Accurate API Endpoints: Complete endpoint mapping for both SonicOS 7.x (
/api/sonicos
) and 8.x (/api/sonicos/v8
) - Version-Aware Features: Automatic detection and utilization of version-specific capabilities
- Advanced Authentication: Enhanced session management with proper token refresh and error handling
- Cloud Integration: Full support for SonicOS 8.x cloud management and NSM integration
🛡️ Security & Compliance Enhancements
- MCP 2024-11-05 Compliance: Full protocol implementation with JSON-RPC 2.0 support
- Enhanced Error Handling: SonicWall-specific error codes with intelligent retry logic
- Advanced Validation: Comprehensive JSON Schema validation using AJV
- Security Hardening: Improved authentication flow with comprehensive audit logging
🚀 Performance & Reliability
- Intelligent Caching: Enhanced TTL management with automatic cleanup
- Endpoint Optimization: Version-specific timeout and rate limiting configurations
- Connection Management: Improved retry logic and failover handling
- Comprehensive Logging: Structured logging with performance metrics and debugging support
🛠️ Available Tools
analyze_logs
Natural language log analysis with intelligent insights
get_threats
Real-time threat monitoring and analysis
search_connections
Advanced connection search and investigation
get_stats
Network statistics and security metrics
export_logs
Export filtered logs for compliance and analysis
📖 Documentation
- Complete Usage Guide - Detailed examples and use cases
- Configuration Reference - All settings explained
- API Documentation - Complete tool specifications
- Troubleshooting Guide - Common issues and solutions
- Security Guide - Security best practices
- MCP Compliance - Protocol compliance details
🏗️ Architecture
Key Components:
- MCP Protocol Layer: Full MCP 2024-11-05 compliance with SSE transport
- Enhanced API Client: Accurate SonicOS 7.x/8.x endpoints with session management
- Intelligent Log Parser: Multi-format parsing with version-specific optimizations
- Analysis Engine: AI-powered natural language processing and threat correlation
- Performance Cache: High-performance in-memory caching with TTL management
- Security Framework: Comprehensive authentication and input validation
🔧 Configuration
Basic Configuration
Advanced Configuration
🐳 Docker Deployment
Prerequisites
- Docker Engine 24.0+ (latest stable)
- Docker Compose V2 (integrated plugin, comes with Docker Desktop)
- Note: Legacy
docker-compose
command is deprecated, usedocker compose
Quick Start Commands
NPM Script Shortcuts
Environment Configuration
Docker Compose Files
docker-compose.yml
- Production configurationdocker-compose.dev.yml
- Development overridesdocker-compose.override.yml
- Local customizations (optional)
🧪 Testing & Validation
Quick Health Check
SonicWall Connectivity Test
Run Test Suite
🔒 Security
Security Features
- ✅ Transport Security - HTTPS enforcement with comprehensive CORS validation
- ✅ Authentication - Bearer token support with intelligent rate limiting
- ✅ Input Validation - JSON Schema validation using AJV with comprehensive sanitization
- ✅ Container Security - Non-root user execution with read-only filesystem
- ✅ Data Privacy - Zero sensitive data logging with audit-compliant processing
- ✅ MCP Compliance - Full protocol security implementation
- ✅ API Security - SonicWall credential protection with secure session management
Security Checklist
- Enable API access only from trusted networks
- Use strong passwords for SonicWall admin accounts
- Configure MCP_BEARER_TOKEN for additional security
- Monitor logs for unusual activity
- Keep SonicWall firmware updated
- Review firewall rules regularly
🚨 Common Issues
❌ "Authentication Failed"
Problem: Cannot connect to SonicWall API
❌ "No logs returned"
Problem: Empty responses from log queries
❌ "CORS Error in Browser"
Problem: Browser blocks MCP requests
📊 Monitoring & Observability
Health Monitoring
Performance Metrics
Log Analysis
🤝 Contributing
We welcome contributions! Please read our Contributing Guidelines.
Development Setup
📄 License
MIT License - see LICENSE file for details.
🆘 Support & Community
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📚 Documentation: Project Wiki
- 📧 Security: security@yourorganization.com
🙏 Acknowledgments
- Model Context Protocol for the excellent specification
- SonicWall for comprehensive API documentation
- Claude Code community for feedback and testing
- All contributors and users who make this project better
🔒 Built with security-first principles for enterprise cybersecurity teams
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables intelligent analysis of SonicWall firewall logs through natural language queries. Provides real-time threat detection, network security monitoring, and log analysis with support for both SonicOS 7.x and 8.x versions.
- 🧪 Community Testing Needed
- ✨ Features
- 📋 Quick Start
- 🔗 Connect to Claude
- 🎯 Latest Improvements
- 🛠️ Available Tools
- 📖 Documentation
- 🏗️ Architecture
- 🔧 Configuration
- 🐳 Docker Deployment
- 🧪 Testing & Validation
- 🔒 Security
- 🚨 Common Issues
- 📊 Monitoring & Observability
- 🤝 Contributing
- 📄 License
- 🆘 Support & Community
- 🙏 Acknowledgments
Related MCP Servers
- -securityAlicense-qualityProvides programmatic access to ingest and query Windows event logs (especially Sysmon logs), enabling security monitoring, incident response, and log analysis automation.Last updated -MIT License
- AsecurityAlicenseAqualityProvides seamless integration with Fastly's Next-Gen Web Application Firewall API, enabling AI assistants to manage web application security through natural language interactions.Last updated -291MIT License
- AsecurityAlicenseAqualityA server that enables managing OPNSense firewalls through natural language interactions with Claude Desktop, supporting VLAN management, firewall rules configuration, and network interface queries.Last updated -64816MIT License
- -securityAlicense-qualityA production-grade server that enables natural language interaction with pfSense firewalls through Claude Desktop and other GenAI applications, supporting multiple access levels and functional categories.Last updated -13MIT License