mcp_nexus

CapulusCodeNinja/mcp_nexus

3.3

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.

Tools
5
Resources
0
Prompts
0

MCP Nexus

AI-Powered Windows Crash Dump Analysis Platform

Tests Coverage Build

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

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

  1. Open a crash dump:

    {
      "method": "tools/call",
      "params": {
        "name": "nexus_open_dump_analyze_session",
        "arguments": {
          "dumpPath": "C:\\crashes\\application.dmp"
        }
      }
    }
    
  2. Analyze the crash:

    {
      "method": "tools/call",
      "params": {
        "name": "nexus_enqueue_async_dump_analyze_command",
        "arguments": {
          "sessionId": "sess-123",
          "command": "!analyze -v"
        }
      }
    }
    
  3. 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 analysis
  • nexus_close_dump_analyze_session: Close analysis session and cleanup
  • nexus_enqueue_async_dump_analyze_command: Execute debugging commands
  • nexus_read_dump_analyze_command_result: Get command results

MCP Resources

  • sessions: List all active analysis sessions
  • commands: List commands with filtering options
  • workflows: Access analysis workflows and patterns
  • usage: Complete usage guide and examples
  • metrics: Performance metrics and statistics
  • health: System health status

๐Ÿ“Š Analysis Workflows

Basic Crash Analysis

  1. Open dump โ†’ Run !analyze -v โ†’ Examine results โ†’ Identify root cause
  2. Check stack trace โ†’ Analyze memory state โ†’ Review error codes
  3. Generate report โ†’ Document findings โ†’ Recommend fixes

Memory Corruption Analysis

  1. Open dump โ†’ Run !heap -p -a โ†’ Check for corruption
  2. Analyze stack traces โ†’ Identify corrupted memory โ†’ Find source
  3. Review allocation patterns โ†’ Check for leaks โ†’ Document findings

Thread Deadlock Analysis

  1. Open dump โ†’ Run !locks โ†’ Check for deadlocks
  2. Analyze thread states โ†’ Identify waiting threads โ†’ Find blocking resources
  3. 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 overrides
  • appsettings.Production.json - Production overrides
  • appsettings.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

CategoryTestsDescription
Session Management~300+ testsSession lifecycle and resource management
Command Queue~200+ testsAsync command execution and queuing
Notifications~150+ testsReal-time notification system
Infrastructure~100+ testsWindows service and infrastructure
Security~80+ testsSecurity validation and access control
Health & Metrics~70+ testsSystem health monitoring and metrics
Resilience~60+ testsCircuit breaker and error handling
Integration~50+ testsEnd-to-end workflow testing
Utilities~40+ testsHelper functions and utilities
Models~30+ testsData models and validation
Recovery~25+ testsSession recovery and timeout handling
Tools~20+ testsMCP tool implementation
Resources~15+ testsMCP resource management
Protocol~8+ testsMCP protocol handling
Other~800+ testsAdditional 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

  1. Define tool schema in McpToolDefinitionService
  2. Implement analysis logic in McpToolExecutionService
  3. Add notifications for real-time updates
  4. Write comprehensive tests
  5. 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

  1. Check Logs: Review application logs for detailed error information
  2. Test Manually: Use WinDBG directly to verify dump accessibility
  3. Read Documentation: Check for setup issues
  4. 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


MCP Nexus - Professional Windows crash dump analysis using Microsoft debugging tools.