
Shodan
io.github.BurtTheCoder由 GitHub 账号 BurtTheCoder 发布v1.0.22更新于 Oct 24, 2026
MCP server for Shodan API — device search, IP lookup, DNS, and CVE/CPE queries.
概览
该 MCP 服务器让 AI 助手以只读方式访问 Shodan 与 Shodan CVEDB,用于主机侦察、设备搜索、DNS 与漏洞查询。
- 可以做什么
- 查询单个 IPv4 或 IPv6 主机:开放端口、产品、CVE、TLS 证书、位置与云信息,可选返回 banner 历史,并查看套餐剩余额度和可用的搜索过滤器与分面。按 Shodan 查询语法搜索设备,支持分页与分面统计,或仅获取匹配数量与分面。解析 DNS:域名的子域名与记录,以及批量正向和反向解析。查询 CVEDB:CVE 详情含 CVSS、EPSS 与 KEV,按产品名查 CPE 标识,以及按产品或 CPE 查 CVE 并按 EPSS 排序。
- 适用场景
- 适合在安全研究或排查中需要评估某主机或域名暴露面、估算或执行 Shodan 设备搜索,或获取某个 CVE 或产品的漏洞严重性与利用情况时使用。
- 运行要求
- 通过 npm 包以 stdio 在本地运行,需要 Node.js 20 或更高版本。需要自备 Shodan API 密钥,通过环境变量 SHODAN_API_KEY 提供,并需能访问 Shodan 的网络。可选的 HTTP 流式模式由 MCP_TRANSPORT、MCP_HOST、MCP_PORT 和 MCP_ENDPOINT 配置。
安装
在 SourceWeft 中
- 打开 控制台中的 Shodan,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[npm version] [CI] [License: MIT] [Node 20 or newer] [MCP Registry] [Smithery]
Quickstart · Tools · HTTP · Security · Troubleshooting · Docs
mcp-shodan is an MCP server that gives AI agents access to the Shodan API and Shodan CVEDB. Hand your agent an IP, hostname, search query, product or CVE and get back what an analyst would look at: open ports and banners, TLS certificates, DNS, and vulnerability severity with EPSS and KEV status.
[!NOTE] Independent project, not affiliated with Shodan. You need your own Shodan API key.
Highlights
- Host reconnaissance. Open ports, products and versions, known CVEs, TLS certificate details (fingerprint, JARM, JA3S), cloud provider and banner history for any IPv4 or IPv6 address.
- Device search. Shodan query syntax with paging and facet breakdowns (country, org, port, vuln and more), plus a free count-only mode for sizing a query.
- Vulnerability intelligence. CVE details with CVSS v4/v3/v2, EPSS and KEV; CVEs by product or CPE, sortable by EPSS. CVEDB is free and doesn't spend query credits.
- DNS. Subdomains and DNS records for a domain, and forward and reverse lookups for many names or IPs in one call.
- Credit-aware. Free tools are marked as free, and
api_infoshows the credits left on your plan. - Two transports. stdio for desktop clients, HTTP streaming for a shared service.
- Tested. Unit tests with a mocked Shodan API run in CI on Node 20, 22 and 24.
How it works
Quickstart
Requirements: Node.js 20 or newer and a Shodan API key.
For Claude Desktop, VS Code, Smithery and running from source, see Connect a client.
Then ask your agent: "What is exposed on 8.8.8.8, and is CVE-2021-44228 in the KEV catalog?" More prompts are in example workflows.
Tools
Eleven read-only tools. Full parameters are in the tool reference.
[!TIP] Credits: filtered
shodan_searchqueries cost one query credit (plus one per extra page) anddomain_infocosts one per call.shodan_count,ip_lookup,dns_lookup,reverse_dns_lookup,search_filters,api_infoand the CVEDB tools are free.
HTTP streaming transport
stdio is the default. Set MCP_TRANSPORT=httpStream to run a standalone HTTP service:
A health check is served at /health.
Environment variables
Security
[!WARNING] The HTTP transport has no authentication. Keep the port on localhost or behind an authenticating reverse proxy, or anyone who can reach it can spend your query credits.
- Tool arguments are validated with zod schemas before any request is built. IPs must be valid IPv4 or IPv6, domains valid hostnames, facets
name[:count]lists, and CVE IDs must matchCVE-YYYY-NNNN. - The API key is read from the environment and sent only to
api.shodan.io. CVEDB calls carry no key. - What you look up is sent to Shodan.
Report vulnerabilities privately; see SECURITY.md.
Troubleshooting
- 401 / invalid key: check for spaces or quotes around the key, then restart the client.
curl "https://api.shodan.io/api-info?key=$SHODAN_API_KEY"shows your plan and credits. - 403 on
shodan_search: search filters need a membership or paid API plan. Runapi_infoto see your plan and credits. - 429: Shodan allows about one request per second. Retry after a moment.
More in the troubleshooting guide.
Development
See CONTRIBUTING.md and the changelog.
License
MIT. See LICENSE.
来源:README.md,提交 08bf8ee
工具
0版本历史
1- v1.0.22最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分