Skip to main content
Glama
X3r0K

Shodan MCP Server

by X3r0K

shodan-mcp-服务器

这是一个模型上下文协议 (MCP) 服务器,提供对 Shodan API 的访问。它允许您以编程方式向 Shodan 查询有关设备、漏洞等信息。

目录

Related MCP server: Shodan-MCP-Server

介绍

shodan-mcp-server提供了一种简单的方法,可以使用模型上下文协议 (MCP) 将 Shodan 情报集成到您的应用程序中。它提供了多种工具,允许您从 Shodan 查询各种类型的信息。

特征

主机信息:获取有关 IP 地址的详细信息 搜索:使用其搜索语法查询 Shodan 的数据库 DNS 查找:解析域名 CVE 信息:获取有关特定 CVE 漏洞的详细信息

安装

  1. 克隆存储库:

    git clone https://github.com/X3r0K/Shodan-MCP-Server.git
    cd shodan-mcp-server
  2. 安装依赖项:

    npm install
  3. 构建项目:

    npm run build

配置

  1. Shodan获取 Shodan API 密钥。

  2. 在您的 MCP 设置文件中配置 MCP 服务器(例如~/.config/mcp/settings.json ):

    {
      "mcpServers": {
        "shodan": {
          "command": "node",
          "args": ["/path/to/shodan-mcp-server/build/index.js"],
          "env": {
            "SHODAN_API_KEY": "<your_shodan_api_key>"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }

    <your_shodan_api_key>替换为您的实际 Shodan API 密钥,并将/path/to/shodan-mcp-server为 shodan-mcp-server 目录的实际路径。

与 Node.js 一起使用

您可以使用@modelcontextprotocol/sdk包将 MCP 服务器与 Node.js 一起使用。

  1. 安装 MCP SDK:

    npm install @modelcontextprotocol/sdk
  2. 使用use_mcp_tool函数调用工具:

    import { use_mcp_tool } from '@modelcontextprotocol/sdk';
    
    async function getIpInfo(ip) {
      const result = await use_mcp_tool('shodan', 'get_ip_info', { ip });
      console.log(result);
    }
    
    getIpInfo('8.8.8.8');

API 文档

获取 IP 信息

获取有关特定 IP 地址的信息。

输入:

{
  "ip": "string" // The IP address to query
}

输出:

包含有关 IP 地址信息的 JSON 对象。

dns_lookup

对给定域执行 DNS 查找。

输入:

{
  "hostname": "string" // The hostname to resolve
}

输出:

包含已解析 IP 地址的 JSON 对象。

获取漏洞

跟踪与特定 IP 地址相关的漏洞。

输入:

{
  "ip": "string" // The IP address to query for vulnerabilities
}

输出:

包含与 IP 地址相关的漏洞列表的 JSON 对象。

cve_info

检索有关特定 CVE ID 的信息。

输入:

{
  "cve": "string" // The CVE ID to query
}

输出:

包含有关 CVE ID 信息的 JSON 对象。

搜索

在 Shodan 中搜索与查询匹配的设备。

输入:

{
  "query": "string" // The search query
}

输出:

包含与查询匹配的设备列表的 JSON 对象。

项目结构

shodan-mcp-server/
├── .gitignore
├── package.json
├── README.md
├── tsconfig.json
└── src/
    ├── index.ts
    └── index.mts

执照

麻省理工学院

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    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.
    7
    295
    156
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    This 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
  • F
    license
    Not graded
    quality
    D
    maintenance
    Integrates Shodan search capabilities into MCP-compatible applications for discovering internet-connected devices. Enables domain searches, IP lookups, and advanced queries to identify exposed services, infrastructure mapping, and security analysis.
    3

View all related MCP servers

Related MCP Connectors

  • Shodan InternetDB MCP — wraps Shodan InternetDB (internetdb.shodan.io)

  • Shodan MCP — wraps the full Shodan REST API (api.shodan.io)

  • MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.

View all MCP Connectors

Latest Blog Posts

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'

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