goldmembrane avatar

Codesafer

goldmembrane/cleaner-code

Adds six security scanning tools to your MCP client for catching threats that slip past traditional linters. Scan individual files or entire directories for invisible Unicode characters, BiDi/Trojan Source attacks, homoglyphs, and obfuscation patterns. Check package.json for typosquatted dependencies, scan AI rules files like .cursorrules and CLAUDE.md for backdoors, and run deep CodeBERT analysis on suspicious code chunks. Everything runs locally over stdio. The static scanners cover known attack patterns with deterministic rules, while the transformer model catches novel or heavily obfuscated code. Ten free AI analysis runs per session, unlimited static scans. Useful when reviewing AI generated code before merging or when auditing dependencies in supply chain sensitive projects.

tools
6
transport
STDIO
last updated
Apr 11, 2026

Tools

6 tools

Public tool metadata for what this MCP can expose to an agent.

scan_fileScan a single file for hidden malicious code patterns.

Scan a single file for hidden malicious code patterns.

No parameter schema in public metadata yet.

scan_directoryRecursively scan a directory across all source files.

Recursively scan a directory across all source files.

No parameter schema in public metadata yet.

scan_rules_fileScan an AI configuration/rules file for prompt injection and Rules File Backdoor attacks.

Scan an AI configuration/rules file for prompt injection and Rules File Backdoor attacks.

No parameter schema in public metadata yet.

check_dependenciesCheck package.json for typosquatting, suspicious install scripts, and dependency risks.

Check package.json for typosquatting, suspicious install scripts, and dependency risks.

No parameter schema in public metadata yet.

ai_analyzeDeep AI analysis using the trained CodeBERT model (classifies chunks as malicious/benign with confidence).

Deep AI analysis using the trained CodeBERT model (classifies chunks as malicious/benign with confidence).

No parameter schema in public metadata yet.

explain_findingGet detailed explanation of a specific threat category, with attack scenarios and remediation.

Get detailed explanation of a specific threat category, with attack scenarios and remediation.

No parameter schema in public metadata yet.

Sponsors

Readme

CodeSafer (cleaner-code)

AI code security scanner as a Model Context Protocol (MCP) server. Detects hidden threats in AI-generated code that traditional linters miss.

npm license: ISC Node

Website: codesafer.org  ·  MCP Clients: Claude Code, Cursor, VS Code + Copilot, Cline


Why CodeSafer?

AI coding assistants generate code fast — but who's checking it for hidden threats?

Recent supply-chain attacks show that malicious code can hide in ways human reviewers and traditional linters routinely miss:


View the full README on GitHub

Details

Repository
github.com/goldmembrane/cleaner-code
Website
codesafer.org
Package
cleaner-code
Transport
STDIO
Registry
MCP registry, active