Diagnostics Server
БесплатноНе проверенAn HTTP MCP server providing AI agents with real-time access to all VS Code diagnostics (TypeScript, ESLint, Prettier, etc.) via 5 powerful tools including work
Описание
An HTTP MCP server providing AI agents with real-time access to all VS Code diagnostics (TypeScript, ESLint, Prettier, etc.) via 5 powerful tools including workspace health scoring.
README
HTTP MCP server with 5 diagnostic tools providing real-time access to ALL VS Code diagnostics (TypeScript, ESLint, Prettier, and all installed extensions)
🎯 Overview
This Model Context Protocol (MCP) server provides AI agents with real-time access to all diagnostics from your VS Code workspace, including:
- ✅ TypeScript/JavaScript errors and warnings
- ✅ ESLint linting issues
- ✅ Prettier formatting issues
- ✅ All Language Servers (Python, Go, Rust, etc.)
- ✅ All VS Code Extensions diagnostics
- ✅ Real-time updates as you code
⚙️ Configuration
The extension provides two configuration settings:
diagnostics-mcp-server.autoStart
- Type:
boolean - Default:
true - Description: Automatically start HTTP MCP server when VS Code opens
To disable auto-start:
- Open VS Code Settings (Ctrl+,)
- Search for "diagnostics-mcp-server"
- Uncheck "Auto Start"
- Use the "Start HTTP MCP Server" command to start manually
diagnostics-mcp-server.port
- Type:
number - Default:
3846 - Description: Port for HTTP MCP server
To change the port:
- Open VS Code Settings (Ctrl+,)
- Search for "diagnostics-mcp-server.port"
- Set your desired port number
- Restart the server or reload VS Code
- Update your MCP client configuration with the new port
📋 Installation
Step 1: Install VS Code Extension
Install from VS Code Marketplace:
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Diagnostics MCP Server"
- Click Install
Latest Version: 1.0.12 - Complete HTTP MCP implementation with 5 diagnostic tools, enhanced error handling, and working commands
Step 2: Extension Auto-Start
The extension automatically starts the HTTP MCP server when VS Code opens. No additional setup required!
Server Details:
- Protocol: HTTP with Server-Sent Events
- Port: 3846 (automatically managed)
- Startup: Automatic with VS Code
Step 3: Configure MCP Client
Add this to your MCP client configuration (e.g., Claude Desktop config or VS Code MCP settings):
{
"mcpServers": {
"diagnostics": {
"type": "http",
"url": "http://127.0.0.1:3846/mcp",
"description": "VS Code diagnostics - all 5 tools (errors, warnings, info, health, all diagnostics)"
}
}
}
Verify Connection
- Check server status: Visit
http://127.0.0.1:3846/health - View logs: VS Code Output panel → "Diagnostics MCP Server"
- Test connection: Server automatically starts when VS Code opens
Available immediately after VS Code extension installation - no additional setup required!
Usage
Once configured, AI agents (like Claude, GitHub Copilot) can use these 5 MCP tools:
get_all_diagnostics- Get complete diagnostic information from workspaceget_errors- Get only error-level diagnosticsget_warnings- Get only warning-level diagnosticsget_info- Get only info-level diagnosticsget_workspace_health- Get workspace health score (0-100)
🔧 How It Works
This extension uses an HTTP MCP Server architecture:
┌─────────────────────────────────────────────────────┐
│ AI Agent (Claude, GitHub Copilot) │
│ ↓ │
│ HTTP MCP Protocol (port 3846) │
│ ↓ │
│ VS Code Extension (HTTP MCP Server) │
│ ↓ │
│ vscode.languages.getDiagnostics() API │
│ ↓ │
│ ALL Diagnostics (TS, ESLint, Prettier, etc.) │
└─────────────────────────────────────────────────────┘
Why Extension Required?
- VS Code diagnostics are only accessible inside VS Code via the
vscodemodule - The extension provides the bridge between VS Code APIs and the MCP server
- This ensures you get ALL diagnostics from ALL sources, not just TypeScript
📦 What's Included
- HTTP MCP Server - Runs on port 3846 with Server-Sent Events
- 5 Diagnostic Tools - Comprehensive workspace diagnostic access
- 3 VS Code Commands - Start/Stop/Status server control
- Real-time Updates - Live diagnostic monitoring
- Health Scoring - Workspace quality metrics (0-100)
🛠️ Development
Build from Source
git clone https://github.com/Maaz0313-png/Diagnostics-MCP.git
cd "Diagnostics MCP"
npm install
npm run compile
Test Locally
# Test the launcher
node index.js --help
# Test with a workspace
node index.js
📖 API Reference - 5 MCP Tools
1. Tool: get_all_diagnostics
Get complete diagnostic information from workspace.
Returns:
{
"total": 42,
"diagnostics": [
{
"file": "src/app.ts",
"line": 10,
"column": 5,
"severity": "error",
"message": "Type 'string' is not assignable to type 'number'",
"source": "ts"
}
],
"status": "found",
"timestamp": "2025-10-02T10:30:00.000Z"
}
2. Tool: get_errors
Get only error-level diagnostics.
Returns:
{
"count": 5,
"diagnostics": [...],
"severityLevel": "errors",
"status": "found",
"timestamp": "2025-10-02T10:30:00.000Z"
}
3. Tool: get_warnings
Get only warning-level diagnostics.
Returns:
{
"count": 3,
"diagnostics": [...],
"severityLevel": "warnings",
"status": "found",
"timestamp": "2025-10-02T10:30:00.000Z"
}
4. Tool: get_info
Get only info-level diagnostics.
Returns:
{
"count": 2,
"diagnostics": [...],
"severityLevel": "info",
"status": "found",
"timestamp": "2025-10-02T10:30:00.000Z"
}
5. Tool: get_workspace_health
Get workspace health score (0-100) based on diagnostics.
Returns:
{
"healthScore": 85,
"status": "good",
"summary": {
"errors": 2,
"warnings": 5,
"infos": 3,
"total": 10
},
"timestamp": "2025-10-02T10:30:00.000Z"
}
Health Score Calculation:
- Errors: -10 points each
- Warnings: -3 points each
- Info: -1 point each
- Scale: 0-100 (100 = perfect health)
- Status: excellent (90+), good (70+), fair (50+), poor (<50)
🎮 VS Code Commands
Four commands available in Command Palette (Ctrl+Shift+P):
🚀 Diagnostics MCP: Start HTTP MCP Server
- Manually start the MCP server
- Use if server didn't auto-start or autoStart is disabled
🛑 Diagnostics MCP: Stop HTTP MCP Server
- Stop the running MCP server
- Useful for troubleshooting
🔄 Diagnostics MCP: Restart HTTP MCP Server
- Restart the MCP server (stop + start)
- Use after changing configuration settings (port, etc.)
📊 Diagnostics MCP: MCP Server Status (5 Tools + Health)
- View server status, current diagnostics count, and health score
- Quick health check of your workspace
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
MIT License - see LICENSE file for details
🔗 Links
⚠️ Troubleshooting
"MCP server not connecting"
- Check server status: Visit
http://127.0.0.1:3846/health - View logs: VS Code Output panel → "Diagnostics MCP Server"
- Restart server: Use command "Diagnostics MCP: Start HTTP MCP Server"
- Reload VS Code window: Ctrl+Shift+P → "Reload Window"
"Port 3846 already in use"
- Stop other applications using port 3846
- Or change port in VS Code settings:
diagnostics-mcp-server.port - Use "Restart HTTP MCP Server" command or reload VS Code
- Update your MCP client config with the new port
"No diagnostics returned"
- Open a workspace with code files
- Wait for language servers to initialize
- Check VS Code's Problems tab for diagnostics
📝 Version History
1.0.14 (Current)
- ✅ Configuration settings support (autoStart, port)
- ✅ Restart command for easy server restart
- ✅ Configurable port number
- ✅ Optional auto-start disable
1.0.12-1.0.13
- ✅ Complete HTTP MCP server implementation
- ✅ 5 specialized diagnostic tools
- ✅ Enhanced error handling and connection stability
- ✅ Working VS Code commands (Start/Stop/Status)
- ✅ Comprehensive tool documentation in metadata
- ✅ Beautiful diagnostic icon
- ✅ Full workspace health scoring
1.0.11
- ✅ Enhanced connection stability for empty diagnostics
- ✅ HTTP transport implementation
1.0.10
- ✅ Added severity-specific tools (get_errors, get_warnings, get_info)
1.0.0 (Initial Release)
- ✅ Basic VS Code diagnostics integration
- ✅ Support for all language servers and extensions
💡 Use Cases
- AI-Powered Code Review: Let AI agents analyze all code issues
- Automated Quality Checks: Monitor workspace health in real-time
- Smart Refactoring: AI can see all diagnostics before suggesting changes
- Learning Assistant: Help users understand and fix code issues
- CI/CD Integration: Pre-commit diagnostic analysis
Made with ❤️ by Maaz Tajammul
Установка Diagnostics Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Maaz0313-png/Diagnostics-MCPFAQ
Diagnostics Server MCP бесплатный?
Да, Diagnostics Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Diagnostics Server?
Нет, Diagnostics Server работает без API-ключей и переменных окружения.
Diagnostics Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Diagnostics Server в Claude Desktop, Claude Code или Cursor?
Открой Diagnostics Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Diagnostics Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
