Shodan API 服务

通过Model Context Protocol(MCP)暴露Shodan API功能的服务,提供主机信息查询、搜索、警报管理、扫描和漏洞查询等功能。

  • by daedalus
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 daedalus/mcp-shodan

使用说明

麦克普舒丹

MCP服务器暴露 肖丹 通过模型上下文协议实现API功能。

安装

pip install mcp-shodan

用法

export SHODAN_API_KEY=your_api_key
mcp-shodan

或者添加到您的MCP配置中:

{
  "mcpServers": {
    "shodan": {
      "command": "mcp-shodan",
      "env": {
        "SHODAN_API_KEY": "your_api_key"
      }
    }
  }
}

可用工具

主机信息

  • shodan_host -获取IP地址的所有可用信息

搜索

  • shodan_search -搜索Shodan数据库
  • shodan_search_cursor -搜索并返回迭代器
  • shodan_count -获取搜索结果总数
  • shodan_search_tokens -获取有关搜索查询的信息

警报

  • shodan_alerts -列出所有活动警报
  • shodan_create_alert -创建新警报
  • shodan_delete_alert -删除警报

扫描

  • shodan_scan -扫描网络
  • shodan_scan_internet -在端口上扫描互联网
  • shodan_scan_status -获取扫描状态

保存的查询

  • shodan_queries -列出共享搜索查询
  • shodan_queries_search -搜索已保存的查询
  • shodan_queries_tags -获取热门查询标签

漏洞利用

  • shodan_exploits_search -搜索Shodan漏洞档案
  • shodan_exploits_count -获取总漏洞利用计数

公用事业

  • shodan_info -获取API关键信息
  • shodan_ports -获取Shodan抓取的端口列表
  • shodan_protocols -获取支持的协议
  • shodan_services -获取服务列表

示例

# Get information about a host
shodan_host("1.1.1.1")

# Search for specific services
shodan_search("apache", limit=10)

# Count results for a query
shodan_count("nginx")

# Check your API plan
shodan_info()

mcp名称:io.github.daedalus/mcp-shodan