AgentStack
MCP unreviewed MIT Self-run

Mcp Safeguard

mcp-syedanas01-mcp-safeguard Β· by SyedAnas01

πŸ›‘οΈ Automated security scanner for MCP (Model Context Protocol) servers β€” 52 rules for prompt injection, credential exposure, SSRF & tool poisoning. pip install mcp-safeguard

β€” No reviews yet
0 installs
9 views
0.0% view→install

Install

$ agentstack add mcp-syedanas01-mcp-safeguard

Open-source listing β€” not yet scanned by AgentStack. Follow the source repository for install instructions.

Security review

⚠ Flagged

1 finding(s); flagged for manual review. Β· v0.1.0 How review works β†’

  • β€’ Prompt-injection patterns
  • β€’ Secret / credential exfiltration
  • β€’ Dangerous shell & filesystem operations
  • β€’ Untrusted network calls
  • β€’ Known-malicious package signatures
  • high Possible prompt-injection directive.

What it can access

  • βœ“ Network access No
  • βœ“ Filesystem access No
  • βœ“ Shell / process execution No
  • ● Environment & secrets Used
  • βœ“ Dynamic code execution No

From automated source analysis of v0.1.0. β€œUsed” means the capability is present in the source β€” more access means more to trust, not that it’s unsafe.

Are you the author of Mcp Safeguard? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

πŸ›‘οΈ mcp-safeguard

The security scanner for MCP servers.

Detect prompt injection Β· credential leaks Β· exposed endpoints Β· tool poisoning

[](https://pypi.org/project/mcp-safeguard/) [](https://doi.org/10.5281/zenodo.20502474) [](https://www.python.org/downloads/) [](https://opensource.org/licenses/MIT) [](https://mcpservers.org/servers/syedanas01/mcp-safeguard) [](https://gitlab.com/anasmohiuddinsyed/mcp-safeguard)

pip install mcp-safeguard
mcp-safeguard scan your-config.json

30-Second Demo

pip install mcp-safeguard
git clone https://github.com/SyedAnas01/mcp-safeguard && cd mcp-safeguard
mcp-safeguard scan examples/demo-vulnerable-config.json
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  mcp-safeguard  β€”  MCP Security Scanner         β”‚
β”‚  github.com/SyedAnas01/mcp-safeguard            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Scanning: examples/demo-vulnerable-config.json
────────────────────────────────────────────────────────────
  [CRITICAL]  CRED-007  AWS Access Key ID
              Location: env.AWS_ACCESS_KEY_ID
              Evidence: AKIA************MPLE
              CVSS:     9.9
              Fix:      Rotate AWS credentials. Use IAM roles.

  [CRITICAL]  PI-011    Data Exfiltration Instruction
              Location: tool:run_query β†’ description
              Evidence: send_data
              CVSS:     9.5
              Fix:      Immediately audit β€” designed to exfiltrate data.

  [HIGH]      TP-002    Covert Operation Descriptor
              Location: tool:summarize_document.description
              Evidence: |MCP over SSE/stdio| D
    D --> E & F & G
    E --> M --> N --> O
    E --> H & I & J & K & L
    H & I & J & K & L --> Q & R

Why This Matters

External research confirms the threat is real: MCPTox (2025) found a 72% attack success rate across 45 production MCP servers, demonstrating that tool poisoning and prompt injection attacks are actively exploitable in today's MCP ecosystem.

OWASP officially added MCP Tool Poisoning to their 2026 threat guidance β€” the same vulnerability category mcp-safeguard's TP-* rules detect.

The gap: The MCP ecosystem grew from zero to 10,000+ servers in 18 months while security tooling lagged behind. mcp-safeguard is an open-source scanner built specifically for MCP's attack surface β€” tool definitions, server configs, and SSRF exposure via prompt injection.

The vulnerability patterns mcp-safeguard detects are documented with illustrative examples in [SECURITY-HALL-OF-SHAME.md](SECURITY-HALL-OF-SHAME.md). Run mcp-safeguard on your own servers and contribute real scan results via GitHub Issues or Discussions.

Share your results β€” open a Discussion or submit a PR to SECURITY-HALL-OF-SHAME.md.


Project Resources & Standards Work

πŸ“° Press & Community

  • Hacker News β€” "MCP-safeguard: Security scanner for MCP servers" (2026-05-22)
  • IETF Internet-Draft β€” draft-mohiuddin-mcp-security-considerations-00, security considerations for the Model Context Protocol
  • OWASP MCP Top 10 β€” Open PR adding an SSRF prevention/detection recommended control (PR #42, under review)

πŸ”’ Real-World Fix Credited

  • googleapis/mcp-toolbox β€” SSRF via redirect chain (CWE-918, fix in PR #3448, reported by Syed Anas Mohiuddin)

πŸ“‹ Awesome Lists PRs Open

Using mcp-safeguard in your pipeline, or found a real issue with it? We welcome scan results and contributions β€” open a Discussion or PR.


Roadmap

  • [x] v0.2 β€” Tool poisoning detection; CVSS scoring; JSON + Markdown output; batch scanning
  • [x] v0.3 β€” SSRF detection module (SS-001–003); MCP server dog-fooding
  • [ ] v0.4 β€” Scan over MCP stdio transport directly; VS Code extension; GitHub Actions plugin
  • [ ] v0.5 β€” AI-assisted remediation (Claude generates fixes); SBOM for tool supply chain
  • [ ] v1.0 β€” SOC2/compliance report templates; MCP registry bulk scanning

Contributing

git clone https://github.com/SyedAnas01/mcp-safeguard
cd mcp-safeguard
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -v

Issues and PRs welcome β€” especially:

  • New injection patterns you've seen in the wild
  • Credential types not yet covered
  • Integrations with other MCP clients
  • Scan results from your own MCP servers (add to SECURITY-HALL-OF-SHAME.md)
  • OWASP MCP Top 10 rule mappings

License

MIT β€” see [LICENSE](LICENSE).


If this helped you, please ⭐ the repo β€” it helps others find it.

GitHub Β· PyPI Β· Issues

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source β€” we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet β€” be the first.

Versions

  • v0.1.0 Imported from the upstream source.