Exposes ESLint diagnostic warnings and errors from the VS Code Problems panel to AI agents for real-time analysis and resolution of linting issues.
Exposes TypeScript compilation errors and diagnostics from the VS Code Problems panel to AI agents for real-time analysis and resolution of code health problems.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Diagnostics ExtensionWhat are the current errors and warnings in my workspace?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Diagnostics Extension
๐ 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
configureServercommand 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
๐ฆ Installation
From VS Code Marketplace (Recommended)
Open VS Code
Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
Search for "MCP Diagnostics Extension"
Click Install
Reload VS Code if prompted
The extension will automatically activate and register itself as an MCP server.
From VSIX File
Download the latest
.vsixfile from GitHub ReleasesOpen VS Code
Run command:
Extensions: Install from VSIX...Select the downloaded file
From Source (Development)
๐ Quick Start
1. Installation & Activation
After installing from the marketplace, the extension automatically:
โ Activates when VS Code starts
โ Registers as an MCP server
โ Starts monitoring diagnostics
โ Shows status in the status bar
2. Verify It's Working
Look for the status bar item: $(bug) MCP: XE YW (X errors, Y warnings)
3. Connect Your MCP Client
Add to your MCP client configuration:
4. Start Using MCP Tools
Your AI agent can now access three powerful tools:
getProblems- Get all diagnostics with filteringgetProblemsForFile- Get problems for specific filesgetWorkspaceSummary- Get workspace-wide statistics
๐ AUTO-DEPLOYMENT & ONE-CLICK SETUP (Sprint 4 Feature)
โก Automatic MCP Server Registration
The extension now features one-click automatic setup that eliminates all manual configuration! This breakthrough feature automatically:
โ Deploys bundled MCP server to user directory with proper permissions
โ Injects configuration into Cursor IDE and other MCP clients
โ Validates deployment with atomic operations and backup creation
โ Cross-platform support with Windows/macOS/Linux compatibility
โ Error recovery with graceful fallback to manual setup
๐ฏ How Auto-Deployment Works
๐ Auto-Configuration Injection Process
๐๏ธ Auto-Deployment Architecture
โ๏ธ Configuration File Priorities
๐๏ธ One-Click Setup Commands
MCP Diagnostics: Configure Server โก
The magic command that does everything automatically!
Access via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
Search: "MCP Diagnostics: Configure Server"
Click: Command executes automatically
Watch: Progress notification shows deployment status
Result: Either success notification OR manual setup guide
What it does:
โ Deploys server to
~/.mcp-diagnostics/mcp-server.jsโ Sets proper executable permissions (Unix/Linux)
โ Creates version manifest for future upgrades
โ Locates your MCP configuration file (workspace โ user home)
โ Preserves existing MCP servers during injection
โ Validates configuration with JSON schema
โ Creates backup before any changes
โ Provides manual setup fallback if automatic fails
๐ Cross-Platform Deployment Support
Platform | Install Path | Executable | Spawn Options |
Windows |
| โ Not required |
|
macOS |
| โ
|
|
Linux |
| โ
|
|
๐ก๏ธ Security & Reliability Features
Atomic Operations
Backup Strategy
Version Management
๐จ Error Handling & Recovery
The auto-deployment system includes comprehensive error handling:
Error Type | Recovery Strategy |
Permission Denied | Show manual setup with elevated privileges guide |
Disk Space | Alert user and provide cleanup recommendations |
Network Issues | Use bundled assets with offline deployment |
Config Corruption | Create backup and initialize fresh configuration |
Version Conflicts | Smart merge with user preference preservation |
๐ Performance Metrics
Sprint 4 auto-deployment meets strict performance requirements:
โก Deployment Time: <2 seconds for complete setup
โก Configuration Injection: <500ms including validation
โก Memory Usage: <10MB additional during deployment
โก File Operations: Atomic with <100ms overhead
โก Cross-Platform: Universal compatibility with intelligent spawn detection
๐ ๏ธ Usage Guide
Available Commands
Access via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
MCP Diagnostics: Show Status- Opens detailed status webview with:Server connection status
Problem statistics by severity and source
File-by-file breakdown
Workspace folder information
Performance metrics
MCP Diagnostics: Restart Server- Restarts the MCP server with progress indicationMCP Diagnostics: Show Setup Guide- Opens comprehensive setup guide for MCP client configuration
MCP Tools Reference
๐ getProblems - Universal Problem Query
Get all diagnostic problems with powerful filtering options:
Example Response:
๐ getProblemsForFile - File-Specific Diagnostics
Get all problems for a specific file:
๐ getWorkspaceSummary - Workspace Statistics
Get comprehensive workspace diagnostic statistics:
Example Response:
MCP Resources
Dynamic resources providing structured access to diagnostic data:
diagnostics://summary- Overall workspace problems summarydiagnostics://file/{encodedFilePath}- Problems for specific filediagnostics://workspace/{encodedWorkspaceName}- Problems for specific workspace
Real-time Notifications
The server automatically sends problemsChanged notifications when diagnostics change:
โ๏ธ Configuration
Customize the extension via VS Code settings (Ctrl+, / Cmd+,):
Configuration Options
Setting | Type | Default | Description |
| number | 6070 | MCP server port (1024-65535) |
| number | 300 | Debounce interval for diagnostic events (50-5000ms) |
| boolean | false | Enable detailed debug logging |
| boolean | false | Enable performance metrics logging |
| number | 1000 | Maximum problems to track per file (1-10000) |
| string | "info" | Logging level (error, warn, info, debug) |
| boolean | true | Show MCP server registration notifications |
๐งช 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 checksAsset 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:
Launch Extension Development Host (Press F5 in VS Code)
Open test workspace or any workspace with diagnostic issues
View Problems panel (Ctrl+Shift+M) to see real diagnostics
Use MCP tools to query the diagnostic data
Check status bar for live error/warning counts
Development Setup
๐ง MCP Client Configuration
The extension provides a universal MCP server that works with all major MCP-enabled environments. The server runs as a standalone Node.js process and provides real-time diagnostic data from your workspace.
๐ฏ Universal Configuration Pattern
All MCP clients use the same basic configuration pattern with environment-specific variations:
๐ Configuration File Locations
Environment | Configuration File | Format |
Cursor IDE |
|
|
VS Code |
|
|
Windsurf |
|
|
Claude Desktop |
|
|
MCP Client Configuration Examples
Cursor IDE
VS Code with MCP Extension
Windsurf IDE
Claude Desktop
Custom MCP Client
๐ MCP Server Features
The scripts/mcp-server.js provides:
๐ Real-time Diagnostics: Live TypeScript and ESLint analysis
๐ VS Code Integration: Automatic import of VS Code Problems panel data
โก Performance Optimized: Cached results with smart refresh logic
๐ก๏ธ Error Recovery: Graceful fallback when VS Code data unavailable
๐ง Configurable: Environment variables for debugging and behavior control
๐ Environment Variables
Variable | Default | Description |
|
| Set to |
|
| Enable detailed debug logging |
|
| Cache refresh interval in milliseconds |
|
| Maximum number of problems to cache |
๐ Data Sources
The MCP server intelligently combines multiple data sources:
VS Code Export (Primary): Real-time data from the extension
TypeScript Compiler (Fallback): Direct
tscanalysisESLint (Fallback): Direct ESLint analysis
Cached Results (Performance): Smart caching with automatic refresh