MoonMCP
MoonMCP is a scope-aware MCP server for authorised security research, offering OSINT, web/infra recon, vulnerability scanning, and safety/workflow controls.
Manage scope (list/add/exclude/remove) and check server status/external tools.
Passive OSINT: subdomain enumeration, Wayback URLs, CVE lookup/search, Shodan host intel.
Active recon: DNS lookup, HTTP probe, TLS inspection, header audit, fingerprinting, well-known files.
Intrusive scans (gated): port scan, content discovery, nuclei vuln scan.
Run external CLIs (subfinder, httpx, nuclei, nmap, etc.) with scope checks.
One-shot passive+light recon via recon_target.
Safety: scope enforcement, intrusive gating, rate limits, private-address blocking, audit logging.
Broader workflow: resumable runs, findings, observations/hypotheses, persistent memory/knowledge graph, reporting/export.
Provides access to historical URLs from the Internet Archive for passive reconnaissance.
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., "@MoonMCP perform a full recon sweep on example.com"
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.
🌙 MoonMCP
MoonMCP is an MCP server for authorised security research and bug-bounty reconnaissance. It gives MCP clients a scope-aware set of tools for OSINT, web and infrastructure reconnaissance, vulnerability detection, finding management, and security research workflows.
The project is stdlib-first: its core reconnaissance features work without a large external toolchain. When compatible security CLIs are installed, MoonMCP can use them as optional extensions.
Authorised testing only. Use MoonMCP only on systems you own or have explicit permission to test. Always follow the target program's scope, rules and applicable law.
What it provides
Scope controls — allow/exclude domains, hosts, IPs and CIDRs; active tools fail closed outside the configured scope.
Reconnaissance — DNS, HTTP/TLS inspection, fingerprinting, subdomain discovery, historical URLs, crawling, JavaScript analysis and OSINT.
Web security checks — structured checks for common access-control, configuration, injection, WebSocket, GraphQL, OAuth, cache and server-side issues.
Finding workflow — confirmation helpers, CVSS scoring, deduplication, reporting, SARIF/JSON export and surface snapshots.
Persistent research context — optional SQLite-backed memory and a small knowledge graph for findings, assets and research notes.
Resumable assessments — persistent runs, role-based tasks, dependency ordering, coverage tracking, usage budgets and immutable evidence artifacts.
Observations and hypotheses — persistent flags with evidence, source groups, role/time context, links and counterevidence; reviewed hypotheses remain distinct from confirmed findings.
Optional CLI integration — can detect and use tools such as
nuclei,httpx,subfinder,nmapand others when they are available.Safety controls — scope enforcement, request rate/concurrency limits, private-address protection, audit logging and a separate gate for intrusive tools.
Use tool_catalog from an MCP client, or moonmcp tools from the shell, for the current tool list. This avoids relying on README counts as the project evolves.
Related MCP server: shodan-mcp
Quick start
Requires Python 3.10+.
# uv
uv tool install --from . moonmcp
# or pip
pip install .
# verify the installation
moonmcp --checkMCP client configuration
{
"mcpServers": {
"moonmcp": {
"command": "moonmcp",
"env": {
"MOONMCP_SCOPE": "*.example.com,203.0.113.0/24",
"MOONMCP_ALLOW_INTRUSIVE": "0"
}
}
}
}A fuller example is available in examples/claude_desktop_config.json.
MoonMCP can also be used directly from a shell:
moonmcp tools
moonmcp call fingerprint --arg target=https://example.com
moonmcp call injection_info --json '{"injection_class":"ssti"}'Scope checks still apply to shell calls.
Resumable assessment runs
Set MOONMCP_STATE_DIR to retain runs, findings and evidence across restarts. Use
run_start with an authorised target, run_brief to resume context, and run_claim
with a heartbeat for coordinated work. Discover a tool with tool_search, inspect
its schema and request accounting through tool_describe, then use run_execute
for supported local/HTTP tools. It records calls and HTTP sends against the run
budget; direct typed calls do not automatically join that budget.
Large results are preserved in ordered artifact chunks with SHA-256 manifests;
summary mode shortens the preview. Interrupted outcomes need evidence-backed
reconciliation through run_recover/run_reconcile before explicit task retry.
run_finish checks unfinished work and preserves coverage limitations. See the
agent workflow guide for exact recovery rules and the
flag → hypothesis → verification workflow.
MOONMCP_COMPACT=1 advertises a smaller facade when the selected profile includes
both run_start and run_execute. Profiles without that pair, such as knowledge,
keep their direct tools. Compact does not bypass profile permissions or make
unmetered browser, CLI or raw-protocol tools executable through the run facade.
Operator skills in .claude/skills/assessment-planning,
.claude/skills/systematic-validation, and .claude/skills/run-coordination
describe planning, evidence validation and coordination through these MCP tools.
Scope and safety
Scope is the main authorization boundary for active testing.
Entry | Meaning |
| apex and subdomains |
| subdomains only |
| that host and deeper labels |
| one IP |
| CIDR range |
Exclusions override inclusions. With scope enforcement enabled, active tools refuse targets that are not authorised. Private, loopback, link-local and reserved addresses are blocked by default; this can be changed for explicitly authorised internal testing.
Intrusive capabilities have a separate MOONMCP_ALLOW_INTRUSIVE switch. Outbound requests also share rate and concurrency controls.
Configuration
Common settings:
Variable | Default | Purpose |
| empty | authorised domains, hosts, IPs or CIDRs |
| empty | explicit exclusions |
|
| enforce active-tool scope checks |
|
| block private/reserved destinations |
|
| enable separately gated intrusive tools |
|
| outbound requests per second |
|
| concurrent outbound connections |
|
| default request timeout |
|
| permit installed CLI integrations |
|
| persistent runs, findings, flags and program/memory state |
|
| advertise the run facade when the selected profile supports it |
See the source and documentation for specialised integrations and provider-specific API keys.
Documentation
Start implementation work with the consolidated priorities. They distinguish near-term fixes and the BOLA proof path from conditional research, link all retained discovery proposals, and credit capabilities that already exist. Merging a roadmap does not implement its features.
Technical and operating references:
Development
uv venv
source .venv/bin/activate
uv pip install -e ".[dev,enhanced]"
pytest -q
ruff check .Design notes
MoonMCP keeps active target access behind shared scope controls rather than leaving authorization decisions to individual workflows. Core features prefer Python implementations, while external security tools remain optional integrations.
The project includes passive and active capabilities. Detection results should be treated as leads until they are independently verified.
License
MIT — see LICENSE.
Available Tools
22 toolsanalyze_headersA
Fetch a URL and audit its HTTP security headers.
Grades (A-F) the presence of HSTS, CSP, X-Frame-Options, X-Content-Type- Options, Referrer-Policy and Permissions-Policy; flags information-leaking headers (Server, X-Powered-By, ...) and risky Set-Cookie flags. In scope only.
Inputs: target (required).
content_discoveryA
Probe an in-scope host for common sensitive paths (admin panels, API docs, .git/.env, backups, config files, ...) using a compact built-in wordlist or a caller-supplied one. Reports each path's status, size and content type. Intrusive: requires MOONMCP_ALLOW_INTRUSIVE and the host to be in scope.
Inputs: target (required), wordlist, concurrency.
cve_lookupA
Look up a single CVE by ID (e.g. CVE-2021-44228) from the NVD database.
Returns description, CVSS score/severity/vector, CWE mappings and references.
Inputs: cve_id (required).
cve_searchA
Keyword-search the NVD for CVEs (e.g. 'apache log4j 2.14').
Results are sorted most-severe first by CVSS base score. Use this to map a fingerprinted product/version to known vulnerabilities.
Inputs: keyword (required), limit.
dns_lookupA
Resolve a host's DNS records (A/AAAA, plus MX/NS/TXT/CNAME/SOA/CAA when dnspython is installed) and attempt a reverse PTR lookup on its A records. Requires the target to be in scope.
Inputs: target (required).
enumerate_subdomainsA
Passively enumerate subdomains of a domain via free OSINT sources.
Queries certificate transparency (crt.sh), HackerTarget, AnubisDB and
AlienVault OTX in parallel and merges the results. Passive — no packets are
sent to the target itself. sources optionally restricts which providers
to use (see server_status / available list: crtsh, hackertarget, anubis, otx).
Inputs: domain (required), sources.
external_toolsA
List the external security CLIs MoonMCP knows about and whether each is installed on PATH, plus the native MoonMCP fallback for each. Use before calling run_scanner or vuln_scan to know what is available.
Inputs: no named parameters.
fingerprintA
Fetch a URL and fingerprint its technology stack: web server, CDN/WAF, language/runtime, frameworks, CMS and front-end libraries, with version hints and the evidence for each match. In scope only.
Inputs: target (required).
host_intelA
Look up an IP's exposure via Shodan.
Uses Shodan's free InternetDB by default (open ports, hostnames, CPEs, known CVEs, tags); uses the full Shodan API automatically if a key is configured. Passive — queries Shodan, not the target.
Inputs: ip (required).
http_probeA
Send a single HTTP(S) request to an in-scope target and return a structured result: status, reason, response headers, timing, the full redirect chain, page title and body size. Accepts a bare host (defaults to https) or a full URL. The primary building block for web recon.
Inputs: target (required), method, verify_tls, follow_redirects.
port_scanA
TCP connect-scan an in-scope host. ports is 'top' (a curated common
set) or a spec like '80,443,8000-8100'. Optionally grabs service banners.
Unprivileged and non-malformed (full handshake). Intrusive: requires
MOONMCP_ALLOW_INTRUSIVE and the host to be in scope.
Inputs: target (required), ports, timeout, grab_banner.
recon_targetA
One-shot passive+light recon of an in-scope domain.
Chains the safe tools into a single report: subdomain enumeration, DNS resolution, TLS certificate (with SANs), an HTTP probe, security-header grade, and a technology fingerprint of the apex. No intrusive scanning is performed. Ideal as the first call against a new target.
Inputs: domain (required), include_subdomains.
run_scannerA
Run an installed external security CLI and return its output.
tool must be one of the known tools (subfinder, httpx, nuclei, naabu,
nmap, katana, ffuf, gau, dnsx, amass, waybackurls). args are passed
through verbatim. If target is given it is scope-checked first. If the
tool is missing, returns a structured note and the native fallback to use
instead. JSONL output is auto-parsed. Gated by MOONMCP_ALLOW_EXTERNAL_TOOLS.
Inputs: args (required), tool (required), target.
scope_addA
Authorize a target for active testing.
Accepts a domain (example.com matches the apex and every subdomain),
a wildcard (*.example.com for subdomains only), an exact host
(api.example.com), an IP, or a CIDR (10.0.0.0/8). Active tools refuse
to touch anything not covered by the scope.
Inputs: target (required).
scope_excludeA
Mark a target as out-of-scope. Exclusions always override the allowlist.
Inputs: target (required).
scope_listA
List the current in-scope and out-of-scope entries.
Inputs: no named parameters.
scope_removeC
Remove a previously added scope entry (from allow or deny lists).
Inputs: target (required).
server_statusA
Report MoonMCP's configuration and capabilities.
Shows the active scope, whether enforcement/intrusive scanning are enabled, which optional enhancers (dnspython) are present, and which external security CLIs (nuclei, httpx, subfinder, nmap, ...) were detected on PATH. Call this first to understand what the server can do in the current environment.
Inputs: no named parameters.
tls_inspectA
Inspect a host's TLS certificate: subject, issuer, validity window, days until expiry, negotiated protocol/cipher, and — most useful for recon — the Subject Alternative Names, which often reveal sibling hostnames. In scope only.
Inputs: target (required), port.
vuln_scanA
Run a nuclei template-based vulnerability scan against an in-scope target.
Requires nuclei to be installed (there is no safe stdlib equivalent for
template-based scanning). templates maps to nuclei -t and severity
to -severity (e.g. 'critical,high'). Intrusive: requires
MOONMCP_ALLOW_INTRUSIVE, MOONMCP_ALLOW_EXTERNAL_TOOLS and the host in scope.
Inputs: target (required), severity, templates.
wayback_urlsA
Fetch historical URLs for a domain from the Internet Archive (Wayback).
Passive. Surfaces old endpoints, parameters and forgotten files. Flags 'interesting' URLs (backups, configs, .git, api, tokens, ...) separately.
Inputs: domain (required), limit, include_subdomains.
well_knownA
Fetch and parse a host's disclosure files: robots.txt (extracting the referenced paths), sitemap.xml (extracting URLs), security.txt and humans.txt. A quick, low-noise way to discover structure. In scope only.
Inputs: target (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Each tool has a clearly distinct purpose: analyze_headers audits HTTP security headers, content_discovery probes for sensitive paths, dns_lookup resolves DNS records, fingerprint identifies technology stacks, etc. No overlapping functionality.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., analyze_headers, dns_lookup, enumerate_subdomains, port_scan). There are no mixed conventions or irregularities.
22 tools is on the higher side but appropriate for a comprehensive security reconnaissance server. Each tool covers a specific aspect of the workflow, and there are no redundant tools. Could potentially be trimmed slightly, but overall well-scoped.
The tool set covers the full reconnaissance lifecycle: passive OSINT (subdomain enum, DNS, CVE lookup), active scanning (port scan, HTTP probe, content discovery), vulnerability scanning (nuclei), scope management, and status/configuration. No obvious gaps for the intended domain of offensive security testing.
Maintenance
Related MCP Connectors
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Unified 15-tool SEO, SERP, clean Markdown & GEO (LLM citation Share-of-Voice) MCP server.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for the Vulners.com API
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server to perform various OSINT tasks by leveraging common network reconnaissance tools.48-
- FlicenseNot gradedqualityBmaintenancePassive reconnaissance MCP server powered by Shodan, enabling host lookups, search, and DNS queries gated against HackerOne scope snapshots.-
- AlicenseNot gradedqualityDmaintenanceA local Python MCP server for safe, human-led bug bounty recon, providing lightweight helpers for scope checks, headers, robots.txt, sitemap.xml, JavaScript URL collection, endpoint extraction, URL deduplication, evidence notes, and manual test planning.MIT
- AlicenseAqualityBmaintenanceAn MCP server that provides passive and low-impact active reconnaissance tools for authorized bug bounty and security assessments, enabling LLMs to perform structured recon and generate reports.11Apache 2.0