mcpsweep
A small, dependency-free discovery and fingerprinting scanner for MCP-over-HTTP
servers. It finds Model Context Protocol endpoints on a host or network,
performs the JSON-RPC initialize handshake to fingerprint each one, enumerates
its tools / resources / prompts, and flags risky or poisoned tools.
It is strictly read-only — it performs the handshake and */list calls only,
and never invokes a tool (tools/call).
Authorized use only. Scan hosts you own or are explicitly permitted to test.
Why
MCP servers are easy to spin up and often ship with no authentication, over-broad
tools (arbitrary SQL, shell, money movement), or instructions hidden inside a
tool's description (tool poisoning). mcpsweep helps you inventory that surface
— including shadow servers nobody registered — and see the risk at a glance.
Install
pip install mcpsweep
Or from source:
git clone https://github.com/krishnareddypadala/mcpsweep && cd mcpsweep
pip install .
Usage
# scan one host on a known port
mcpsweep 10.10.0.31 --ports 8090
# route everything through Burp for inspection
mcpsweep 10.10.0.31 --ports 8090 --proxy http://127.0.0.1:8080
# sweep a subnet and a port range, also list resources/prompts
mcpsweep 10.10.0.0/28 --ports 8000-9100 --full
# machine-readable output
mcpsweep 10.10.0.31 --ports 8090 --format json -o report.json
mcpsweep 10.10.0.31 --ports 8090 --format md -o report.md
Key options
| Flag | Purpose |
|---|---|
--ports |
ports/ranges, e.g. 8090,8000,9000-9010 |
--paths |
URL paths to probe (defaults cover /mcp, /mcp/api, /sse, …) |
--scheme |
http, https, or both |
--proxy |
send all traffic via a proxy (e.g. Burp on 127.0.0.1:8080) |
--insecure/-k |
skip TLS verification |
--full |
also enumerate resources/list and prompts/list |
--format/-f |
text (default), json, md |
--concurrency/-c |
parallel probes (default 16) |
Exit code is 0 when at least one endpoint is found, 1 otherwise.
Windows / Git Bash note: Git Bash (MSYS) rewrites arguments that look like Unix paths, so
--paths /mcp/apibecomes a Windows path before the tool sees it. Either omit--paths(the built-in defaults are unaffected), prefix the command withMSYS_NO_PATHCONV=1, or run from PowerShell /cmd.
What it detects
- Live MCP endpoints across many candidate paths/ports, via the
initializehandshake (Streamable-HTTP and SSE-framed responses). - Server fingerprint: name, version, protocol, capabilities, instructions.
- No authentication:
initializethat succeeds with no credentials. - Auth-gated endpoints:
401/403with an MCP/WWW-Authenticatesignature. - Risky tools: name/description heuristics tag
rce,sql,money,destructive,write,secret,pii,filesystem, … - Tool poisoning: descriptions containing hidden instructions to the model ("ignore previous instructions", "silently", "password_hash", …).
A per-endpoint risk score rolls these up into low / medium / high / critical.
Library use
from mcpsweep import scan
for ep in scan(["10.10.0.31"], ports=[8090], proxy="http://127.0.0.1:8080"):
print(ep.url, ep.server_name, ep.risk_level)
for t in ep.tools:
print(" ", t.name, t.tags, "POISONED" if t.poisoned else "")
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcpsweep-0.1.0.tar.gz.
File metadata
- Download URL: mcpsweep-0.1.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a02bdd5e3aa2afcd2dc18d563fc268b9b1d3825c7e187ecb6790f11560b02c76
|
|
| MD5 |
bb622777bfef3f4da6ee2a5056e1f922
|
|
| BLAKE2b-256 |
a2119031ff00fe465528c711aad712ecb1cc2685995642fd6210a59bb0ccf99e
|
File details
Details for the file mcpsweep-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcpsweep-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d7c52ef6d77f11ee421ed2eb553131d60ef797d84e79331090fd45b3d81852a
|
|
| MD5 |
c662fe1cd4339fbe868bf2596a35d51a
|
|
| BLAKE2b-256 |
cba89d50f73a76984c0fa319bdecf31d9800eff959b5825164789c0306dcd7a7
|