blindspot-mcp
# blindspot-mcp
**Adversarial web-security QA tools for coding agents.** An [MCP](https://modelcontextprotocol.io) server that lets Claude, Cursor, pi or any MCP client verify the HTTP surface of the app it just built — before anyone ships it.
## The problem
AI agents assemble web apps in minutes, but nobody checks how those apps *behave under adversarial requests*. Linters only see code; classic scanners (ZAP, Burp) are built for pentesters, not for "I just generated this with an agent — is it decent?"; and the LLM itself cannot send hostile requests unless you give it tools. That is the blind spot.
## Tools
| Tool | Catches | Typical defect |
|---|---|---|
| `check_404_neutrality` | Existence oracles | 404 body differs for foreign / nonexistent / malformed ids → resource enumeration |
| `check_sequential_ids` | Guessable ids | `/items/1`, `/2`, `/3` answer 200 with distinct bodies → whole collection walkable |
| `check_security_headers` | Missing hardening | No CSP, no `nosniff`, no `Referrer-Policy` |
| `check_csrf_origin_guard` | Missing CSRF guard | POST without (or with foreign) `Origin` is processed |
| `check_session_cookies` | Weak session cookies | No `HttpOnly` / `SameSite` |
| `check_inline_content` | Inline everything | `style=`, inline `<script>`, `onclick=` → forces `unsafe-inline` CSP |
Every tool returns a JSON report: `ok`, the evidence it collected, and a `finding` explaining the risk in plain words. Probes are read-only: GETs and empty POSTs.
## Install and run
```bash
git clone https://github.com/Dibaledesma/blindspot-mcp
cd blindspot-mcp
uv sync && uv run python -m blindspot.server # stdio MCP server
```
Add it to your MCP client config (Claude Desktop / Cursor / pi):
```json
{
"mcpServers": {
"blindspot": {
"command": "uv",
"args": ["--directory", "/path/to/blindspot-mcp", "run", "python", "-m", "blindspot.server"]
}
}
}
```
Docker variant:
```bash
docker build -t blindspot-mcp .
docker run -i --rm blindspot-mcp
```
Then just ask your agent: *"Run the blindspot checks against http://127.0.0.1:5000 and fix what they flag."*
## Development
```bash
uv sync
uv run ruff check .
uv run pytest -q # adversarial suite: hardened app passes, weak app fails
```
The test suite builds three throwaway Flask apps — one hardened, one deliberately weak, one with guessable sequential ids — and proves every check passes on the first and flags the others.
A real hardened app to run the tools against: [notevault](https://github.com/Dibaledesma/notevault) — all six checks pass on it.
## Ethics
Read-only probes against applications **you own or are explicitly authorized to test**. This is a QA tool, not an attack tool.
## License
MIT — see [LICENSE](LICENSE).
TDQS
Scored across 6 tools
Each tool targets a distinct security check (404 oracle, sequential IDs, headers, CSRF, cookies, inline content), with clear descriptions. However, check_404_neutrality and check_sequential_ids both probe resource enumeration and could be confused by an agent deciding which to run.
All six tools follow a uniform check_<subject> snake_case pattern with descriptive, predictable subjects. No mixed conventions or vague verbs.
Six focused probes is well-scoped for a security-scanning server; each tool earns its place without redundancy. The set stays comfortably within the ideal 3-15 range.
The surface covers a coherent slice of web hardening checks but has notable gaps for a security posture scanner: no authorization/IDOR probe beyond enumeration, no injection or open-redirect checks, and no rate-limiting or sensitive-data-exposure checks. Agents would hit dead ends when assessing those areas.