- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Documented (README)
- !No description
- !README contains suspicious pattern: eval\s*\(
claude mcp add code-guardian -- uvx code-guardian-mcp{
"mcpServers": {
"code-guardian": {
"command": "uvx",
"args": ["code-guardian-mcp"]
}
}
}MCP Servers overview
# code-guardian
[](https://github.com/LuminariSoftwares/code-guardian/actions/workflows/ci.yml)
[](https://github.com/LuminariSoftwares/code-guardian/actions/workflows/privacy.yml)
mcp-name: io.github.LuminariSoftwares/code-guardian
One command that tells you three things about any repo, without running it:
- **Safe**: is it safe to run?
- **Works**: will it work?
- **Complete**: does it have what it needs?
Each is a score out of 100 (higher is better), combined into an **Overall** score and an A–F grade. Scores come only
from deterministic checks with fixed weights: same repo, same version, same output, every time. On top of that:
- **Orphan code**: functions, classes and modules nothing reachable from the project's entry points uses, judged
against a small goal contract.
- An optional **plain-English explanation** from a local model, which never adds, removes or rescores a finding.
- A **verify loop** for AI-assisted changes: run it before and after every change to learn what the change fixed,
what it broke, what to fix next, and whether the scan itself can be trusted (see [The verify loop](#the-verify-loop)).
It parses the code (`ast` for Python; `json`, `tomllib` and `configparser` for manifests; regular expressions for
secrets) and never executes, imports or installs it. A scan makes
no network calls. Python 3.11+, standard library only. Status: **0.3.1 is the current release.** The fourth guardian,
next to [stack-guardian](https://github.com/LuminariSoftwares/stack-guardian),
[context-guardian](https://github.com/LuminariSoftwares/context-guardian) and
[tool-guardian](https://github.com/LuminariSoftwares/tool-guardian).
## Install
```
pip install code-guardian-mcp
```
The distribution is `code-guardian-mcp` (`code-guardian` on PyPI is someone else's project); the commands are
`code-guardian` and `code-guardian-mcp`. To run the MCP server without installing anything: `uvx code-guardian-mcp mcp`.
From a clone (for the tests):
```
git clone https://github.com/LuminariSoftwares/code-guardian.git
cd code-guardian
python -m venv .venv
.venv\Scripts\activate # Windows; macOS/Linux: source .venv/bin/activate
pip install -e . pytest
python -m pytest -q
```
## 30-second example
`tests/fixtures/risky_repo` is a small project that trips every scanner. Its key-shaped strings are never stored in
the repository; `tests/make_risky.py` adds them to a copy at test time:
```
python tests/make_risky.py risky_repo
code-guardian scan risky_repo
```
Real output:
```
code-guardian 0.3.1 scan of risky
files: 7 Python, 3 manifests, 2 other (0 skipped, 0 excluded by the goal file)
status: COMPLETE
Safe 0/100 is it safe to run? -237
Works 85/100 will it work? -15
Complete 35/100 does it have what it needs? -65
Overall 33/100 grade F (a Safe check is FAIL (exec.shell, obfuscation, secret.key, tls.off): the grade is at most D)
biggest deductions:
-60 Safe secret.key FAIL x3 at deploy/id_rsa:1, risky/settings.py:1, risky/settings.py:2
-40 Safe obfuscation FAIL x1 at risky/loader.py:7
-30 Safe exec.shell FAIL x1 at risky/runner.py:7
-25 Safe tls.off FAIL x1 at risky/network.py:11
-23 Safe install.hook WARN x3 at package.json:5, setup.py:5, setup.py:14
findings (6 FAIL, 19 WARN, 7 INFO; egress listed below):
Safe:
FAIL secret.key deploy/id_rsa:1 private-key block in the source; value redacted
WARN install.hook package.json:5 npm postinstall script runs on install
INFO deps.unpinned package.json:8 dependency left-pad has no pin or upper bound
INFO deps.unpinned pyproject.toml:4 dependency flask has no pin or upper bound
WARN obfuscation risky/loader.py:3 base64-like blob of 340 characters
WARN exec.dynamic risky/loader.py:7 exec() runs code built at runtime
FAIL obfuscation risky/loader.py:7 exec() runs decoded or decompressed data
FAIL tls.off risky/network.py:11 TLS certificate checking is switched off (verify=False)
WARN net.bind_all risky/network.py:16 binds to all interfaces (0.0.0.0)
FAIL exec.shell risky/runner.py:7 os.system runs a shell command built from input, env or network
WARN exec.shell risky/runner.py:11 subprocess.run(shell=True) runs a command through the shell
WARN exec.dynamic risky/runner.py:15 eval() runs code built at runtime
FAIL secret.key risky/settings.py:1 sk- key shape (privacy pattern 5) in the source; value redacted
FAIL secret.key risky/settings.py:2 password-like literal assigned to 'password' in the source; value redacted
WARN obfuscation risky/settings.py:3 high-entropy literal of 48 characters
WARN deser.unsafe risky/storage.py:8 pickle.load can run code hidden in the data
WARN deser.unsafe risky/storage.py:12 yaml.load without SafeLoader can build arbitrary Python objects
WARN fs.outside risky/storage.py:16 writes outside the project: /tmp/risky-report.txt (absolute path)
WARN install.hook setup.py:5 class PostInstall overrides the install command
INFO deps.unpinned setup.py:13 dependency requests has no pin or upper bound
WARN install.hook setup.py:14 setup() cmdclass overrides build/install commands
Works:
WARN works.tests_missing . no test files: nothing checks that the code works
Complete:
WARN complete.ci_missing . no CI configuration: nothing runs the tests on each change
WARN complete.license_missing . no licence file: nobody may legally reuse this code
WARN complete.readme_missing . no README: nobody can tell what this is or how to run it
WARN complete.license_undeclared pyproject.toml:1 the package metadata declares no licence
WARN complete.metadata pyproject.toml:1 pyproject.toml [project] is missing: requires-python
INFO deps.declared_unused pyproject.toml:4 dependency flask is declared but never imported
egress inventory (4):
WARN risky/network.py:5 url http://{host}:8080/upload
INFO risky/network.py:6 url https://example.com/docs
INFO risky/network.py:7 ip 100.64.0.5
INFO risky/network.py:11 call requests.post
hygiene (inferred (library public API) entry points: 1): 0 dead, 0 test-only, 0 uncertain
notes:
- code-guardian analyses Python only: 1 file(s) in other languages (.js 1) got the secret scan only
weights used (each check (code + level) deducts its weight once, plus a quarter of the weight per extra occurrence (rounded up), at most 2x the weight; INFO is never scored):
Safe deps.unpinned INFO 0 · deser.unsafe WARN 10 · exec.dynamic FAIL 30 · exec.dynamic WARN 10 ·
exec.shell FAIL 30 · exec.shell WARN 10 · fs.outside WARN 3 · install.hook WARN 15 ·
net.bind_all WARN 5 · net.egress INFO 0 · net.egress WARN 2 · obfuscation FAIL 40 ·
obfuscation WARN 10 · privacy.pii_log WARN 5 · privacy.pii_prompt WARN 5 · secret.history FAIL 30 ·
secret.key FAIL 40 · secret.key INFO 0 · supply.lookalike WARN 15 · supply.unknown_package FAIL 40 ·
supply.unknown_package INFO 0 · supply.unknown_package WARN 10 · tls.off FAIL 25 · tls.off WARN 10
Works orphan.dead WARN 3 · works.commented_code INFO 0 · works.dead_flag INFO 0 ·
works.entry_missing FAIL 30 · works.import_unresolved WARN 10 · works.relative_missing FAIL 25 ·
works.syntax FAIL 30 · works.syntax INFO 0 · works.test_no_assert WARN 5 ·
works.tests_missing WARN 15 · works.todo_stub WARN 3
Complete complete.ci_missing WARN 10 · complete.env_example WARN 10 · complete.license_missing WARN 20 ·
complete.license_undeclared WARN 5 · complete.lockfile WARN 10 · complete.metadata WARN 10 ·
complete.readme_missing WARN 20 · complete.readme_sections WARN 5 · complete.readme_short WARN 10 ·
deps.declared_unused INFO 0
static analysis: every finding is LIKELY; the scores come from fixed weights, never from a model
```
Exit code 1: there are FAIL findings. `--json` prints the same report as JSON (shape below); `--fail-on WARN` (or
`INFO`) lowers the bar for CI.
| exit | meaning |
|---|---|
| 0 | nothing at or above `--fail-on` (default `FAIL`), and the scan is COMPLETE |
| 1 | findings at or above it |
| 2 | usage error, a missing PATH, or a bad goal file |
| 3 | incomplete scan: the status is PARTIAL or INVALID (see [Scan status](#scan-status)) and nothing is at or above `--fail-on` |
`scan` gates on every scored finding (Safe, Works and Complete); `code-guardian orphans PATH` gates on the hygiene
findings.
## The verify loop
code-guardian answers four questions about a change, so a developer or a coding agent can run it before and after
every edit:
| question | command | MCP tool |
|---|---|---|
| Can I trust this scan? | every report's `status`: COMPLETE, PARTIAL (grade capped at B) or INVALID (no grade); exit 3 | `scan` |
| What should be fixed next? | `code-guardian plan PATH` (each check row's **estimated gain if fixed**, best first) | `plan` |
| What did the change fix, and what did it break? | `code-guardian diff BEFORE.json AFTER.json` (exit 1 when anything regressed) | `diff` |
| Is this finding new? | `code-guardian baseline PATH`, then `scan --baseline FILE` (gate on new findings only) | `scan` with `baseline` |
An agent's loop, from the shell:
```
code-guardian scan . --json > before.json # 1. scan: is the scan COMPLETE? what is the grade?
code-guardian plan . --top 5 # 2. plan: the five fixes worth the most points, with locations
# 3. fix the top item (the plan never edits code)
code-guardian scan . --json > after.json # 4. scaWhat people ask about code-guardian
What is LuminariSoftwares/code-guardian?
+
LuminariSoftwares/code-guardian is mcp servers for the Claude AI ecosystem with 0 GitHub stars.
How do I install code-guardian?
+
You can install code-guardian by cloning the repository (https://github.com/LuminariSoftwares/code-guardian) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is LuminariSoftwares/code-guardian safe to use?
+
Our security agent has analyzed LuminariSoftwares/code-guardian and assigned a Trust Score of 67/100 (tier: OK). See the full breakdown of passed checks and flags on this page.
Who maintains LuminariSoftwares/code-guardian?
+
LuminariSoftwares/code-guardian is maintained by LuminariSoftwares. The last recorded GitHub activity is dated 2026-10-16, with 0 open issues.
Are there alternatives to code-guardian?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy code-guardian to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/luminarisoftwares-code-guardian)<a href="https://claudewave.com/repo/luminarisoftwares-code-guardian"><img src="https://claudewave.com/api/badge/luminarisoftwares-code-guardian" alt="Featured on ClaudeWave: LuminariSoftwares/code-guardian" width="320" height="64" /></a>More MCP Servers
Reverse engineer anything with agents, from app behavior down to native binaries.
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev