shodan-mcp
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 と同じゲートを実行します:
/data/snapshotsからすべての*.jsonを読み込む完全一致 → ワイルドカード → あいまいキーワード一致の順で確認
eligible_for_bountyかつeligible_for_submissionであることを確認いずれかが偽の場合はブロック — 上書き不可
クイックスタート
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_HERE を https://account.shodan.io で取得したキーに置き換えてください。
MCPツール
shodan_host
ターゲットを解決し、IPアドレスと完全なShodanホストレポートを取得します。
パラメータ | 型 | デフォルト | 説明 |
| string | — | ドメイン、URL、またはあいまいな名前 |
| bool |
| 生のサービスバナー(最初の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_search
Shodanの hostname: インデックスを検索します。古いインフラやシャドウインフラを含む、そのホスト名を使用したことのあるすべてのIPレコードを検索します。
パラメータ | 型 | デフォルト | 説明 |
| str | — | ドメイン、URL、またはキーワード |
| int |
| 最大ホスト数 (上限: 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レコードが含まれます。
パラメータ | 型 | 説明 |
| 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プランに関する注意点
プラン |
|
|
|
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まで、ダミーターゲットに対してパケットは一切送信されません。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Defensive Shodan search and host intelligence MCP using customer-provided SHODAN_API_KEY for
Unofficial Shodan InternetDB MCP — wraps Shodan InternetDB (internetdb.shodan.io)
Unofficial Shodan MCP — wraps the full Shodan REST API (api.shodan.io)
MCP server for the Vulners.com API
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP 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.7192MIT
- FlicenseNot gradedqualityDmaintenanceA 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-
- FlicenseNot gradedqualityDmaintenanceThis 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-
- AlicenseBqualityDmaintenanceMCP server that exposes Shodan API for host information, search, alerts, scanning, and exploit data.2074 PyPI1MIT