recon-mcp

recon-mcp

MCP server providing safe, structured network and security reconnaissance tools for AI agents, with graded JSON results.

Category
访问服务器

README

recon-mcp

English | 繁體中文

CI PyPI Python License: MIT

An MCP server that gives AI coding agents — Claude Code, Codex, Cline, and any MCP client — safe, structured network and security reconnaissance tools.

Most MCP servers wrap CRUD APIs. recon-mcp instead exposes the kind of read-only recon an engineer reaches for when investigating an asset, and returns clean JSON — with a graded verdict — so the agent can reason over results instead of parsing console output.

⚠️ Authorized use only. These tools are for security testing of assets you own or have explicit written permission to assess, for CTF practice, and for education. Do not point them at third-party infrastructure without authorization. You are responsible for how you use this software.

Tools

Tool What it does
recon_report Start here. One call → DNS, TLS, and HTTP headers checked together, with an overall grade
dns_recon DNS + WHOIS + email security (SPF/DMARC/DKIM), graded
subdomain_enum Discover subdomains via DNS brute-force and/or Certificate Transparency logs
subdomain_takeover Check subdomains for a dangling-CNAME takeover risk against known services
tls_check Certificate, protocols, ciphers, and known TLS vulnerabilities, graded
http_headers_audit HTTP security headers (CSP, HSTS, X-Frame-Options, …), graded
cookie_audit Redirect chain + cookie flags (Secure / HttpOnly / SameSite), graded
cors_check CORS policy probe — flags arbitrary-Origin reflection and wildcard misuse
tech_detect Fingerprint the web stack (server, CDN/WAF, language, framework, CMS, JS) from one GET
http_methods_audit Report which HTTP methods a server allows and grade the risk (TRACE/PUT/DELETE)
well_known_audit Fetches & parses security.txt (RFC 9116) and robots.txt
ip_info Resolves the host and enriches its IP via RDAP (owner, country, CIDR, abuse)
port_scan TCP port scan of one host (≤1024 ports/call), open ports + services

Example

Just ask your agent: "run a security recon report on example.com." It calls recon_report once and gets a graded overview it can act on:

{
  "domain": "example.com",
  "overall_grade": "F",
  "summary": "Overall posture F: email A, TLS B, headers F; 13 actionable issue(s).",
  "components": {
    "email":   { "grade": "A", "issues": [] },
    "tls":     { "grade": "B", "issues": [] },
    "headers": { "grade": "F", "issues": [
      { "severity": "high", "label": "Missing Content-Security-Policy", "detail": "CSP not set; cannot restrict resource load sources" }
    ] }
  }
}

Need more detail on one area? The agent can call dns_recon, subdomain_enum, subdomain_takeover, tls_check, http_headers_audit, cookie_audit, cors_check, tech_detect, http_methods_audit, well_known_audit, ip_info, or port_scan directly.

Install

Requires Python ≥ 3.10. Runs on Linux, macOS, and Windows (tested in CI).

Recommended — no clone, via uv:

uvx recon-kit-mcp

Or from source (for development):

git clone https://github.com/nan786521/recon-mcp
cd recon-mcp
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -e .

Use with Claude Code

Add the server (stdio transport). With uvx you don't need an absolute path:

claude mcp add recon -- uvx recon-kit-mcp

Or add it manually to any MCP client config:

{
  "mcpServers": {
    "recon": {
      "command": "uvx",
      "args": ["recon-kit-mcp"]
    }
  }
}

(From a source checkout, point the command at /absolute/path/to/.venv/bin/recon-kit-mcp instead.)

Then just ask: "run a security recon report on example.com" — or target one area, e.g. "check the email security of example.com."

The server also ships a security_recon prompt: pick it from your client's prompt menu and pass a domain for a guided, severity-sorted audit.

Tool reference

recon_report(domain, timeout?) -> dict

Runs DNS/email, TLS, HTTP-header, web-stack (tech_detect), and apex subdomain-takeover checks together and returns overall_grade (as weak as the weakest component, capped at F if a live takeover is found), a one-line summary, components (email / tls / headers, each with its grade and actionable issues), a tech section (detected technologies + any version disclosure), and a takeover section when the apex is at risk. Uses a fast single-handshake TLS check for speed — call tls_check for the full cipher/vulnerability analysis. The best starting point; use the tools below for raw detail.

dns_recon(domain, checks?, timeout?) -> dict

  • records — A, AAAA, MX, NS, TXT, SOA, CNAME, CAA records
  • whois — parsed registration fields + raw WHOIS text
  • email — SPF, DMARC, and DKIM posture, plus advisory MTA-STS, TLS-RPT, BIMI, and DNSSEC signals, and a graded assessment (letter grade A–F, a summary, and per-check findings with severity and a recommended fix). The advisory signals surface as findings but don't move the core SPF/DKIM/DMARC grade.

checks is any subset of ["records", "whois", "email"]; omit it to run all.

subdomain_enum(domain, wordlist?, source="dns", timeout?) -> dict

Discovers subdomains from two complementary sources:

  • source="dns" (default) — resolves candidate labels via DNS. wordlist is comma-separated labels ("www,api,dev"); omit it for a built-in common list. Capped at 512 candidates per call. Returns resolved ips.
  • source="ct" — queries public Certificate Transparency logs (crt.sh) for every name ever certified for the domain. Fully passive; finds real hosts no wordlist would guess.
  • source="both" — runs both and merges, recording which source(s) saw each host.

Returns sources, found_count, and found (each with subdomain, the sources that saw it, and ips when resolved).

subdomain_takeover(hosts, timeout?) -> dict

Checks subdomains for a dangling-CNAME takeover — a subdomain that CNAMEs to a third-party service (GitHub Pages, S3, Heroku, Azure, Fastly, Shopify, …) whose resource was deleted or never claimed, letting anyone who registers that resource serve content on the victim's subdomain. For each host it resolves the CNAME, recognizes known takeover-prone services, fetches the page, and flags the provider's "unclaimed resource" fingerprint and/or a CNAME target that no longer resolves. hosts is one hostname or a comma-separated list (capped at 100). Read-only — DNS lookups plus one HTTP GET per host. Pair it with subdomain_enum: enumerate first, then check the interesting hosts.

Returns checked, vulnerable_count, and results (each with host, cname, service, status, vulnerable, severity, and detail). status is one of not_applicable, not_vulnerable, potential, dangling_cname, or vulnerable.

tls_check(host, port=443, timeout?) -> dict

Returns grade, certificate (validity / expiry / key algorithm), protocols (flags legacy SSLv3 / TLS 1.0 / 1.1), cipher info, forward_secrecy, hsts, vulnerabilities (each with a vulnerable flag), and a findings list.

http_headers_audit(host, port?, use_ssl=True, timeout?) -> dict

Returns grade, score, the observed security headers, and a findings list with a recommendation per header. Defaults to HTTPS (port 443).

cookie_audit(host, port?, use_ssl=True, timeout?) -> dict

Follows the redirect chain from the host (capped at 10 hops, flagging any HTTPS→HTTP downgrade) and audits every Set-Cookie seen for the Secure, HttpOnly, and SameSite flags. Returns redirect_chain, final_url, cookies (flags only — values are never returned), cookie_grade, cookie_score, and a findings list.

cors_check(host, port?, use_ssl=True, timeout?) -> dict

Sends one GET with an untrusted Origin and inspects the Access-Control-Allow-Origin / -Allow-Credentials response. Reflecting an arbitrary Origin with credentials is high severity (any site can read authenticated responses); a wildcard or trusted null origin are lesser issues. Returns acao, allows_credentials, reflects_origin, wildcard, severity, and findings.

tech_detect(host, port?, use_ssl=True, timeout?) -> dict

Fingerprints the technology stack behind a website from one HTTP GET. It matches response headers, set cookies, the HTML body, and the <meta name="generator"> tag against a signature table to identify the web server, reverse proxy / CDN, WAF, programming language, web framework, CMS, JavaScript framework, and analytics. Where a version is exposed it is captured and flagged (info) — a precise version eases known-CVE lookup. Read-only.

Returns status, technology_count, technologies (each with name, category, version when known, and evidence), and a findings list noting any version disclosure.

http_methods_audit(host, port?, use_ssl=True, path="/", timeout?) -> dict

Reports which HTTP request methods a server allows and grades the risk. Enabled write/diagnostic methods widen the attack surface: TRACE enables Cross-Site Tracing (XST), and PUT / DELETE can allow file upload or deletion under weak access control. Safe by design — it never sends a mutating request: it actively probes only OPTIONS, HEAD, and TRACE (TRACE merely echoes), and reads PUT / DELETE / PATCH / CONNECT from the OPTIONS Allow header as advertised, never invoking them.

Returns grade, score, allow_header, advertised_methods, trace_enabled, dangerous_methods, and a findings list (each with the method, severity, and a recommendation).

well_known_audit(host, timeout?) -> dict

Fetches and parses security.txt (RFC 9116, tried at /.well-known/ then the legacy path) and robots.txt. Returns security_txt (parsed fields, structural issues, location) and robots_txt (sitemaps, disallow/allow paths, user_agents), each with a present flag.

ip_info(host, timeout?) -> dict

Resolves the host's IP and looks it up in the public RDAP registry (via rdap.org's bootstrap to the right RIR). Returns ip and rdap (handle, name, country, cidr, org, abuse_email).

port_scan(host, ports?, timeout?) -> dict

TCP connect scan of a single host. ports is a string — "22,80,443", a range "1-1024", or a mix — and omitting it scans a built-in common-port set. Hard-capped at 1024 ports per call (single-host recon, not mass scanning). Returns host, ip, scanned, open_count, and open_ports (port + service). Scan only hosts you are authorized to assess.

License

MIT

<!-- mcp-name: io.github.nan786521/recon-kit-mcp -->

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选