Five specialized agents scan for prompt injection, command execution, SSRF and more. Every finding carries a verbatim code snippet, an attack path, and CWE / OWASP references — and no user code is ever executed.
Pipeline
The pipeline is deterministic-first: static analysis gathers the evidence, and LLMs are only allowed to judge what they can actually see. Every LLM step has a deterministic fallback.
Indigo stages use a language model, each grounded in real code and each with a deterministic fallback when no key is configured. The five risk agents are deterministic except prompt injection, which uses an LLM to judge whether untrusted input truly reaches a prompt. Click any stage for detail.
Live output
A real scan of sample_mcp_server — a deliberately vulnerable MCP server that ships with the repo. Click a finding to see its evidence, attack path, and references.
Measured
Measured against 16 labeled cases with ground truth: 8 real vulnerabilities (one per risk class) and 8 negative controls — including 7 hard negatives: code that looks dangerous to pattern-matching but is actually guarded.
| Deterministic baseline | With LLM integration | |
|---|---|---|
| Precision | 0.615 | 0.700 |
| Recall | 1.000 | 0.875 |
| F1 | 0.762 | 0.778 |
| Hard-negative false alarms | 5 / 8 | 3 / 8 |
Design
A finding without a verbatim code snippet is rejected. The reporter can only phrase facts that the pipeline already established — it cannot invent findings or numbers.
The LLM reviewer re-reads the source without seeing the agent's score or reasoning, so its judgment is independent — divergence between the two is a measurable signal.
Every LLM call can fail or run keyless; the pipeline always completes on AST + regex + templates alone.
Remediation references are retrieved from a curated CWE / OWASP knowledge base per finding — not recalled from model memory.
Coming soon
git clone the repo and run python3 -m mcp_security_agent.graph.