shodan-mcp
shodan-mcp
由 Shodan 提供支持的被动侦察 MCP 服务器。
受您的 HackerOne 快照范围限制 — 与 nuclei-mcp 的限制机制相同。
仅限被动 — Shodan 查询绝不会向您的目标发送数据包。 所有数据均来自 Shodan 现有的全网扫描索引。
架构
Claude/copilot (AI agent)
│
│ MCP (stdio)
▼
shodan-mcp container
├── reads scope ──► /data/snapshots/*.json ◄─── h1-scope-watcher
└── queries ──► api.shodan.io (passive, no target contact)Related MCP server: Shodan MCP Server
范围限制 (Scope Gate)
每个工具都运行与 nuclei-mcp 相同的限制机制:
从
/data/snapshots加载所有*.json文件精确匹配 → 通配符匹配 → 模糊关键字匹配
检查
eligible_for_bounty(是否有赏金)和eligible_for_submission(是否可提交)阻止:如果两者中任何一个为 false — 不可覆盖
快速入门
1. 构建
cd shodan-mcp
docker build -t shodan-mcp .2. 添加到 Claude/Copilot MCP 配置
{
"mcpServers": {
"h1-scope-watcher": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "D:/projects/H1-Scope-Watcher/snapshots:/data/snapshots",
"-e", "SNAPSHOTS_DIR=/data/snapshots",
"mcp/h1-scope"
]
},
"shodan-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "D:/projects/H1-Scope-Watcher/snapshots:/data/snapshots",
"-e", "SNAPSHOTS_DIR=/data/snapshots",
"-e", "SHODAN_API_KEY=YOUR_KEY_HERE",
"shodan-mcp"
]
}
}
}将 YOUR_KEY_HERE 替换为您从 https://account.shodan.io 获取的密钥
MCP 工具
shodan_host
解析目标 → IP 地址 → 完整的 Shodan 主机报告。
参数 | 类型 | 默认值 | 描述 |
| string | — | 域名、URL 或模糊名称 |
| bool |
| 包含原始服务横幅(前 3 行) |
每个 IP 您将获得:
开放端口 + 传输协议
服务 / 产品 / 版本指纹
CPE 标识符
包含 CVSS 评分和摘要的 CVE 列表
ASN、ISP、组织、地理位置、操作系统
Shodan 标签(例如
cloud、self-signed、vpn)
示例提示词:
"Run shodan on dummy-target"
"What ports does api.tile.com expose on Shodan?"
"Check shodan for production.tile-api.com with banners"
shodan_search
搜索 Shodan 的 hostname: 索引 — 查找所有曾经使用过该主机名的 IP 记录,包括旧的/影子基础设施。
参数 | 类型 | 默认值 | 描述 |
| str | — | 域名、URL 或关键字 |
| int |
| 最大主机数(上限:20) |
示例提示词:
"Search Shodan for dummy-target — show me 10 results"
"Any forgotten infrastructure for tile.com on Shodan?"
shodan_dns
获取 Shodan 的 被动 DNS 记录 — Shodan 观察到的根域名的所有子域名、A/CNAME/MX/TXT 记录。
参数 | 类型 | 描述 |
| str | 域名或关键字 |
示例提示词:
"What subdomains does Shodan know about for dummy-target?"
"Show me Shodan DNS records for tile.com"
check_scope
预览范围限制,不进行任何 API 调用。
list_programs
列出所有按赏金资格分组的 H1 范围资产。
Shodan 计划说明
计划 |
|
|
|
免费版 | ✅ | ✅ (受限) | ❌ |
会员版 | ✅ | ✅ | ✅ |
API (付费) | ✅ | ✅ | ✅ |
shodan_dns 需要付费的 Shodan 计划。
服务器会在启动时验证您的密钥和计划,并记录结果。
链式工作流示例
You: "Full passive recon on dummy-target"
Claude/Copilot:
1. check_scope("dummy-target")
→ ✅ api.dummy-target.com, api-cloudfront.dummy-target.com
2. shodan_dns("dummy-target")
→ 14 subdomains discovered passively
3. shodan_host("api.dummy-target.com")
→ Port 443 (nginx 1.18), Port 8443 (unknown)
→ CVE-2021-23017 CVSS 7.7 (nginx)
4. shodan_search("dummy-target", max_results=10)
→ 3 IPs, one on non-standard port 9200 (Elasticsearch!)
5. nuclei_scan("api.dummy-target.com")
→ Confirms Elasticsearch exposure在第 5 步之前,不会向虚拟目标发送任何数据包。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Defensive Shodan search and host intelligence MCP using customer-provided SHODAN_API_KEY for
Unofficial Shodan InternetDB MCP — wraps Shodan InternetDB (internetdb.shodan.io)
Unofficial Shodan MCP — wraps the full Shodan REST API (api.shodan.io)
MCP server for the Vulners.com API
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for querying the Shodan API and Shodan CVEDB. This server provides tools for IP lookups, device searches, DNS lookups, vulnerability queries, CPE lookups, and more.7193MIT
- FlicenseNot gradedqualityDmaintenanceA WebSocket server that provides MCP interface for searching and retrieving information about internet-connected devices, IP addresses, DNS data, and CVE vulnerabilities through the Shodan API.3-
- FlicenseNot gradedqualityDmaintenanceThis is a Model Context Protocol (MCP) server that provides access to the Shodan API. It allows you to programmatically query Shodan for information about devices, vulnerabilities, and more.2-
- AlicenseBqualityDmaintenanceMCP server that exposes Shodan API for host information, search, alerts, scanning, and exploit data.20175 PyPI1MIT