mcp-code-sanitizer
Strict AI-powered code reviewer for Claude Desktop, Cursor, VS Code, and Claude Code CLI. Finds bugs, vulnerabilities, and security issues — powered by Groq (free API).
Claude / Cursor / VS Code ──MCP──► code-sanitizer ──REST──► Groq API
(server.py) (llama-3.3-70b)Features
| Tool | What it does |
|---|---|
analyze_code |
Strict review — bugs, security issues, score 0–100 |
compare_code |
Compares two versions, detects regressions, recommends merge/request_changes |
explain_code |
Step-by-step explanation for junior / middle / senior audience |
generate_tests |
Generates pytest / jest / go test — happy path, edge cases, security |
analyze_file |
Analyzes a whole file from disk with parallel chunking |
generate_report |
Builds an HTML report from any analysis result |
cache_info |
Cache statistics and clearing |
Example output
{
"summary": "Critical SQL injection and secret exposed in logs",
"score": 23,
"issues": [
{
"severity": "critical",
"line": 2,
"title": "SQL Injection",
"description": "f-string directly interpolates user_id into query",
"fix": "cursor.execute('SELECT * FROM users WHERE id = %s', (user_id,))"
}
],
"warnings": [{"title": "No exception handling", "description": "..."}],
"suggestions": ["Consider using an ORM instead of raw SQL"]
}





