MCP server safety grade
com.cognivators/mcp-safeguard
Security scanner for MCP servers: prompt injection, credential leaks, SSRF, shell injection.
uvx mcp-safeguard · pypi mcp-safeguard 0.11.0 · score 90/100 · scanned 2026-12-05
What it can do
- Yes: Network access
- Yes: Writes or deletes files
- Yes: Runs programs or shell commands
- Yes: Reads environment variables
- Yes: Runs code built at runtime
These are normal for many MCP servers. They tell you what the server could do with the access you give it.
Risk signals
- Builds and runs code at runtime
src/mcp_safeguard/scanner/source_scanner.py:661r"(?:child_process\.exec(?:Sync)?|(?<![.\w])exec(?:Sync)?|"
- Builds and runs code at runtime
src/mcp_safeguard/scanner/source_scanner.py:701r"\bfunction\s+exec(?:Sync)?\s*\(|\b(?:var|let|const)\s+exec(?:Sync)?\s*=\s*(?:function\b|\()"
- Builds and runs code at runtime
src/mcp_safeguard/scanner/source_scanner.py:1514r"(?<![\w.])exec(?:Sync|Async|Promise|P)?\s*\(|\.exec(?:Sync|Async)\s*\(|\bpromisify\(\s*exec\s*\)\s*\(|"
Worth knowing
Not scored. Often harmless (security tools, denylists and chat bots mention these too), shown so you can judge.
- Mentions credential files (SSH keys, cloud credentials, browser data or crypto wallets)
src/mcp_safeguard/scanner/rescan.py:224comparing local state only", never as "nothing changed"."""
- Mentions credential files (SSH keys, cloud credentials, browser data or crypto wallets)
src/mcp_safeguard/scanner/tool_analyzer.py:148r"(?i)read\s+.{0,80}(~/|/etc/|\.ssh|id_rsa|mcp\.json|\.env|config|secret|credential)"
Package facts
| Weekly downloads | — |
|---|---|
| First published | 2026-05-06 |
| This version published | 2026-11-25 |
| Versions | 12 |
| Maintainers | — |
| Licence | MIT |
| Source repository | github.com/SyedAnas01/mcp-safeguard |
| Runs scripts on install | No |
| Files in package | 119 (2,616 KB) |
| Web addresses in code | attacker.com cognivators.com dailycve.com thehackernews.com www.cyera.com www.sentinelone.com |
Where we saw each capability (12 examples)
- Reads environment variables (where API keys usually live)
src/mcp_safeguard/observability/dashboard.py:35report_dir = Path(os.environ.get("MCP_SAFEGUARD_REPORT_DIR", "/tmp/mcp-safeguard-reports")) - Makes network requests
src/mcp_safeguard/scanner/adversary.py:64import urllib.request
- Makes network requests
src/mcp_safeguard/scanner/adversary.py:1756req = urllib.request.Request(url, data=json.dumps(body).encode(), headers=headers, method="POST")
- Makes network requests
src/mcp_safeguard/scanner/adversary.py:1757with urllib.request.urlopen(req, timeout=self._timeout) as resp: # noqa: S310 -- operator-configured URL
- Reads environment variables (where API keys usually live)
src/mcp_safeguard/scanner/adversary.py:1800e = os.environ if env is None else env
- Reads environment variables (where API keys usually live)
src/mcp_safeguard/scanner/credential_scanner.py:241(r"os\.environ\[", Severity.MEDIUM, "Python os.environ access in tool text"),
- Writes, moves or deletes files
src/mcp_safeguard/scanner/ledger.py:132with path.open("a", encoding="utf-8") as fh: - Runs shell commands or other programs
src/mcp_safeguard/scanner/priority_score.py:447result = subprocess.run(
- Runs shell commands or other programs
src/mcp_safeguard/scanner/rescan.py:145result = subprocess.run(
- Runs shell commands or other programs
src/mcp_safeguard/scanner/sandbox.py:74`subprocess.Popen`/`os.system` (every subprocess/exec call, full argv),
- Writes, moves or deletes files
src/mcp_safeguard/scanner/sandbox.py:624with open({out_path!r}, "w") as f: - Writes, moves or deletes files
src/mcp_safeguard/scanner/taint_scanner.py:249"os.remove($CMD)",
Badge
Maintainer? Add it to your README:
[](https://nodekya.com/mcp/com-cognivators-mcp-safeguard)
The badge updates when we re-grade a new release from the registry.
Automated scan of the published package, not a security audit. A good grade means we found none of the patterns we check for (method). Think we got it wrong? Email hello@primemoverindustries.com and we re-check within 2 days.
Need a package that isn't here checked, or a fresh check of an unreleased version? Check any npm or PyPI package (US$9).
This grade as JSON (free, for agents).