Krisparenthetic284/osint-mcp-server

GitHub: Krisparenthetic284/osint-mcp-server

基于 MCP 协议的 OSINT 聚合服务器,将 12 个开源情报源的 37 种工具统一交付给 AI 代理,实现对话式情报收集与关联分析。

Stars: 0 | Forks: 0

English | 简体中文 | 繁體中文 | 한국어 | Deutsch | Español | Français | Italiano | Dansk | 日本語 | Polski | Русский | Bosanski | العربية | Norsk | Português (Brasil) | ไทย | Türkçe | Українська | বাংলা | Ελληνικά | Tiếng Việt | हिन्दी


osint-mcp-server

面向 AI 代理的 OSINT 与侦察情报。

Shodan, VirusTotal, Censys, SecurityTrails, DNS, WHOIS, BGP, Wayback Machine — 统一到一个 MCP 服务器中。
您的 AI 代理将获得按需提供的全频谱 OSINT,而不是 12 个浏览器标签页和手动关联。


问题独特之处快速开始AI 能做什么工具 (37)数据来源架构更新日志贡献指南

npm License Bun MCP 37 Tools 12 Sources 21 Free Tools

osint-mcp-server demo

## 问题 OSINT 收集是每一次渗透测试、漏洞赏金计划和威胁评估的第一步。您需要的数据分散在十几个平台上 — 每个平台都有自己的 API、自己的身份验证、自己的速率限制和自己的输出格式。如今,您需要在一个标签页中打开 Shodan,在另一个标签页中打开 VirusTotal,在终端中运行 `dig`,从 WHOIS 中复制粘贴,切换到 crt.sh 查询证书,然后花 30 分钟手动将所有内容关联起来。 ``` Traditional OSINT workflow: resolve DNS records → dig / nslookup CLI check WHOIS registration → whois CLI or web tool enumerate subdomains → crt.sh + SecurityTrails + VirusTotal (3 different UIs) scan for open ports/services → Shodan web interface check domain reputation → VirusTotal web interface map IP infrastructure → Censys + BGP lookups find archived pages → Wayback Machine web UI check email security → manual MX/SPF/DMARC lookups correlate everything → copy-paste into a spreadsheet ───────────────────────────────── Total: 45+ minutes per target, most of it switching contexts ``` **osint-mcp-server** 通过 [Model Context Protocol](https://modelcontextprotocol.io) 为您的 AI 代理提供来自 12 个数据源的 37 种工具。该代理并行查询所有来源、关联数据、识别风险,并在单次对话中呈现统一的情报图景。 ``` With osint-mcp-server: You: "Do a full recon on target.com" Agent: → DNS: 4 A records, 3 MX (Google Workspace), 2 NS → WHOIS: Registered 2019, expires 2025, GoDaddy → crt.sh: 47 unique subdomains from CT logs → HackerTarget: 23 hosts with IPs → Email: SPF soft-fail (~all), DMARC p=none, no DKIM → Shodan: 3 IPs, 12 open ports, Apache 2.4.49 (CVE-2021-41773) → VirusTotal: Clean reputation, 0 detections → "target.com has 47 subdomains, weak email security (SPF soft-fail, DMARC monitoring only), and one IP running Apache 2.4.49 with a known path traversal CVE. Priority: patch Apache, upgrade SPF to -all, set DMARC to p=reject." ``` ## 独特之处 现有的 OSINT 工具一次只能为您提供来自单个数据源的原始数据。osint-mcp-server 赋予您的 AI 代理**同时跨所有来源进行推理**的能力。
传统 OSINT osint-mcp-server
接口 12 种不同的 Web UI、CLI 和 API MCP — AI 代理以对话方式调用工具
数据源 一次只能使用一个平台 12 个来源并行查询
子域名枚举 crt.sh 或 SecurityTrails 或 VirusTotal 代理合并这三者 + HackerTarget 的结果并进行去重
关联分析 在标签页之间手动复制粘贴 代理进行交叉引用:“这个来自 Shodan 的 IP 也出现在 Censys 中,并带有过期证书”
邮件安全 单独的 SPF/DMARC/DKIM 查询 综合分析并提供风险评分和可行的建议
基础设施 分别查询 GeoIP + BGP + WHOIS 代理映射完整的基础设施:ASN、前缀、地理位置、所有权
API 密钥 几乎所有操作都需要 21 个工具可免费使用,另外 16 个可通过可选的 API 密钥使用
设置 安装每个工具,管理每个配置 npx osint-mcp-server — 一条命令,零配置
## 快速开始 ### 选项 1:npx(无需安装) ``` npx osint-mcp-server ``` 21 个公共 OSINT 工具可立即使用。无需 API 密钥。 ### 选项 2:克隆 ``` git clone https://github.com/badchars/osint-mcp-server.git cd osint-mcp-server bun install ``` ### 环境变量(可选) ``` # 高级 OSINT 来源 — 全部可选 export SHODAN_API_KEY=your-key # Enables 4 Shodan tools export VT_API_KEY=your-key # Enables 4 VirusTotal tools export ST_API_KEY=your-key # Enables 3 SecurityTrails tools export CENSYS_API_ID=your-id # Enables 3 Censys tools export CENSYS_API_SECRET=your-secret # Required with CENSYS_API_ID ``` 所有高级 API 密钥都是可选的。即使没有它们,您仍然可以使用涵盖 DNS、WHOIS、crt.sh、GeoIP、BGP、Wayback Machine、HackerTarget 和 Microsoft 365 租户发现的 21 种工具。 ### 连接到您的 AI 代理
Claude Code ``` # 使用 npx claude mcp add osint-mcp-server -- npx osint-mcp-server # 使用本地 clone claude mcp add osint-mcp-server -- bun run /path/to/osint-mcp-server/src/index.ts ```
Claude Desktop 添加到 `~/Library/Application Support/Claude/claude_desktop_config.json`: ``` { "mcpServers": { "osint": { "command": "npx", "args": ["-y", "osint-mcp-server"], "env": { "SHODAN_API_KEY": "optional", "VT_API_KEY": "optional", "ST_API_KEY": "optional", "CENSYS_API_ID": "optional", "CENSYS_API_SECRET": "optional" } } } } ```
Cursor / Windsurf / 其他 MCP 客户端 使用相同的 JSON 配置格式。将命令指向 `npx osint-mcp-server` 或您的本地安装路径。
### 开始查询 ``` You: "What can you find about example.com?" ``` 就是这样。该代理会自动处理 DNS、WHOIS、子域名、邮件安全等事务。 ## AI 能做什么 ### 域名侦察 ``` You: "Do a full recon on target.com" Agent: → osint_domain_recon {domain: "target.com"} → DNS: A records point to 3 IPs (AWS us-east-1) → WHOIS: Registered 2018 via Namecheap, expires 2026 → crt.sh: 62 subdomains discovered → HackerTarget: 31 hosts with resolved IPs → Email: SPF hard-fail, DMARC p=reject, DKIM found (selector1) → "target.com is well-configured for email security. 62 subdomains found — notable: staging.target.com, admin-portal.target.com, api-v2.target.com. Infrastructure is on AWS (us-east-1)." ``` ### 攻击面映射 ``` You: "Map the attack surface for 203.0.113.50" Agent: → shodan_host {ip: "203.0.113.50"} → geoip_lookup {ip: "203.0.113.50"} → bgp_ip {ip: "203.0.113.50"} → whois_ip {ip: "203.0.113.50"} → dns_reverse {ip: "203.0.113.50"} → "203.0.113.50 (Hetzner, DE, AS24940) Open ports: 22/SSH, 80/HTTP, 443/HTTPS, 8080/HTTP-Proxy Apache 2.4.51, OpenSSH 8.9, nginx reverse proxy on 8080 Reverse DNS: web1.target.com 3 known CVEs flagged by Shodan" ``` ### 子域名枚举(多来源) ``` You: "Find all subdomains of target.com using every source available" Agent: → crtsh_search {domain: "target.com"} → 62 subdomains → st_subdomains {domain: "target.com"} → 84 subdomains → vt_subdomains {domain: "target.com"} → 41 subdomains → hackertarget_hostsearch {domain: "target.com"} → 31 hosts → dns_wildcard_check {domain: "target.com"} → No wildcard → "127 unique subdomains after dedup across 4 sources. Notable findings: staging.target.com, dev-api.target.com, jenkins.target.com (CI/CD exposure risk), old-admin.target.com (potential legacy system)" ``` ### 邮件安全审计 ``` You: "Analyze the email security posture of target.com" Agent: → dns_email_security {domain: "target.com"} → dns_spf_chain {domain: "target.com"} → m365_tenant {domain: "target.com"} → "Email Security: HIGH RISK SPF: ~all (soft fail — spoofable) DMARC: p=none (monitoring only — not enforcing) DKIM: Found for selector1 (2048-bit, good) SPF chain: 7 includes, 2 services (Google Workspace, SendGrid) M365: Not a Microsoft tenant Recommendations: 1. Upgrade SPF from ~all to -all 2. Change DMARC from p=none to p=quarantine, then p=reject 3. Add rua= to DMARC for aggregate reporting" ``` ### 历史情报 ``` You: "What was target.com running 3 years ago?" Agent: → wayback_urls {domain: "target.com", limit: 500} → st_dns_history {domain: "target.com", type: "a"} → wayback_snapshots {url: "https://target.com/robots.txt"} → "DNS history: target.com moved from 198.51.100.1 (DigitalOcean) to 203.0.113.50 (AWS) in 2023. Wayback found 342 unique URLs including: - /admin/ (removed in 2024, was accessible) - /api/v1/docs (Swagger UI, still cached) - /wp-content/ (was WordPress, migrated) Old robots.txt disallowed /internal/ and /debug/" ``` ## 工具参考(37 个工具)
DNS (6) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `dns_lookup` | 解析 A、AAAA、MX、TXT、NS、SOA、CNAME、SRV 记录 | | `dns_reverse` | IP 地址的反向 DNS (PTR) 查询 | | `dns_email_security` | SPF + DMARC + DKIM 分析,附带风险评分和建议 | | `dns_spf_chain` | 递归 SPF 包含链解析及服务检测 | | `dns_srv_discover` | SRV + CNAME 服务发现(Autodiscover、LDAP、SIP、Kerberos 等) | | `dns_wildcard_check` | 通过随机子域名探测进行泛解析 DNS 检测 |
WHOIS / RDAP (2) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `whois_domain` | RDAP 域名查询 — 注册商、日期、名称服务器、联系人 | | `whois_ip` | RDAP IP 查询 — 网络名称、CIDR、国家/地区、实体 |
证书透明度 (1) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `crtsh_search` | 通过 crt.sh 搜索 CT 日志 — 子域名发现 + 证书详情 |
Shodan (4) — 需要 SHODAN_API_KEY | 工具 | 描述 | |------|-------------| | `shodan_host` | IP 详情:开放端口、服务、Banner、漏洞、操作系统、ASN | | `shodan_search` | 使用 Shodan 查询语言进行搜索(例如 `apache port:443 country:US`) | | `shodan_dns_resolve` | 通过 Shodan 进行批量主机名到 IP 的解析 | | `shodan_exploits` | 搜索公共漏洞利用数据库(PoC、Metasploit 模块) |
VirusTotal (4) — 需要 VT_API_KEY | 工具 | 描述 | |------|-------------| | `vt_domain` | 域名信誉、检测统计、类别、DNS 记录 | | `vt_ip` | IP 信誉、检测统计、ASN、网络 | | `vt_subdomains` | 通过 VirusTotal 进行子域名枚举 | | `vt_url` | URL 扫描 + 恶意软件/钓鱼分析 |
SecurityTrails (3) — 需要 ST_API_KEY | 工具 | 描述 | |------|-------------| | `st_subdomains` | 子域名枚举(返回 FQDN) | | `st_dns_history` | 包含首次/末次出现日期的历史 DNS 记录 | | `st_whois` | 增强型 WHOIS,包含注册人/管理员/技术联系人信息 |
Censys (3) — 需要 CENSYS_API_ID + CENSYS_API_SECRET | 工具 | 描述 | |------|-------------| | `censys_hosts` | 主机搜索 — IP、服务、端口、位置、ASN | | `censys_host_details` | 单个主机的完整详情及所有服务 | | `censys_certificates` | 按域名、指纹、颁发者搜索证书 |
GeoIP (2) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `geoip_lookup` | IP 地理位置:国家、城市、ISP、ASN、代理/主机/VPN 检测 | | `geoip_batch` | 批量 IP 地理定位(一次最多 100 个 IP) |
BGP / ASN (3) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `bgp_asn` | ASN 详情 + 所有已公告的 IPv4/IPv6 前缀 | | `bgp_ip` | 包含 RIR 分配信息的 IP 前缀/ASN 路由查询 | | `bgp_prefix` | 前缀详情 + 公告该前缀的 ASN |
Wayback Machine (2) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `wayback_urls` | 存档 URL 发现 — 查找旧的端点、隐藏路径、已删除内容 | | `wayback_snapshots` | 包含时间戳和直接存档链接的快照历史记录 |
HackerTarget (3) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `hackertarget_hostsearch` | 包含已解析 IP 的主机/子域名发现 | | `hackertarget_reverseip` | 反向 IP 查询 — 查找 IP 上的所有域名 | | `hackertarget_aslookup` | ASN 信息查询 |
Microsoft 365 (2) — 无需 API 密钥 | 工具 | 描述 | |------|-------------| | `m365_tenant` | 发现 M365 租户 ID、区域和 OpenID 配置 | | `m365_userrealm` | 检测身份验证类型(托管/联合)、联合品牌、身份验证端点 |
Meta (2) — 无需 API 密钥 | 工具 描述 | |------|-------------| | `osint_list_sources` | 列出所有 OSINT 来源、API 密钥状态和工具数量 | | `osint_domain_recon` | 快速侦察,结合所有免费来源(DNS + WHOIS + crt.sh + HackerTarget + 邮件安全) |
## GitHub Actions 直接在您的 CI/CD 流水线中使用这 37 个工具中的任何一个: ``` # .github/workflows/security.yml name: OSINT Security Check on: schedule: - cron: '0 8 * * 1' # Weekly Monday 8am workflow_dispatch: jobs: recon: runs-on: ubuntu-latest steps: - name: Domain reconnaissance uses: badchars/osint-mcp-server@v1 id: recon with: tool: osint_domain_recon args: '{"domain": "example.com"}' - name: Email security audit uses: badchars/osint-mcp-server@v1 with: tool: dns_email_security args: '{"domain": "example.com"}' - name: Subdomain enumeration uses: badchars/osint-mcp-server@v1 with: tool: crtsh_search args: '{"domain": "example.com"}' - name: Shodan scan (optional) uses: badchars/osint-mcp-server@v1 with: tool: shodan_host args: '{"ip": "203.0.113.50"}' env: SHODAN_API_KEY: ${{ secrets.SHODAN_API_KEY }} ``` 可以通过 `steps..outputs.result` 获取操作输出以供进一步处理。 ### CLI 用法 ``` # 列出所有可用工具 npx osint-mcp-server --list # 直接运行任意工具 npx osint-mcp-server --tool dns_lookup '{"domain":"example.com","type":"A"}' npx osint-mcp-server --tool osint_domain_recon '{"domain":"example.com"}' npx osint-mcp-server --tool dns_email_security '{"domain":"example.com"}' --format text # 需要 API 密钥的工具 SHODAN_API_KEY=your-key npx osint-mcp-server --tool shodan_host '{"ip":"1.1.1.1"}' ``` ## 数据来源 (12) | 来源 | 认证 | 速率限制 | 提供的内容 | |--------|------|-----------|-----------------| | [DNS](https://nodejs.org/api/dns.html) | 无 | 无 | A、AAAA、MX、TXT、NS、SOA、CNAME、SRV、PTR 记录 | | [RDAP](https://rdap.org/) | 无 | 1 次/秒 | 域名和 IP 的 WHOIS 数据(注册商、日期、联系人、CIDR) | | [crt.sh](https://crt.sh/) | 无 | 0.5 次/秒 | 证书透明度日志,子域名发现 | | [ip-api.com](http://ip-api.com/) | 无 | 45 次/分钟 | IP 地理定位、ISP、ASN、代理/VPN/主机检测 | | [BGPView](https://bgpview.io/) | 无 | 0.5 次/秒 | ASN 详情、已公告前缀、IP 路由信息 | | [HackerTarget](https://hackertarget.com/) | 无 | 2 次/秒 | 主机搜索、反向 IP、ASN 查询(每日 50 次免费) | | [Wayback Machine](https://web.archive.org/) | 无 | 1 次/秒 | 存档 URL、快照历史记录、历史内容 | | [Microsoft 365](https://login.microsoftonline.com/) | 无 | 无 | 租户发现、联合检测、身份验证类型 | | [Shodan](https://www.shodan.io/) | `SHODAN_API_KEY` | 1 次/秒 | 互联网范围的端口/服务/Banner 扫描 | | [VirusTotal](https://www.virustotal.com/) | `VT_API_KEY` | 4 次/分钟 | 域名/IP/URL 信誉,恶意软件检测 | | [SecurityTrails](https://securitytrails.com/) | `ST_API_KEY` | 1 次/秒 | DNS 历史、子域名枚举、增强型 WHOIS | | [Censys](https://censys.io/) | `CENSYS_API_ID` | 1 次/秒 | 主机搜索、证书透明度、服务发现 | **设计决策:** - **12 个提供商,1 个服务器** — 每个 OSINT 来源都是一个独立的模块。代理根据查询选择要使用的工具。 - **21 个免费工具** — DNS、WHOIS、crt.sh、BGP、GeoIP、Wayback、HackerTarget 和 M365 无需任何 API 密钥即可工作。高级来源是附加项。 - **并行查询** — `osint_domain_recon` 通过 `Promise.allSettled` 调用 8 个来源。如果一个来源超时,其余来源仍会返回数据。 - **按提供商的速率限制器** — 每个数据源都有根据该 API 的限制校准的独立 `RateLimiter` 实例。没有共享瓶颈。 - **TTL 缓存** — crt.sh (15分钟)、BGP (30分钟)、Shodan (5分钟)、VirusTotal (10分钟) 的结果会被缓存,以避免在多工具工作流程中进行冗余的 API 调用。 - **优雅降级** — 缺少 API 密钥不会导致服务器崩溃。工具会返回描述性错误消息:“设置 SHODAN_API_KEY 以启用 Shodan 工具。” - **SPF 链分析** — 具有循环检测的递归包含解析、服务识别(Google Workspace、Microsoft 365、SendGrid 等)以及 RFC 7208 查找限制检查。 - **2 个依赖项** — `@modelcontextprotocol/sdk` 和 `zod`。所有 HTTP 请求通过原生 `fetch` 进行。所有 DNS 查询通过 `node:dns/promises` 进行。 ## 限制 - 免费层级的速率限制适用:HackerTarget (50次/天)、ip-api.com (45次/分钟)、VirusTotal 社区版 (4次/分钟) - crt.sh 对于大型域名可能会很慢(已应用 30 秒超时) - ip-api.com 免费层级要求使用 HTTP(而非 HTTPS) - Wayback Machine CDX API 对于非常受欢迎的域名可能会超时 - 通过 RDAP 进行的 WHOIS 查询可能无法覆盖所有 TLD(部分注册商尚不支持 RDAP) - 已在 macOS / Linux 上测试(未在 Windows 上测试) ## MCP 安全套件的一部分 | 项目 | 领域 | 工具 | |---|---|---| | [hackbrowser-mcp](https://github.com/badchars/hackbrowser-mcp) | 基于浏览器的安全测试 | 39 个工具,Firefox,注入测试 | | [cloud-audit-mcp](https://github.com/badchars/cloud-audit-mcp) | 云安全 (AWS/Azure/GCP) | 38 个工具,60+ 项检查 | | [github-security-mcp](https://github.com/badchars/github-security-mcp) | GitHub 安全态势 | 39 个工具,45 项检查 | | [cve-mcp](https://github.com/badchars/cve-mcp) | 漏洞情报 | 23 个工具,5 个来源 | | **osint-mcp-server** | **OSINT 与侦察** | **37 个工具,12 个来源** |

仅用于经授权的安全测试和评估。
在对任何目标进行侦察之前,请务必确保您已获得适当的授权。

MIT 许可证 • 使用 Bun + TypeScript 构建

标签:AI安全, Ask搜索, BGP路由, CDN识别, Chat Copilot, DNS查询, ESC4, GitHub, MCP, MCP服务器, MITM代理, OSINT, SecurityTrails, VirusTotal, Wayback Machine, WHOIS查询, 人工智能代理, 侦察情报, 协议探测, 反汇编, 威胁情报, 实时处理, 开发者工具, 情报收集, 数据聚合, 无线安全, 模型上下文协议, 漏洞研究, 网络安全, 自动化分析, 自动化攻击, 资产测绘, 跨站脚本, 隐私保护