passive-subdomain-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@passive-subdomain-mcp collect all subdomains of example.com from passive sources"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
passive-subdomain-mcp
免 Key、零目标触碰的被动子域名收集 MCP Server。
把 13 个免费公开数据源(证书透明度、被动 DNS、网页存档、情报聚合)打包成一个极简 stdio MCP 服务,让 AI Agent 在授权侦察的第一步就能直接拿到干净的子域名和来源账本。
为什么做这个工具(核心优势)
真免 Key,开箱即用:不依赖 FOFA / Shodan / VirusTotal / GitHub Token,装好就能直接给 Claude Desktop、Cursor、Antigravity、Codex 调用。
零目标触碰(严格被动):所有请求都是发往第三方数据集的 HTTPS GET——不解析目标 DNS、不扫端口、不发包探测目标 Web,适合前期纯情报梳理。
极简单依赖,不拉全家桶:运行时只依赖
httpx,连官方mcpSDK 都不强制拉取(标准库 ~200 行实现完整 MCP stdio JSON-RPC 2.0),也不需要 MongoDB / Redis。失败不装瞎,单源不连坐:大多数脚本遇到某个免费源 503 或超时就直接跳过或当成“没子域名”。这里把
success/empty/failed/skipped分开记账;某个源连续挂掉只熔断它自己,后面还活着的源照常跑。不被本机代理坑:默认
trust_env=False直连,防止本地代理变量把不通或超时返回成假状态;需要走代理时通过PASSIVE_SUBDOMAIN_MCP_TRUST_ENV=1显式打开。每条结果可溯源:返回去重后的
subdomains的同时,附带provenance(每个子域名具体是从哪几个源捞出来的)和各源耗时/状态明细。
中文说明
功能
工具 | 作用 |
| 列出全部 13 个免 Key 源、默认超时、权重与端点(不联网)。 |
| 对根域执行被动子域收集,返回 |
13 个免 Key 数据源
源 | 类型 | 默认超时 | 权重 | 端点(示意) |
| 证书透明度 | 20s | 3 |
|
| 证书透明度 | 20s | 3 |
|
| 被动子域 API | 15s | 2 |
|
| Hostsearch CSV | 20s | 2 |
|
| 被动 DNS 页面 | 20s | 2 |
|
| 被动 DNS(NDJSON) | 20s | 2 |
|
| AlienVault OTX | 20s | 2 |
|
| urlscan.io 搜索 | 20s | 2 |
|
| Wayback CDX | 20s | 1 |
|
| CommonCrawl 索引 | 20s | 1 |
|
| 免费子域 API | 15s | 2 |
|
| MySSL 证书/子域 | 20s | 2 |
|
| 情报 URL 聚合 | 20s | 2 |
|
权重只是置信度提示(证书类 > 被动 DNS > 网页抓取),不会丢弃低权重结果。 单源超时硬上限 20 秒;
timeout_s可覆盖但同样被限制在 1–20 秒。
安装
# 推荐:隔离安装并得到 console script
pipx install .
# 或 uv
uv tool install .
# 或开发模式
python -m venv .venv && .venv/bin/pip install -e .不安装也可直接从源码运行(仅需当前环境有 httpx):
PYTHONPATH=src python -m passive_subdomain_mcp客户端配置
无参数启动即为 MCP stdio 服务器。以下四种客户端都使用同样方式的
command + args;若已 pipx install,可把 command 直接写成
passive-subdomain-mcp 并省略 args。
Claude Desktop — claude_desktop_config.json
(macOS:~/Library/Application Support/Claude/,Windows:%APPDATA%\Claude\):
{
"mcpServers": {
"passive-subdomain": {
"command": "python",
"args": ["-m", "passive_subdomain_mcp"]
}
}
}Cursor — 项目内 .cursor/mcp.json 或全局 ~/.cursor/mcp.json:
{
"mcpServers": {
"passive-subdomain": {
"command": "passive-subdomain-mcp"
}
}
}Antigravity — ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"passive-subdomain": {
"command": "python",
"args": ["-m", "passive_subdomain_mcp"]
}
}
}Codex — ~/.codex/config.toml:
[mcp_servers.passive_subdomain]
command = "python"
args = ["-m", "passive_subdomain_mcp"]若
python不在客户端的环境变量PATH中,请填绝对路径 (如"/Users/me/.local/share/pipx/venvs/passive-subdomain-mcp/bin/python")。 修改配置后重启客户端;首次调用前请确认客户端已信任该 MCP server。
命令行用法
# 列出 13 个源
passive-subdomain-mcp --list-sources
# 单次收集(人读)
passive-subdomain-mcp --domain example.com --sources crtsh,wayback,otx --limit 200
# 只测某个源、缩短超时、关闭限速间隔(快速排障)
passive-subdomain-mcp --domain example.com --sources crtsh --timeout-s 10 --interval-s 0
# 显式走系统代理(默认直连)
PASSIVE_SUBDOMAIN_MCP_TRUST_ENV=1 passive-subdomain-mcp --domain example.com返回结构
{
"domain": "example.com",
"subdomains": ["api.example.com", "www.example.com"],
"count": 2,
"total_found": 2,
"truncated": false,
"sources_status": [
{"source": "crtsh", "status": "success", "reason": "", "count": 2,
"timeout_s": 20, "duration_ms": 812},
{"source": "wayback", "status": "failed", "reason": "http 503", "count": 0,
"timeout_s": 20, "duration_ms": 190}
],
"provenance": {
"api.example.com": ["crtsh"],
"www.example.com": ["crtsh", "wayback"]
}
}status:success/empty/failed/skipped(该源自己的熔断已打开)。failed一定代表请求层失败,不会被伪装成empty。provenance是「子域 → 命中它的源」多源合并结果。只保留查询根域及其子域(后缀匹配,杜绝越界污染);
limit默认 1000,0表示不截断,截断时truncated=true且total_found保留真实总数。
安全与合规声明
本工具只做第三方被动查询:CT 日志、被动 DNS、网页存档/索引。
绝不对目标域做主动 DNS 解析、端口扫描、路径爆破或 Web 探测。
不做任何写操作,不创建项目/任务,不需要也不接受任何 API Key。
被动数据可能过期、缺失或含误报;结果需结合授权范围人工复核。
请仅对你已获授权的资产使用;使用者需自行遵守当地法律与第三方站点条款。
开发与测试
cd standalone/passive-subdomain-mcp
python -m pytest -q测试覆盖:13 源解析、404/5xx → failed、成功空结果 → empty、前 3 源失败第 4
源照常执行、逐源熔断不连坐、域名归一化/去重/scope 过滤、trust_env=False、
MCP initialize / tools/list / tools/call 的真实 stdio 子进程往返,以及
「零主仓库依赖」的导入/路径扫描。
Related MCP server: NEL VEIL MCP
English
What it is
A standalone MCP stdio server that exposes 13 key-free passive subdomain
sources. It speaks JSON-RPC 2.0 over newline-delimited stdio using only the
Python standard library, and depends on httpx at runtime — no mcp SDK, no
database, no broker, no code from any other project.
Tools
passive_subdomain_list_sources()— catalogue of the 13 sources (offline).passive_subdomain_collect(domain, sources?, timeout_s?, interval_s?, limit?)— returns{domain, subdomains, count, total_found, truncated, sources_status, provenance}.
Sources
crtsh, certspotter, anubis, hackertarget, rapiddns, robtex, otx,
urlscan, wayback, commoncrawl, subdomaincenter, myssl, hudsonrock — all HTTPS GET against
third-party datasets, each with its own timeout (1–20 s), rate-limit slot and
per-source circuit breaker.
Install & configure
pipx install . # or: uv tool install .MCP client entries (mcpServers for Claude Desktop / Cursor / Antigravity,
mcp_servers in ~/.codex/config.toml for Codex):
{
"mcpServers": {
"passive-subdomain": {
"command": "python",
"args": ["-m", "passive_subdomain_mcp"]
}
}
}# ~/.codex/config.toml
[mcp_servers.passive_subdomain]
command = "python"
args = ["-m", "passive_subdomain_mcp"]Run from a checkout without installing:
PYTHONPATH=src python -m passive_subdomain_mcpOne-shot CLI:
passive-subdomain-mcp --list-sources
passive-subdomain-mcp --domain example.com --sources crtsh,wayback --limit 200Failure semantics
failed— network error, non-200 response, or malformed provider payload.empty— the provider answered successfully with zero hostnames.skipped— that source's own consecutive-failure breaker is open; other sources keep running.A source is never retried inside one run, and failures are never silently converted into
empty.
Network policy
Requests use trust_env=False by default, so host HTTP(S)_PROXY /
NO_PROXY settings cannot reroute traffic. Opt in explicitly with
PASSIVE_SUBDOMAIN_MCP_TRUST_ENV=1 or --trust-env.
Safety
Passive, third-party data only. No DNS resolution, port scanning, path brute-forcing, or web probing against the queried domain. Use only against assets you are authorized to investigate. Results may be stale or contain false positives and should be reviewed by a human.
Development
cd standalone/passive-subdomain-mcp
python -m pytest -qLicense
MIT — see LICENSE.
Available Tools
2 toolspassive_subdomain_collectCollect subdomains from passive sourcesARead-onlyIdempotent
Run key-free passive subdomain collection for a root domain. Returns {domain, subdomains, count, sources_status, provenance}. Each source has its own timeout, rate limit and breaker; a failed source is reported as failed (never disguised as empty).
Inputs: domain (required), limit, sources, timeout_s, +1 more.
passive_subdomain_list_sourcesList key-free passive subdomain sourcesARead-onlyIdempotent
List the 13 built-in key-free passive sources with their default per-source timeout, weight and description. No network access.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are clearly distinct: one is a zero-network metadata/introspection call listing built-in sources, the other performs the actual collection run. An agent can trivially tell which to call first and which to call to get data.
Both names use the same `passive_subdomain_` namespace prefix followed by a clear verb/noun (`list_sources`, `collect`). The pattern is predictable and would scale cleanly if more tools were added.
Two tools is thin even for a narrowly scoped passive-recon server; the source-listing tool is essentially documentation surfaced as a tool. It works, but a config/selection tool would make the surface feel less minimal.
The core lifecycle for passive collection is covered: inspect available sources, then run collection with per-source status and provenance. Minor gaps remain — no way to select a subset of sources, override timeouts/weights, or re-run/diff against prior results.
Maintenance
Related MCP Connectors
A domain's DNS records and RDAP registration per call for AI agents. Paid per domain, no run.
Passive subdomain enumeration from certificate transparency (certspotter, crt.sh) with DNS checks.
Domain intel for agents: DNS, RDAP age/registrar, CT certs, security headers, tech stack, sitemaps.
Find known subdomains of a domain. Passive data; may include historic entries. List or count.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to orchestrate OSINT reconnaissance pipelines, including subdomain takeover detection, URL harvesting, secret scanning, and JS analysis, by chaining 73 tools with smart target detection and deduplication.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to perform passive security scans on domains, checking email spoofing (DMARC/SPF/DKIM), TLS weaknesses, security headers, exposed files, and subdomain-takeover risk without needing an API key.770 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to perform live subdomain enumeration, passive DNS OSINT, technology stack profiling, port scanning, and B2B lead harvesting directly from chat.MIT
- AlicenseAqualityBmaintenanceEnables passive subdomain enumeration from certificate transparency logs and DNS, with host resolution, certificate history, and attack-surface summaries for authorized security reconnaissance.4MIT