Labsco
newbpydev logo

MCP Diagnostics Extension

โ˜… 22

from newbpydev

A VS Code extension that provides real-time diagnostic problems like errors and warnings via the Model Context Protocol.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

MCP Diagnostics Extension

Downloads

Installs


๐Ÿ† A production-ready VS Code extension that exposes diagnostic problems (errors, warnings, etc.) in real-time via the Model Context Protocol (MCP) for seamless consumption by AI agents and MCP-enabled tools.

๐ŸŽฏ EXCEPTIONAL ACHIEVEMENTS

๐Ÿ† World-Class Quality Standards

  • โœ… 810 Tests Passing - Comprehensive test coverage with 0 failures (1 skipped)
  • โœ… 97.99% Statement Coverage - Exceeding industry standards (95%+ target)
  • โœ… Production-Ready Architecture - Clean Architecture with dependency injection
  • โœ… Professional CI/CD Pipeline - Multi-platform testing and automated releases
  • โœ… Zero External Dependencies - Native implementations for maximum reliability

๐Ÿš€ Performance Excellence

  • โšก <2s Extension Activation - Lightning-fast startup performance
  • โšก <500ms Diagnostic Processing - Real-time problem monitoring
  • โšก <100ms MCP Tool Response - Instant AI agent integration
  • ๐Ÿ’พ <50MB Memory Baseline - Efficient resource utilization
  • ๐Ÿ“Š 10,000+ File Workspace Support - Enterprise-scale capability

๐Ÿ”ง Advanced Technical Implementation

  • ๐ŸŽฏ Event-Driven Architecture - Loose coupling via EventEmitter patterns
  • ๐Ÿ›ก๏ธ Robust Error Handling - Comprehensive error recovery mechanisms
  • ๐Ÿ“ˆ Performance Monitoring - Built-in metrics and optimization
  • ๐Ÿ”„ Real-time Synchronization - Live diagnostic updates via MCP notifications
  • ๐ŸŒ Cross-Platform Compatibility - Windows, macOS, Linux support with intelligent spawn handling

โœจ Latest Features (v1.4.0)

  • ๐Ÿ”ง Cross-Platform Utilities - Smart platform detection and spawn option handling
  • โš™๏ธ Configuration Validation - Automatic validation and enhancement of MCP client configurations
  • ๐Ÿ“Š Enhanced Export System - Continuous diagnostic data export for standalone MCP server integration
  • ๐ŸŽจ Improved Status Display - Better visual indicators and error reporting
  • ๐Ÿ› ๏ธ Automated Setup - One-click MCP server registration across different environments

๐Ÿš€ NEW: v1.4.0 - Auto-Server Injection & Advanced Diagnostics

  • ๐Ÿค– Automatic MCP Server Registration - One-click deployment and configuration across VS Code, Cursor, and other MCP clients
  • ๐Ÿ“Š Cross-Platform Diagnostic Analysis - Enhanced TypeScript and ESLint analysis with background workspace scanning
  • โš™๏ธ Configuration Manager - Atomic configuration injection with backup and rollback capabilities
  • ๐Ÿ”ง Server Installation Utilities - Automated bundled server deployment with version management
  • ๐Ÿ› ๏ธ Enhanced Command System - New configureServer command for automated MCP setup
  • ๐Ÿ“ˆ Improved Performance Monitoring - Advanced timer management and memory leak prevention
  • ๐ŸŒ Enhanced Cross-Platform Support - Native spawn option handling for Windows, macOS, and Linux
  • ๐Ÿงช Comprehensive Test Coverage - 810 tests with 97.99% coverage including E2E and integration tests

๐Ÿš€ What is this?

The MCP Diagnostics Extension bridges VS Code's powerful diagnostic system with the Model Context Protocol, enabling AI agents to access your code problems in real-time. Whether you're debugging TypeScript errors, ESLint warnings, or custom linter issues, this extension makes all diagnostic information instantly available to your AI tools.

Why was this built?

  • ๐Ÿค– AI-First Development: Modern development increasingly relies on AI assistance. This extension ensures your AI tools have complete visibility into your codebase health.
  • โšก Real-time Integration: No more manually copying error messages or explaining problems to AI tools - they see everything instantly.
  • ๐Ÿ”ง Universal Diagnostics: Works with any VS Code diagnostic provider (TypeScript, ESLint, custom linters, etc.)
  • ๐Ÿ“Š Enhanced Productivity: AI agents can provide more contextual help when they understand your current problems.

What problem does it solve?

Before this extension, AI agents couldn't see your VS Code problems panel, making it difficult for them to:

  • Understand compilation errors when suggesting fixes
  • Provide relevant solutions for linting issues
  • Help with project-wide diagnostic patterns
  • Assist with debugging based on current error state

Key Features Learned & Implemented

  • ๐Ÿ” Real-time Diagnostics Monitoring: Automatically captures all diagnostic problems from VS Code's Problems panel using advanced event debouncing (300ms configurable)
  • ๐Ÿค– MCP Server Integration: Exposes diagnostics through standardized MCP tools and resources with comprehensive filtering capabilities
  • โšก Performance Optimized: Handles large workspaces efficiently with smart caching and memory management (97.99% test coverage)
  • ๐Ÿข Multi-workspace Support: Seamlessly works with complex project structures and multiple workspace folders
  • ๐Ÿ“ก Real-time Notifications: Pushes diagnostic changes instantly to connected MCP clients with structured payloads
  • ๐ŸŽจ Enhanced Status Bar: Color-coded status bar with red (errors), orange (warnings), green (clean) backgrounds and real-time updates
  • ๐ŸŽ›๏ธ Command Palette: Full integration with VS Code commands for server management and detailed status viewing with webview
  • ๐Ÿ”ง Highly Configurable: Customizable port, debounce timing, logging options, and performance settings
  • ๐Ÿš€ Automatic Registration: One-click setup with intelligent MCP server registration across different environments
  • ๐Ÿงช Test Workspace: Comprehensive testing environment with intentional errors for validation (810 tests passing)
  • ๐Ÿ›ก๏ธ Robust Error Handling: Graceful degradation and comprehensive error recovery mechanisms
  • ๐ŸŒ Cross-Platform Support: Native Windows, macOS, and Linux compatibility with platform-specific optimizations

๐Ÿงช Testing & Development

๐Ÿ† Exceptional Test Coverage Achievement

The extension has achieved world-class testing standards:

  • โœ… 810 Tests Passing - Comprehensive test suite with 0 failures (1 skipped)
  • โœ… 97.99% Statement Coverage - Exceeding industry standards
  • โœ… 34 Test Suites - Organized, maintainable test structure across all components
  • โœ… Cross-Platform Testing - Validated on Windows, macOS, and Linux environments
  • โœ… Comprehensive E2E Testing - Full extension workflow validation

Real vs Mock Server

The extension provides two operational modes:

๐Ÿ”ด Real VS Code Extension (Production Mode)

  • Purpose: Production use with actual VS Code diagnostics
  • Data Source: Live VS Code Problems panel
  • Activation: Automatic when extension is installed
  • Use Case: Real development workflows with AI agents

๐Ÿ”ง Development Tools

  • Package Validation: scripts/validate-package.sh - Automated package integrity checks
  • Asset Conversion: scripts/convert-assets.js - Visual asset optimization utilities

Test Workspace

The extension includes test-workspace/ with intentional errors:

  • example.ts: TypeScript errors (type mismatches, undefined variables, invalid assignments)
  • utils.js: ESLint warnings (unused variables, style issues, best practice violations)

To test the extension:

  1. Launch Extension Development Host (Press F5 in VS Code)
  2. Open test workspace or any workspace with diagnostic issues
  3. View Problems panel (Ctrl+Shift+M) to see real diagnostics
  4. Use MCP tools to query the diagnostic data
  5. Check status bar for live error/warning counts

Development Setup

# Install dependencies
npm install

# Run tests (810 tests)
npm test

# Run tests with coverage
npm run test:coverage

# Lint code
npm run lint

# Format code
npm run format

# Compile TypeScript
npm run compile

# Package extension
npm run package

# Run CI checks
npm run ci:check

๐Ÿ“š Documentation

Additional Resources

API Documentation

Comprehensive TypeScript documentation is available for all public APIs:

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Quick Contribution Steps

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make changes following our coding standards
  4. Run tests: npm test (all 810 tests must pass)
  5. Lint code: npm run lint
  6. Commit changes: npm run commit (uses conventional commits)
  7. Push to branch: git push origin feature/amazing-feature
  8. Open a Pull Request

Development Requirements

  • Node.js 22.x or higher
  • VS Code 1.96.0 or higher
  • TypeScript 5.8.3 or higher

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • VS Code Team - For the excellent extension API and diagnostic system
  • Model Context Protocol - For the innovative protocol enabling AI agent integration
  • TypeScript Team - For the robust type system and development experience
  • Jest Community - For the comprehensive testing framework
  • Open Source Community - For the tools and libraries that make this project possible

๐Ÿš€ Ready to supercharge your AI-assisted development workflow? Install the MCP Diagnostics Extension today and give your AI agents complete visibility into your codebase health!