
agentshield-mcp
io.github.aliuynk/agentshield-mcp
Scan prompts for invisible U+E0000 tags, audit MCP configs, mask PII, and block SSRF URLs.
Documentation
AgentShield 2027 — MCP Security Server, Prompt-Injection Scanner & EU AI Act Benchmark
Official MCP Registry: io.github.aliuynk/agentshield-mcp
Zero-dependency Model Context Protocol (MCP) security server and static scanner for Claude Desktop, Cursor, Windsurf, and VS Code.
- Live Browser X-Ray Scanner & Benchmark: https://aliuynk.github.io/mcp-agent-security-scanner/
- MCP Tool-Poisoning & U+E0000 Defense Guide: https://aliuynk.github.io/mcp-agent-security-scanner/mcp-tool-poisoning-guide.html
- Pro Runtime Wire Firewall & 900-Sample Red-Team Kit ($39 Once): https://tomris.gumroad.com/l/exdye
Install as a Live MCP Server (npx — Zero Clone Required)
Add directly to .cursor/mcp.json or claude_desktop_config.json:
{
"mcpServers": {
"agentshield-scanner": {
"command": "npx",
"args": ["-y", "github:aliuynk/mcp-agent-security-scanner"]
}
}
}
Exposes 3 local stdio MCP tools (protocolVersion: "2024-11-05"):
scan_untrusted_text— Decodes hiddenU+E0001..U+E007FUnicode tags, zero-width/bidi splits, mixed-script homoglyphs, Base64/Hex/ROT13 payloads, and ChatML escapes.audit_mcp_config— Auditstools/listJSON schemas or local.cursor/mcp.jsonconfigs for<IMPORTANT>tool poisoning, unpinnednpxpackages, and plaintext keys.verify_url_ssrf_safe— Blocks cloud metadata (169.254.169.254), localhost, decimal IP (2852039166), and octal (0251.0376.0251.0376) SSRF bypasses.
Run as a GitHub Action in CI
- uses: aliuynk/mcp-agent-security-scanner@v1.0.0
with:
path: .
Measured Empirical Benchmark (900 Samples)
Tested deterministically across 600 adversarial vectors (12 attack families) + 300 realistic hard-negative benign prompts (git commits, SQL, JWTs, SHA-256 checksums, clean MCP tools/list schemas, and native Turkish/Russian/Greek/German messages):
| Metric | Measured Result |
|---|---|
| Adversarial Recall (600 vectors) | 100.00% (600/600) |
| Hard-Negative False Positive Rate (300 benign) | 0.00% (0/300) |
| Median Scan Latency (p50) | 0.0094 ms |
| Tail Scan Latency (p99) | 0.2740 ms |
12 Covered Attack Families (50 cases each -> 50/50 caught)
unicode_tag_smuggling— InvisibleU+E0001..U+E007FASCII tag payloads (LLM01:2025/Art. 15(5))zero_width_bidi_obfuscation—ZWSP/ZWNJ/RLOkeyword splitting (LLM01:2025)homoglyph_mixed_script— Latin + Cyrillic/Greek mixed-script spoofing (LLM01:2025)encoded_payload_wrapping— Base64, Hex, URL-encoded, and ROT13 wrapped overrides (LLM01:2025)mcp_tool_description_poisoning—<IMPORTANT>hidden~/.ssh,.env, silent redirect prompts (LLM03/LLM06/Art. 15(4))mcp_rugpull_schema_mutation— Mid-session schema/description fingerprint drift (LLM03:2025/Art. 15(4))markdown_image_exfiltration— Query-param token exfiltration markdown beacons (LLM02/LLM05)indirect_rag_html_injection— Hidden comments,display:none,font-size:0RAG injections (LLM01:2025)delimiter_chatml_escape—<|im_start|>system,</tool_output>,[/INST]escapes (LLM01:2025)system_prompt_extraction— Verbatim prompt leakage probes (LLM07:2025)ssrf_and_path_traversal_sink— Decimal (2852039166), octal (0251.0376.0251.0376), IPv6 & IMDSv1 bypass (LLM06:2025)agent_doom_loop_trace— 3x identical loops,A -> B -> A -> Bping-pong, and USD budget caps (LLM10:2025/Art. 15(1))
Free Open-Source Static Scanner (Included in This Repo)
Scan your .cursor/mcp.json, claude_desktop_config.json, or repository locally with Node.js >=20 and zero dependencies:
git clone https://github.com/aliuynk/mcp-agent-security-scanner.git
node mcp-agent-security-scanner/free-scanner/scan-mcp-configs.mjs ~/.cursor
Pro Engineering Kit ($39 One-Time — Zero Subscriptions)
Upgrade to AgentShield 2027 Pro to unlock:
pro-pack/mcp-guard/mcp-firewall.mjs— Drop-in stdio JSON-RPC firewall for any MCP server with schema rug-pull pinning, SSRF blocking, Unicode scrubbing, and doom-loop interruption.pro-pack/llm-proxy/circuit-breaker-worker.js— Zero-dep Cloudflare Worker proxy enforcing per-session USD caps and loop breaking across OpenAI, Anthropic, Gemini & OpenRouter.pro-pack/python-sdk/agentshield.py—@guard_agent_rundecorator,DoomLoopBreaker,is_ssrf_url, andscan_untrusted_textfor FastAPI, LangGraph & CrewAI.pro-pack/eu-ai-act-auditor/run-redteam-audit.mjs+ full 900-sample JSONL corpus generating a print-ready EU AI Act Article 15 Technical Evidence Dossier.
https://github.com/aliuynk/mcp-agent-security-scanner/releases/download/v1.0.1/agentshield-mcp.mcpb# mcpb: https://github.com/aliuynk/mcp-agent-security-scanner/releases/download/v1.0.1/agentshield-mcp.mcpb