# Quick Setup: MCP Diagnostics + Cursor
## π **v1.4.0 - AUTO-DEPLOYMENT & CROSS-PLATFORM EXCELLENCE**
- **810 Tests Passing** | **97.99% Coverage** | **Production Ready**
- **Automatic MCP Server Registration** with one-click setup
- **Cross-Platform Diagnostic Analysis** - Enhanced TypeScript/ESLint integration
- **Universal Client Support** - Cursor, VS Code, Windsurf, Claude Desktop
## π 1-Minute Setup
### 1. Create MCP Config File
**Windows:** `C:\Users\Remym\.cursor\mcp.json`
**macOS/Linux:** `~/.cursor/mcp.json`
```json
{
"mcpServers": {
"vscode-diagnostics": {
"command": "node",
"args": ["scripts/mcp-server.js"],
"cwd": "C:/Users/Remym/pythonProject/__personal-projects/mcp-diagnostics-extension",
"env": {
"NODE_ENV": "production",
"MCP_DEBUG": "false"
}
}
}
}
```
β
**Production Server:** Use `scripts/mcp-server.js` for real diagnostic data from VS Code.
### 2. Restart Cursor
Close and reopen Cursor completely.
### 3. Verify in Settings
Settings β MCP Tools β Look for "vscode-diagnostics" β
## π§ͺ Quick Test Commands
In Cursor chat, try:
- `"What diagnostic problems are in my workspace?"`
- `"Show me all errors in my project"`
- `"Give me a summary of workspace problems"`
## π§ Available Tools
| Tool | Description | Example |
|------|-------------|---------|
| `getProblems` | Get all diagnostics | "Show all warnings" |
| `getProblemsForFile` | File-specific problems | "Problems in src/app.ts?" |
| `getWorkspaceSummary` | Statistics overview | "Problem summary by severity" |
## β¨ Latest Features (v1.4.0)
### π¨ Enhanced Status Bar
- **π΄ Red Background**: When errors are present (`$(error) MCP: 3E 2W`)
- **π‘ Orange Background**: When only warnings are present (`$(warning) MCP: 0E 5W`)
- **β
Green Check**: When no problems exist (`$(check) MCP: 0E 0W`)
### β‘ Real-time Updates
- **Instant Updates**: Status bar changes immediately when problems change
- **Live Diagnostics**: MCP tools return current VS Code diagnostic data
- **Performance**: <100ms response times for all MCP tools
### π οΈ Extension Commands
Access via Command Palette (Ctrl+Shift+P):
- **`MCP Diagnostics: Show Status`** - Detailed webview with statistics
- **`MCP Diagnostics: Restart Server`** - Restart with progress indication
- **`MCP Diagnostics: Show Setup Guide`** - Interactive setup wizard
### π€ Auto-Deployment Features (NEW in v1.4.0)
- **π§ Automatic MCP Server Registration** - One-click setup with `configureServer` command
- **βοΈ Smart Detection** - Automatically detects VS Code environment and configures appropriately
- **π Multi-Method Registration** - Supports proposed API, workspace config, and user settings
- **β
Enterprise-Grade Infrastructure** - Atomic configuration operations with rollback support
## π Universal MCP Configuration
### For VS Code (with MCP support)
```json
{
"servers": {
"vscode-diagnostics": {
"type": "stdio",
"command": "node",
"args": ["scripts/mcp-server.js"],
"cwd": "C:/Users/Remym/pythonProject/__personal-projects/mcp-diagnostics-extension"
}
}
}
```
### For Windsurf IDE
```json
{
"servers": {
"vscode-diagnostics": {
"command": "node",
"args": ["scripts/mcp-server.js"],
"cwd": "C:/Users/Remym/pythonProject/__personal-projects/mcp-diagnostics-extension"
}
}
}
```
### For Claude Desktop
```json
{
"mcpServers": {
"vscode-diagnostics": {
"command": "node",
"args": ["scripts/mcp-server.js"],
"cwd": "C:/Users/Remym/pythonProject/__personal-projects/mcp-diagnostics-extension"
}
}
}
```
## π Troubleshooting
**Not working?**
1. Check file path in config is correct
2. Run `npm run compile` in extension directory
3. Restart Cursor completely
4. Test: `node scripts/mcp-server.js`
**Success indicators:**
- β
Server listed in MCP Tools settings
- β
AI can access diagnostic tools
- β
Real-time problem analysis works
- β
No "π§ͺ MOCK" prefixes in responses
## π― Data Sources
The MCP server provides **real diagnostic data** from:
1. **Primary**: VS Code extension export (real-time)
2. **Fallback**: TypeScript compiler analysis
3. **Fallback**: ESLint analysis
4. **Caching**: Intelligent caching for performance
**Real vs Mock Data:**
- β
**Real**: Actual file paths, error messages, line numbers
- β **Mock**: Generic test data with "π§ͺ MOCK" prefixes