CapulusCodeNinja/mcp_nexus
If you are the rightful owner of mcp_nexus 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 Model Context Protocol (MCP) server that provides comprehensive Windows debugging capabilities.
MCP Nexus
AI-Powered Windows Crash Dump Analysis Platform
MCP Nexus is a comprehensive Model Context Protocol (MCP) server that provides AI systems with advanced Windows crash dump analysis capabilities. It combines the power of Microsoft's debugging tools (WinDBG/CDB) with intelligent analysis workflows to help identify root causes of system crashes, memory corruption, and application failures.
๐ฏ What is MCP Nexus?
MCP Nexus is a platform that provides structured access to Windows debugging tools through the Model Context Protocol. It makes crash dump analysis more accessible by providing standardized tools and real-time progress tracking.
The Problem We Solve
Traditional Crash Analysis Challenges:
- ๐ Complexity: Requires deep knowledge of Windows internals and debugging tools
- โฑ๏ธ Time-consuming: Manual analysis can take hours or days
- ๐ง Expertise Required: Need specialized debugging skills and experience
- ๐ Inconsistent Results: Different analysts may reach different conclusions
- ๐ง Tool Complexity: WinDBG/CDB have steep learning curves
MCP Nexus Solution:
- ๐ง Structured Access: Provides standardized tools for debugging operations
- โก Real-time Updates: Live progress tracking and notifications
- ๐ Consistent Results: Provides structured output formats
- ๐ MCP Integration: Works with AI clients through Model Context Protocol
- ๐ ๏ธ Professional Tools: Built on Microsoft's industry-standard debugging infrastructure
๐ Table of Contents
- ๐ Key Features
- ๐ Quick Start
- ๐ Analysis Capabilities
- ๐ Documentation
- ๐ค AI Integration
- ๐ ๏ธ Available Tools
- ๐ Analysis Workflows
- โ๏ธ Configuration
- ๐งช Testing
- ๐ ๏ธ Development
๐ Key Features
Core Analysis Capabilities
- ๐ Crash Dump Analysis: Comprehensive analysis of Windows crash dumps (.dmp files)
- ๐ Root Cause Detection: Automated identification of crash causes and patterns
- ๐ Memory Analysis: Deep inspection of memory corruption and leaks
- ๐งต Thread Analysis: Thread deadlock and synchronization issue detection
- โก Performance Analysis: System performance bottleneck identification
- ๐ง Symbol Resolution: Automatic symbol loading and debugging information
AI-Powered Features
- ๐ค MCP Integration: Native Model Context Protocol support for AI systems
- ๐ก Real-time Notifications: Live progress updates during analysis
- ๐ Structured Results: AI-friendly analysis output formats
- ๐ Async Processing: Non-blocking analysis with progress tracking
- ๐ Intelligent Workflows: Pre-built analysis patterns for common crash types
Professional Tools
- ๐ ๏ธ WinDBG/CDB Integration: Built on Microsoft's debugging tools
- ๐ Multiple Dump Formats: Support for various Windows dump types
- ๐ Symbol Server Support: Automatic symbol downloading and caching
- โ๏ธ Configurable Analysis: Customizable analysis parameters and timeouts
- ๐ Rich Reporting: Detailed analysis reports with actionable insights
๐ Quick Start
Prerequisites
- Windows 10/11 or Windows Server 2016+
- .NET 8.0 or later
- Windows Debugging Tools (WinDBG/CDB)
- AI Client (Cursor IDE, Claude Desktop, or compatible MCP client)
Installation
# Clone the repository
git clone https://github.com/CapulusCodeNinja/mcp_nexus.git
cd mcp_nexus
# Build the project
dotnet build
# Run in stdio mode (recommended for AI integration)
dotnet run --project mcp_nexus/mcp_nexus.csproj
# Run in HTTP mode (for web integration)
dotnet run --project mcp_nexus/mcp_nexus.csproj -- --http
Basic Usage
-
Open a crash dump:
{ "method": "tools/call", "params": { "name": "nexus_open_dump_analyze_session", "arguments": { "dumpPath": "C:\\crashes\\application.dmp" } } }
-
Analyze the crash:
{ "method": "tools/call", "params": { "name": "nexus_enqueue_async_dump_analyze_command", "arguments": { "sessionId": "sess-123", "command": "!analyze -v" } } }
-
Get results:
{ "method": "tools/call", "params": { "name": "nexus_read_dump_analyze_command_result", "arguments": { "sessionId": "sess-123", "commandId": "cmd-456" } } }
๐ Analysis Capabilities
Crash Types Supported
- ๐ฅ Application Crashes: Unhandled exceptions and access violations
- ๐ System Crashes: Blue Screen of Death (BSOD) analysis
- ๐พ Memory Corruption: Heap corruption, buffer overflows, use-after-free
- ๐งต Thread Issues: Deadlocks, race conditions, thread synchronization
- โก Performance Issues: CPU spikes, memory leaks, resource exhaustion
- ๐ง Driver Problems: Kernel driver crashes and system instability
Analysis Techniques
- ๐ Stack Trace Analysis: Detailed call stack examination
- ๐ Memory Dump Inspection: Heap and stack memory analysis
- ๐ Performance Profiling: System resource usage analysis
- ๐ Symbol Resolution: Automatic debugging symbol loading
- ๐ Pattern Recognition: Common crash pattern identification
- ๐ฏ Root Cause Analysis: Systematic cause identification
๐ Documentation
๐
Comprehensive guide to AI-powered crash analysis workflows and capabilities
๐ ๏ธ
Complete reference for all debugging tools and analysis commands
๐
Step-by-step crash analysis workflows with real-world examples
โ๏ธ
Setup guide for debugging tools, symbol servers, and analysis parameters
๐ค
Integration guide for Cursor IDE, Claude Desktop, and other AI clients
๐ป
Architecture overview and contribution guide for developers
๐
MCP Resources reference for session management and analysis data
๐ค AI Integration
Cursor IDE Integration
Configuration (.cursor/mcp.json
):
{
"servers": {
"mcp-nexus": {
"command": "dotnet",
"args": ["run", "--project", "./mcp_nexus/mcp_nexus.csproj"],
"type": "stdio"
}
}
}
Claude Desktop Integration
Configuration (claude_desktop_config.json
):
{
"mcpServers": {
"mcp-nexus": {
"command": "dotnet",
"args": ["run", "--project", "C:\\path\\to\\mcp_nexus\\mcp_nexus.csproj"],
"cwd": "C:\\path\\to\\mcp_nexus"
}
}
}
Real-time Notifications
MCP Nexus provides live updates during analysis:
{
"jsonrpc": "2.0",
"method": "notifications/commandStatus",
"params": {
"commandId": "cmd-123",
"status": "executing",
"progress": 75,
"message": "Analyzing crash dump...",
"timestamp": "2024-01-15T10:30:00Z"
}
}
๐ ๏ธ Available Tools
Core Analysis Tools
nexus_open_dump_analyze_session
: Open a crash dump for analysisnexus_close_dump_analyze_session
: Close analysis session and cleanupnexus_enqueue_async_dump_analyze_command
: Execute debugging commandsnexus_read_dump_analyze_command_result
: Get command results
MCP Resources
sessions
: List all active analysis sessionscommands
: List commands with filtering optionsworkflows
: Access analysis workflows and patternsusage
: Complete usage guide and examplesmetrics
: Performance metrics and statisticshealth
: System health status
๐ Analysis Workflows
Basic Crash Analysis
- Open dump โ Run !analyze -v โ Examine results โ Identify root cause
- Check stack trace โ Analyze memory state โ Review error codes
- Generate report โ Document findings โ Recommend fixes
Memory Corruption Analysis
- Open dump โ Run !heap -p -a โ Check for corruption
- Analyze stack traces โ Identify corrupted memory โ Find source
- Review allocation patterns โ Check for leaks โ Document findings
Thread Deadlock Analysis
- Open dump โ Run !locks โ Check for deadlocks
- Analyze thread states โ Identify waiting threads โ Find blocking resources
- Review synchronization โ Document deadlock chain โ Recommend fixes
โ๏ธ Configuration
Quick Setup
# Install Windows Debugging Tools
# Download from Microsoft or install via Windows SDK
# Configure symbol path
dotnet run --project mcp_nexus/mcp_nexus.csproj -- --cdb-path "C:\Program Files\Windows Kits\10\Debuggers\x64\cdb.exe"
Configuration Files
appsettings.json
- Main configuration (Production defaults)appsettings.Development.json
- Development overridesappsettings.Production.json
- Production overridesappsettings.Service.json
- Windows service overrides
Simplified Logging
The logging system now uses a single LogLevel
setting:
{
"Logging": {
"LogLevel": "Information" // Trace, Debug, Information, Warning, Error, Critical
}
}
Environment Defaults:
- Development:
"Debug"
- Service/Production:
"Information"
๐
For detailed configuration options, environment settings, and best practices, see the comprehensive configuration documentation.
๐งช Testing
Test Suite Overview
MCP Nexus maintains a comprehensive test suite ensuring reliability and quality:
# Run all tests
dotnet test
# Run with coverage
dotnet test --collect:"XPlat Code Coverage"
# Run specific test categories
dotnet test --filter "FullyQualifiedName~CrashAnalysis"
dotnet test --filter "FullyQualifiedName~MemoryAnalysis"
dotnet test --filter "FullyQualifiedName~ThreadAnalysis"
dotnet test --filter "Notification"
Test Statistics
- โ 1,763 total tests (1,763 passing)
- โ 89.71% line coverage with comprehensive analysis testing
- โ 0 warnings in build (clean codebase)
- โ 15+ test categories covering all major functionality
- โ Fast execution (~58 seconds for full suite)
- โ Comprehensive mocking for reliable testing
Test Categories
Category | Tests | Description |
---|---|---|
Session Management | ~300+ tests | Session lifecycle and resource management |
Command Queue | ~200+ tests | Async command execution and queuing |
Notifications | ~150+ tests | Real-time notification system |
Infrastructure | ~100+ tests | Windows service and infrastructure |
Security | ~80+ tests | Security validation and access control |
Health & Metrics | ~70+ tests | System health monitoring and metrics |
Resilience | ~60+ tests | Circuit breaker and error handling |
Integration | ~50+ tests | End-to-end workflow testing |
Utilities | ~40+ tests | Helper functions and utilities |
Models | ~30+ tests | Data models and validation |
Recovery | ~25+ tests | Session recovery and timeout handling |
Tools | ~20+ tests | MCP tool implementation |
Resources | ~15+ tests | MCP resource management |
Protocol | ~8+ tests | MCP protocol handling |
Other | ~800+ tests | Additional comprehensive test coverage |
Quality Assurance
- 100% Test Success Rate: 1,976 out of 1,976 tests passing
- Clean Codebase: 0 warnings in build, following best practices
- Comprehensive Coverage: Tests cover all major functionality across 15+ categories
- Fast Execution: Full test suite runs in ~58 seconds
- Reliable Mocking: Proper isolation for consistent test results
- CI/CD Ready: Tests run automatically on every commit
- Production Ready: All tests passing with enterprise-grade quality standards
๐ ๏ธ Development
Architecture
MCP Nexus
โโโ Core Analysis Engine
โ โโโ Crash Dump Processing
โ โโโ Memory Analysis
โ โโโ Thread Analysis
โ โโโ Performance Analysis
โโโ AI Integration Layer
โ โโโ MCP Protocol Handler
โ โโโ Real-time Notifications
โ โโโ Structured Results
โโโ Debugging Tools Integration
โ โโโ WinDBG/CDB Wrapper
โ โโโ Symbol Resolution
โ โโโ Command Execution
โโโ Analysis Workflows
โโโ Pre-built Patterns
โโโ Custom Analysis
โโโ Result Processing
Adding New Analysis Tools
- Define tool schema in
McpToolDefinitionService
- Implement analysis logic in
McpToolExecutionService
- Add notifications for real-time updates
- Write comprehensive tests
- Update documentation
๐ Troubleshooting
Common Issues
- Symbol Loading: Ensure symbol path is configured correctly
- Permission Errors: Check file access permissions
- Timeout Issues: Increase command timeout for large dumps
- Memory Issues: Ensure sufficient RAM for large dump analysis
Getting Help
- Check Logs: Review application logs for detailed error information
- Test Manually: Use WinDBG directly to verify dump accessibility
- Read Documentation: Check for setup issues
- Community Support: Report issues on GitHub
๐ License
This project is licensed under the Apache License 2.0 - see the file for details.
The Apache License 2.0 is a permissive open-source license that allows you to:
- โ Use the software for any purpose
- โ Distribute the software
- โ Modify the software
- โ Distribute modified versions
- โ Use the software in commercial applications
For more information, see the Apache License 2.0 documentation.
๐ Acknowledgments
- Model Context Protocol specification
- C# SDK for Model Context Protocol
- ModelContextProtocol.AspNetCore NuGet package
- Microsoft debugging tools
- NLog
MCP Nexus - Professional Windows crash dump analysis using Microsoft debugging tools.