Skip to main content
Glama

Shodan-MCP-Server

Shodan MCP 服务器

模型上下文协议 (MCP) 服务器通过标准化接口提供对 Shodan 互联网扫描功能的访问。

概述

该服务器实现了模型上下文协议 (MCP),以开放 Shodan 强大的互联网扫描和侦察功能。它提供了一个标准化接口,用于查询 Shodan 的互联网连接设备、服务和漏洞数据库。

特征

  • 搜索功能:使用高级搜索过滤器查询 Shodan 数据库
  • DNS 查找:解析域名并获取详细的 DNS 信息
  • CVE 信息:获取有关常见漏洞和暴露的详细信息
  • 获取漏洞:获取与 IP 地址相关的漏洞详细信息
  • 标准化接口:使用 MCP 协议实现一致通信
  • 环境变量支持:通过环境变量进行安全的 API 密钥管理

先决条件

  • Node.js(v14 或更高版本)
  • npm(v6 或更高版本)
  • Shodan API 密钥

安装

  1. 克隆存储库:
    git clone https://github.com/X3r0K/Shodan-MCP-Server-Inspector.git cd shodan-mcp-server-Inspector
  2. 安装依赖项:
    npm install
  3. 在根目录中创建一个.env.local文件并添加您的 Shodan API 密钥:
    SHODAN_API_KEY=your_api_key_here

用法

启动服务器

  1. 构建服务器:
    npm run build
  2. 启动服务器:
    node build/index.js

可用工具

  1. 搜索工具
    • 查询:使用 Shodan 的搜索语法搜索设备和服务
    • 例如: log4j country:US city:Atlanta
    • 返回:匹配设备的详细信息列表
  2. DNS查找工具
    • 查询:要解析的域名
    • 例如: example.com
    • 返回:DNS记录及相关信息
  3. CVE信息工具
    • 查询:CVE 标识符
    • 例如: CVE-2021-44228
    • 返回:详细的漏洞信息

示例查询

// Search for Log4j vulnerable systems in the US { "query": "log4j country:US" } // DNS lookup for a domain { "query": "example.com" } // Get CVE information { "query": "CVE-2021-44228" }

使用 MCP 检查器

图像

您可以使用 MCP 检查器直接与服务器交互:

  1. 安装 MCP 检查器:
npm install -g @modelcontextprotocol/inspector
  1. 使用您的服务器运行检查器:
npx @modelcontextprotocol/inspector build/index.js

检查器提供了一个交互式界面来:

  • 测试所有可用的工具
  • 查看工具文档
  • 调试服务器响应
  • 监控服务器状态

环境变量

  • SHODAN_API_KEY :您的 Shodan API 密钥(必需)
  • PORT :服务器端口(可选,默认为 3000)
  • LOG_LEVEL :日志记录级别(可选,默认为“info”)

错误处理

服务器实现了全面的错误处理:

  • 无效的 API 密钥
  • 速率限制
  • 网络问题
  • 无效查询
  • 服务器错误

安全注意事项

  1. API密钥保护:
    • 切勿将 API 密钥提交到版本控制
    • 使用环境变量来存储敏感数据
    • 定期轮换 API 密钥
  2. 速率限制:
    • 尊重 Shodan 的 API 速率限制
    • 实施客户端速率限制
  3. 数据隐私:
    • 从回复中过滤敏感信息
    • 根据需要实施访问控制

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

致谢

  • Shodan 提供 API
  • MCP 规范的模型上下文协议团队
-
security - not tested
F
license - not found
-
quality - not tested

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 查询有关设备、漏洞等信息。

  1. 概述
    1. 特征
      1. 先决条件
        1. 安装
          1. 用法
            1. 启动服务器
            2. 可用工具
            3. 示例查询
            4. 使用 MCP 检查器
          2. 环境变量
            1. 错误处理
              1. 安全注意事项
                1. 执照
                  1. 致谢

                    Related MCP Servers

                    • -
                      security
                      A
                      license
                      -
                      quality
                      MCP 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 -
                      7
                      663
                      18
                      JavaScript
                      MIT License
                      • Apple
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol (MCP) server that provides tools for searching and fetching information from Hacker News.
                      Last updated -
                      4
                      6
                      Python
                      MIT License
                      • Apple
                    • -
                      security
                      F
                      license
                      -
                      quality
                      A 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 -
                      1
                      TypeScript
                    • A
                      security
                      A
                      license
                      A
                      quality
                      Provides access to Shodan API functionality, enabling AI assistants to query information about internet-connected devices for cybersecurity research and threat intelligence.
                      Last updated -
                      5
                      1
                      JavaScript
                      MIT License
                      • Linux
                      • Apple

                    View all related MCP servers

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/X3r0K/Shodan-MCP-Server-Inspector'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server