SkillAgentSearch skills...

mcp-code-sanitizer

Strict AI code reviewer MCP server powered by Groq

Install / Use

claude mcp add notasandy -- npx -y github:notasandy/mcp-code-sanitizer

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
🔌

MCP Server

Model Context Protocol server

Quality Score

70/100

Category

Security

Supported Platforms

Claude Code
Claude Desktop
Cursor

Our assessment of mcp-code-sanitizer

mcp-code-sanitizer scores 70/100 on our quality scale, 1047th of 1,106 Security skills we index.

Its MCP Server is 6.7 KB long, well organised into 18 sections with 12 code examples: a thorough specification that gives an agent plenty to work with.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
29/30
Structure
20/20
Description
8/15
Adoption
3/20
Freshness
11/15

Maintenance, license and trust

  • The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 85/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.

Automated pattern scan on 2026-11-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

mcp-code-sanitizer compared with similar skills

All 4 of these similar skills score higher than mcp-code-sanitizer; compare them before choosing.

SkillScoreStarsUpdatedFormat
mcp-code-sanitizer (this skill)by notasandy7036mo agoMCP Server
Agent-Reachby Panniantong100108.8ktodayCLAUDE.md
headroomby headroomlabs-ai10078.8ktodayCLAUDE.md
CowAgentby zhayujie10047.8ktodayCLAUDE.md
Scraplingby D4Vinci10096.5ktodayMCP Server

Frequently asked questions

How do I install mcp-code-sanitizer?
Run claude mcp add notasandy -- npx -y github:notasandy/mcp-code-sanitizer. The install tabs above show the steps for each supported agent.
Which AI agents does mcp-code-sanitizer work with?
It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
Is mcp-code-sanitizer safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is MIT-licensed and scores 85/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is mcp-code-sanitizer still maintained?
The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
<!-- mcp-name: io.github.notasandy/mcp-code-sanitizer -->

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).

Python PyPI FastMCP Groq License

Claude / Cursor / VS Code  ──MCP──►  code-sanitizer  ──REST──►  Groq API
                                        (server.py)              (llama-3.3-70b)

demo


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"]
}

Installation

Prerequisite: Get a free Groq API key at console.groq.com/keys — no credit card required.

Claude Code CLI

claude mcp add code-sanitizer -e GROQ_API_KEY=gsk_your_key -- uvx mcp-code-sanitizer

Claude Desktop

| OS | Config file | |---|---| | macOS | ~/Library/Application Support/Claude/claude_desktop_config.json | | Windows | %APPDATA%\Claude\claude_desktop_config.json | | Linux | ~/.config/Claude/claude_desktop_config.json |

{
  "mcpServers": {
    "code-sanitizer": {
      "command": "uvx",
      "args": ["mcp-code-sanitizer"],
      "env": {
        "GROQ_API_KEY": "gsk_…[redacted]"
      }
    }
  }
}

Cursor

Create .cursor/mcp.json in your project (or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "code-sanitizer": {
      "command": "uvx",
      "args": ["mcp-code-sanitizer"],
      "env": {
        "GROQ_API_KEY": "gsk_…[redacted]"
      }
    }
  }
}

VS Code

Requires VS Code 1.99+ with GitHub Copilot. Create .vscode/mcp.json in your project:

{
  "servers": {
    "code-sanitizer": {
      "command": "uvx",
      "args": ["mcp-code-sanitizer"],
      "env": {
        "GROQ_API_KEY": "gsk_…[redacted]"
      }
    }
  }
}

Or add globally via Ctrl+Shift+P → "MCP: Add Server".

Don't have uvx? Install it with pip install uv, then use the commands above.


Manual install (alternative)

If you prefer cloning the repo:

git clone https://github.com/notasandy/mcp-code-sanitizer
cd mcp-code-sanitizer
pip install -r requirements.txt
cp .env.example .env   # add your GROQ_API_KEY
python server.py

Then point the client config to:

{
  "command": "python",
  "args": ["/full/path/to/server.py"],
  "env": { "GROQ_API_KEY": "gsk_…[redacted]" }
}

GitHub Action — automatic PR review

Add AI code review to any repository in 5 lines. The action posts a structured comment on every PR with score, issues, and fix suggestions.

# .github/workflows/ai-review.yml
name: AI Code Review
on:
  pull_request:
    types: [opened, synchronize]

permissions:
  contents: read
  pull-requests: write

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: notasandy/mcp-code-sanitizer@v1
        with:
          groq_api_key: ${{ secrets.GROQ_API_KEY }}

Add GROQ_API_KEY to your repository secrets → Settings → Secrets → Actions.

The action automatically:

  • Reviews only changed files (up to 10 per PR)
  • Posts a score and structured issue list as a PR comment
  • Fails the check if critical issues are found

Usage in chat

After connecting, just write naturally:

Review this code for vulnerabilities:

def get_user(user_id):
    query = f"SELECT * FROM users WHERE id = {user_id}"
    return db.execute(query)

Or call tools explicitly:

analyze_file /path/to/my_script.py
generate_tests for this function: ...
compare_code — before vs after refactor, did it get better?
generate_report and save to /tmp/report.html

Architecture

mcp-code-sanitizer/
├── server.py          # FastMCP entry point
├── config.py          # Constants — keys, limits, extension map
├── groq_client.py     # Async Groq client with auto-retry on 429
├── cache.py           # In-memory LRU cache with TTL
├── prompts.py         # System prompts for all tools
└── tools/
    ├── analyze.py     # analyze_code
    ├── compare.py     # compare_code
    ├── explain.py     # explain_code
    ├── tests.py       # generate_tests
    ├── file_tool.py   # analyze_file — chunking + parallel analysis
    ├── cache_tool.py  # cache_info
    └── report.py      # generate_report — HTML output

Configuration

All settings via .env or environment variables:

| Variable | Default | Description | |---|---|---| | GROQ_API_KEY | — | Required. Get at console.groq.com | | GROQ_MODEL | llama-3.3-70b-versatile | Groq model to use | | CACHE_TTL | 3600 | Cache TTL in seconds | | CACHE_MAX | 200 | Max cached entries |

Available Groq models

| Model | Speed | Quality | |---|---|---| | llama-3.3-70b-versatile | Fast | Best (default) | | llama-3.1-8b-instant | Fastest | Good | | mixtral-8x7b-32768 | Fast | Great |


Contributing

PRs and Issues are welcome. Most wanted:

  • Support for other LLM providers (OpenAI, Anthropic)
  • New tools: dependency audit, complexity score, docstring generator
  • Prompt improvements and new language support

License

MIT — do whatever you want. A star would be appreciated.


Links

Related Skills

View on GitHub
GitHub Stars3
CategorySecurity
Updated5mo ago
Forks0

Languages

Python

Trust signals

85/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

2 low1 info