nmap for MCP servers

Find the vulnerable MCP servers
on your network.

mcpsweep is an open-source discovery & vulnerability scanner for Model Context Protocol servers. Point it at a host or subnet; it fingerprints every endpoint — legacy initialize and the modern server/discover — enumerates tools, and flags poisoning, transport flaws, auth gaps, and known-vulnerable versions. Zero dependencies. Read-only. 100% local — no cloud, no LLM.

$ mcpsweep 10.10.0.0/24 --ports 8000-9100 --deep --auth-probe

  found http://10.10.0.31:8090/mcp/api   CRITICAL  (6 tools)
  found http://10.10.0.42:9100/mcp       CRITICAL  (4 tools)
  found http://10.10.0.17:8080/sse       HIGH      (2 tools)

[MCP] http://10.10.0.31:8090/mcp/api  CRITICAL (score 228)
    server  : vulnlab-mcp v0.6.3  proto=2026-07-28  era=modern
    ![ server/discover without credentials (no authentication)
    ![ dns-rebinding: accepts a foreign Origin/Host (browser-pivot)
    ![ cors-reflect-credentials: reflects Origin + allows credentials
    ![ known-vulnerable: matches CVE-2025-6514 (command-injection, 9.6)
    ![ 1 tool description POISONED: read-notes
    ![ hidden-characters: tool 'fetch-url' metadata contains unicode-tag-block

One scan, the whole MCP attack surface

Every check is read-only by default and runs entirely on your machine.

01Network discovery

Sweep hosts, subnets and port ranges for live MCP endpoints — including the shadow servers nobody registered.

▶Modern + legacy protocol

Fingerprints both the initialize handshake and the stateless server/discover of spec 2026-07-28. Modern-only servers that reject initialize are still found.

⇄Transport probes

DNS-rebinding, wildcard/credentialed CORS, LAN exposure (NeighborJack), and sibling-endpoint auth gaps — live checks a source scanner can't do.

☠Tool poisoning

Full-schema poisoning (param names, enums, annotations), ANSI / zero-width / Unicode TAG-block concealment, and tool shadowing across servers.

⟳Rug-pull detection

Signatures every tool; diff flags a definition that silently changed since your baseline — the MCPoison pattern.

🔑Auth & OAuth

No-auth detection, OAuth 2.1 metadata validation (RFC 9728/8414), SSRF/scheme/scope hygiene — and it refuses to fetch an internal target itself.

#Known-vulnerable versions

Matches serverInfo against a bundled, offline advisory database — no OSV/NVD calls, ever.

⌁Deep sink analysis

Classifies parameters as command-injection, SQLi, path-traversal or SSRF sinks, and spots read-only-lie annotations and argument injection.

▤Config lint

lint-config audits local mcp.json for curl|sh, unpinned npx -y, inline-eval and plaintext secrets.

text · json · markdown · SARIF · HTML CI exit-code gates baseline & drift stdio scanning --active (opt-in) verification Burp proxy support

OWASP MCP Top 10 coverage

Mapped check-by-check to the OWASP MCP Top 10 and real CVEs. Full table in CVE-COVERAGE.md.

01Token mismanagement & secret exposure
02Privilege escalation via scope creep
03Tool poisoning
04Supply chain & dependency tampering
05Command injection & execution
06Prompt injection via context
07Insufficient authN / authZ
08Lack of audit & telemetry
09Shadow MCP servers
10Context injection & over-sharing

Detects the real-world classes behind CVE-2025-6514, CVE-2025-66414/66416, CVE-2026-33032, CVE-2026-49257, CVE-2025-54136, CVE-2026-51994, CVE-2026-52870 and more.

Why mcpsweep

Other MCP scanners upload your tool metadata to a cloud, need an API key, or only read source. mcpsweep is the one that sweeps the network and keeps everything on your box.

Capabilitymcpsweepcloud scannerssource scanners
Network discovery of live + shadow servers✓——
Zero runtime dependencies✓——
100% local — no cloud, no LLM✓uploads metadatavaries
Live transport probes (DNS-rebind, CORS)✓partial—
Modern server/discover (2026-07-28)✓varies—
Read-only by default✓varies✓
SARIF → CI code-scanning✓variesvaries

Quickstart

Python 3.8+. Nothing else.

pip install mcpsweep
scan a host
mcpsweep 10.10.0.31 --ports 8090
sweep a subnet, go deep
mcpsweep 10.10.0.0/24 --ports 8000-9100 --deep --auth-probe
CI gate (SARIF)
mcpsweep … -f sarif -o mcp.sarif --fail-on high
audit a client config
mcpsweep lint-config ~/.cursor/mcp.json
catch rug-pulls
mcpsweep diff last.json now.json --fail-on-drift
route via Burp
mcpsweep … --proxy http://127.0.0.1:8080
Test it against a real target. The repo ships vulnlab — a deliberately-vulnerable MCP server with one endpoint per vulnerability class, so you can see every detection fire. python -m vulnlab, then scan 127.0.0.1:9100.
Authorized use only. Scan hosts you own or are explicitly permitted to test.