ide-diagnostics

estiens's avatarfrom estiens

VS Code language diagnostics and Jupyter code execution using IDE MCP. Use for checking type errors, running Python code in notebooks, or getting real-time code analysis. Triggers on requests for diagnostics, type checking, or notebook execution.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 31, 2025⬇️1downloads

When & Why to Use This Skill

This Claude skill integrates directly with VS Code and Jupyter via IDE MCP, enabling real-time language diagnostics and interactive Python code execution. It empowers developers to identify type errors, warnings, and hints instantly while providing a robust environment for data exploration and notebook-based experimentation, bridging the gap between AI assistance and local development environments.

Use Cases

  • Real-time Error Detection: Automatically identify and fix TypeScript, Python, or other language-specific type errors and syntax warnings directly within the IDE workflow.
  • Interactive Data Science: Execute complex Python code blocks in a persistent Jupyter kernel to perform data analysis, generate visualizations, and inspect dataframes dynamically.
  • Automated Pre-commit Validation: Programmatically check language server diagnostics to ensure code quality and 'error-free' status before committing changes to a repository.
  • Rapid Prototyping and Debugging: Test code snippets and inspect variable states in real-time without leaving the chat interface, maintaining kernel state across multiple execution calls for seamless debugging.
nameide-diagnostics
descriptionVS Code language diagnostics and Jupyter code execution using IDE MCP. Use for checking type errors, running Python code in notebooks, or getting real-time code analysis. Triggers on requests for diagnostics, type checking, or notebook execution.

IDE Integration

VS Code integration for language diagnostics and Jupyter notebook execution.

Available Tools

getDiagnostics

Get language server diagnostics (errors, warnings, hints) from VS Code.

# Get all diagnostics
result = mcp__ide__getDiagnostics()

# Get diagnostics for specific file
result = mcp__ide__getDiagnostics(uri="file:///path/to/file.ts")

Response Format

{
    "diagnostics": {
        "file:///path/to/file.ts": [
            {
                "severity": "error",
                "message": "Type 'string' is not assignable to type 'number'",
                "range": {
                    "start": {"line": 10, "character": 5},
                    "end": {"line": 10, "character": 15}
                },
                "source": "typescript",
                "code": 2322
            }
        ]
    }
}

Severity Levels

Level Description
error Must be fixed
warning Should be reviewed
info Informational
hint Suggestions

executeCode

Execute Python code in the current Jupyter kernel.

# Execute Python code
result = mcp__ide__executeCode(code="print('Hello World')")

# Multi-line code
result = mcp__ide__executeCode(code="""
import pandas as pd
df = pd.read_csv('data.csv')
print(df.head())
""")

Response Format

{
    "outputs": [
        {
            "type": "text",  # or "image", "error", "stream"
            "content": "Hello World",
            "mimeType": "text/plain"
        }
    ],
    "executionCount": 1
}

Output Types

Type Description
text Text output
stream stdout/stderr
image Visualizations
error Execution errors

Common Use Cases

Pre-commit Type Check

# Check for errors before committing
diagnostics = mcp__ide__getDiagnostics()

errors = []
for file, issues in diagnostics["diagnostics"].items():
    file_errors = [i for i in issues if i["severity"] == "error"]
    if file_errors:
        errors.extend(file_errors)

if errors:
    print(f"Found {len(errors)} errors - fix before committing")

Data Analysis in Notebook

# Load and explore data
mcp__ide__executeCode(code="""
import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('sales.csv')
print(df.describe())
""")

# Create visualization
mcp__ide__executeCode(code="""
df.groupby('month')['revenue'].sum().plot(kind='bar')
plt.title('Monthly Revenue')
plt.show()
""")

Variable Inspection

# Check variable state
mcp__ide__executeCode(code="print(type(my_var), repr(my_var))")

# Inspect DataFrame
mcp__ide__executeCode(code="display(df.info())")

Important Notes

  1. Kernel state persists - Variables remain between executeCode calls
  2. Restart clears state - Kernel restart removes all variables
  3. Diagnostics are real-time - Reflect current file state
  4. File URI format - Use file:///absolute/path for specific files

Best Practices

  1. Check diagnostics before commits - Catch errors early
  2. Use executeCode for exploration - Interactive data analysis
  3. Preserve kernel state - Avoid unnecessary recomputation
  4. Handle errors gracefully - Check output type for errors