Skip to main content
Glama

shodan-mcp

Shodanを活用したパッシブ偵察用MCPサーバー。 nuclei-mcp と同様のゲート機能により、HackerOneのスナップショットに基づいてスコープを制限します。

パッシブのみ — Shodanのクエリはターゲットに対してパケットを送信しません。 すべてのデータは、Shodanが事前に収集したインターネット全体のインデックスから取得されます。


アーキテクチャ

Claude/copilot (AI agent)
    │
    │  MCP (stdio)
    ▼
shodan-mcp container
    ├── reads scope ──► /data/snapshots/*.json  ◄─── h1-scope-watcher
    └── queries     ──► api.shodan.io  (passive, no target contact)

Related MCP server: Shodan MCP Server

スコープゲート

すべてのツールは nuclei-mcp と同じゲートを実行します:

  1. /data/snapshots からすべての *.json を読み込む

  2. 完全一致 → ワイルドカード → あいまいキーワード一致の順で確認

  3. eligible_for_bounty かつ eligible_for_submission であることを確認

  4. いずれかが偽の場合はブロック — 上書き不可

H1-Scope-Watcher


クイックスタート

1. ビルド

cd shodan-mcp
docker build -t shodan-mcp .

2. Claude/CopilotのMCP設定に追加

{
  "mcpServers": {
    "h1-scope-watcher": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "D:/projects/H1-Scope-Watcher/snapshots:/data/snapshots",
        "-e", "SNAPSHOTS_DIR=/data/snapshots",
        "mcp/h1-scope"
      ]
    },
    "shodan-mcp": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "D:/projects/H1-Scope-Watcher/snapshots:/data/snapshots",
        "-e", "SNAPSHOTS_DIR=/data/snapshots",
        "-e", "SHODAN_API_KEY=YOUR_KEY_HERE",
        "shodan-mcp"
      ]
    }
  }
}

YOUR_KEY_HEREhttps://account.shodan.io で取得したキーに置き換えてください。


MCPツール

shodan_host

ターゲットを解決し、IPアドレスと完全なShodanホストレポートを取得します。

パラメータ

デフォルト

説明

target

string

ドメイン、URL、またはあいまいな名前

show_banners

bool

false

生のサービスバナー(最初の3行)を含める

IPごとに取得できる情報:

  • オープンポート + トランスポートプロトコル

  • サービス / 製品 / バージョンのフィンガープリント

  • CPE識別子

  • CVSSスコアと概要を含むCVEリスト

  • ASN、ISP、組織、地理情報、OS

  • Shodanタグ (例: cloud, self-signed, vpn)

プロンプト例:

  • "Run shodan on dummy-target"

  • "What ports does api.tile.com expose on Shodan?"

  • "Check shodan for production.tile-api.com with banners"


Shodanの hostname: インデックスを検索します。古いインフラやシャドウインフラを含む、そのホスト名を使用したことのあるすべてのIPレコードを検索します。

パラメータ

デフォルト

説明

target

str

ドメイン、URL、またはキーワード

max_results

int

5

最大ホスト数 (上限: 20)

プロンプト例:

  • "Search Shodan for dummy-target — show me 10 results"

  • "Any forgotten infrastructure for tile.com on Shodan?"


shodan_dns

Shodanの パッシブDNS レコードを取得します。ルートドメインに対してShodanが観測したすべてのサブドメイン、A/CNAME/MX/TXTレコードが含まれます。

パラメータ

説明

target

str

ドメインまたはキーワード

プロンプト例:

  • "What subdomains does Shodan know about for dummy-target?"

  • "Show me Shodan DNS records for tile.com"


check_scope

API呼び出しを行わずにスコープゲートをプレビューします。


list_programs

バウンティ対象資格ごとにグループ化されたすべてのH1スコープアセットを一覧表示します。


Shodanプランに関する注意点

プラン

shodan_host

shodan_search

shodan_dns

Free

✅ (制限あり)

Membership

API (有料)

shodan_dns には有料のShodanプランが必要です。 サーバーは起動時にキーとプランを検証し、結果をログに出力します。


チェーンワークフローの例

You: "Full passive recon on dummy-target"

Claude/Copilot:
  1. check_scope("dummy-target")
    → ✅ api.dummy-target.com, api-cloudfront.dummy-target.com

  2. shodan_dns("dummy-target")
    → 14 subdomains discovered passively

  3. shodan_host("api.dummy-target.com")
    → Port 443 (nginx 1.18), Port 8443 (unknown)
    → CVE-2021-23017 CVSS 7.7 (nginx)

  4. shodan_search("dummy-target", max_results=10)
    → 3 IPs, one on non-standard port 9200 (Elasticsearch!)

  5. nuclei_scan("api.dummy-target.com")
    → Confirms Elasticsearch exposure

ステップ5まで、ダミーターゲットに対してパケットは一切送信されません。

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    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
    520 npm
    171
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A WebSocket server that provides MCP interface for searching and retrieving information about internet-connected devices, IP addresses, DNS data, and CVE vulnerabilities through the Shodan API.
    3
    -
  • 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
    -