Shodan MCP 服务器
模型上下文协议 (MCP) 服务器通过标准化接口提供对 Shodan 互联网扫描功能的访问。
概述
该服务器实现了模型上下文协议 (MCP),以开放 Shodan 强大的互联网扫描和侦察功能。它提供了一个标准化接口,用于查询 Shodan 的互联网连接设备、服务和漏洞数据库。
特征
搜索功能:使用高级搜索过滤器查询 Shodan 数据库
DNS 查找:解析域名并获取详细的 DNS 信息
CVE 信息:获取有关常见漏洞和暴露的详细信息
获取漏洞:获取与 IP 地址相关的漏洞详细信息
标准化接口:使用 MCP 协议实现一致通信
环境变量支持:通过环境变量进行安全的 API 密钥管理
先决条件
Node.js(v14 或更高版本)
npm(v6 或更高版本)
Shodan API 密钥
安装
克隆存储库:
git clone https://github.com/X3r0K/Shodan-MCP-Server-Inspector.git cd shodan-mcp-server-Inspector安装依赖项:
npm install在根目录中创建一个
.env.local文件并添加您的 Shodan API 密钥:SHODAN_API_KEY=your_api_key_here
用法
启动服务器
构建服务器:
npm run build启动服务器:
node build/index.js
可用工具
搜索工具
查询:使用 Shodan 的搜索语法搜索设备和服务
例如:
log4j country:US city:Atlanta返回:匹配设备的详细信息列表
DNS查找工具
查询:要解析的域名
例如:
example.com返回:DNS记录及相关信息
CVE信息工具
查询:CVE 标识符
例如:
CVE-2021-44228返回:详细的漏洞信息
示例查询
使用 MCP 检查器
您可以使用 MCP 检查器直接与服务器交互:
安装 MCP 检查器:
使用您的服务器运行检查器:
检查器提供了一个交互式界面来:
测试所有可用的工具
查看工具文档
调试服务器响应
监控服务器状态
环境变量
SHODAN_API_KEY:您的 Shodan API 密钥(必需)PORT:服务器端口(可选,默认为 3000)LOG_LEVEL:日志记录级别(可选,默认为“info”)
错误处理
服务器实现了全面的错误处理:
无效的 API 密钥
速率限制
网络问题
无效查询
服务器错误
安全注意事项
API密钥保护:
切勿将 API 密钥提交到版本控制
使用环境变量来存储敏感数据
定期轮换 API 密钥
速率限制:
尊重 Shodan 的 API 速率限制
实施客户端速率限制
数据隐私:
从回复中过滤敏感信息
根据需要实施访问控制
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
致谢
Shodan 提供 API
MCP 规范的模型上下文协议团队
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
这是一个模型上下文协议 (MCP) 服务器,提供对 Shodan API 的访问。它允许您以编程方式向 Shodan 查询有关设备、漏洞等信息。
Related MCP Servers
- Asecurity-licenseAqualityA Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface.Last updated -8147
- Asecurity-licenseAqualityMCP 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.Last updated -79477MIT License
- -security-license-qualityMCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.Last updated -63MIT License
- -security-license-qualityA Model Context Protocol server that provides access to Shodan and VirusTotal APIs for cybersecurity analysis, enabling analysts to perform network intelligence operations including host lookups, vulnerability analysis, and threat intelligence gathering.Last updated -16