Skip to main content
Glama
MoonMCP
by Moonwuk

🌙 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, nmap and 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 --check

MCP 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

example.com

apex and subdomains

*.example.com

subdomains only

api.example.com

that host and deeper labels

203.0.113.10

one IP

203.0.113.0/24

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

MOONMCP_SCOPE

empty

authorised domains, hosts, IPs or CIDRs

MOONMCP_SCOPE_EXCLUDE

empty

explicit exclusions

MOONMCP_ENFORCE_SCOPE

1

enforce active-tool scope checks

MOONMCP_BLOCK_PRIVATE

1

block private/reserved destinations

MOONMCP_ALLOW_INTRUSIVE

0

enable separately gated intrusive tools

MOONMCP_RATE_LIMIT

10

outbound requests per second

MOONMCP_MAX_CONCURRENCY

20

concurrent outbound connections

MOONMCP_TIMEOUT

10

default request timeout

MOONMCP_ALLOW_EXTERNAL_TOOLS

1

permit installed CLI integrations

MOONMCP_STATE_DIR

~/.hermes/moonmcp_state

persistent runs, findings, flags and program/memory state

MOONMCP_COMPACT

0

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 tools
analyze_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).

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

    A4/5.0

    Scored across 22 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count4/5

    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.

    Completeness5/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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
    • A
      license
      A
      quality
      B
      maintenance
      An 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.
      11
      Apache 2.0