Attack MCP Server

Passive external attack-surface mapping: CT subdomains, DNS, TLS, HTTP posture, RDAP/WHOIS, Shodan.

Local serverstdio

What is the Attack MCP server?

If you already use Attack, the attack mcp server is the piece that lets your assistant work with it directly. Passive external attack-surface mapping: CT subdomains, DNS, TLS, HTTP posture, RDAP/WHOIS, Shodan.

What the server does

  • Declarative tool and resource definitions — single file per primitive, framework handles registration and validation
  • Unified error handling — handlers throw, framework catches, classifies, and formats
  • Pluggable auth: none, jwt, oauth
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • STDIO and Streamable HTTP transports

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • attacksurface_map_domain — Flagship workflow. Maps a domain's external surface end to end: CT-log subdomain discovery → DNS liveness → (standard+) DNS records, TLS posture
  • attacksurface_enumerate_subdomains — Passive subdomain discovery from Certificate Transparency logs (crt.sh → Certspotter → TLS-SAN fallback chain), with DNS resolution to mark which
  • attacksurface_resolve_dns — Resolve and enumerate DNS records (A/AAAA/CNAME/MX/NS/TXT/CAA) for one or more hosts across multiple public resolvers, with optional reverse DNS
  • attacksurface_inspect_tls — Inspect TLS/SSL posture via a real read-only handshake: protocol, cipher, full certificate chain, SANs, validity window, days-to-expiry, issuer
  • attacksurface_probe_http — Passive HTTP(S) probe: one GET following redirects. Returns status, redirect chain, headers, a security-header audit (HSTS/CSP/X-Frame-Options/cookie
  • attacksurface_lookup_registration — Registration and ownership lookup via RDAP (JSON; WHOIS fallback). A domain returns registrar, status, lifecycle events, nameservers, DNSSEC; an
  • attacksurface_lookup_host — Infrastructure intelligence for a single IP (open ports, banners, software versions, ASN, geo) or a faceted internet-wide search, via Shodan
  • attacksurface_recon_guidance — Offline synthesis over findings gathered so far. Returns a prioritized defensive review plan plus pre-filled follow-up calls (which certs to
  • Prerequisites — The Prerequisites tool exposed by this server
  • Installation — The Installation tool exposed by this server

Credentials and setup notes

Configuration is passed through the environment: MCP_TRANSPORT_TYPE, MCP_LOG_LEVEL, SHODAN_API_KEY, CERTSPOTTER_API_KEY, ATTACKSURFACE_RDAP_BOOTSTRAP_URL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Attack.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Among the cloud and infrastructure options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Attack's toolset — attacksurface_map_domain, attacksurface_enumerate_subdomains, attacksurface_resolve_dns and 7 more — is a fair guide to whether it matches your workflow. It is maintained by cyanheads; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Available tools

ToolWhat it does
attacksurface_map_domainFlagship workflow. Maps a domain's external surface end to end: CT-log subdomain discovery → DNS liveness → (standard+) DNS records, TLS posture, HTTP headers/tech → optional RDAP/WHOIS → (thorough + key) per-IP Shodan e
attacksurface_enumerate_subdomainsPassive subdomain discovery from Certificate Transparency logs (crt.sh → Certspotter → TLS-SAN fallback chain), with DNS resolution to mark which names are live. Per-source provenance; no DNS brute-forcing.
attacksurface_resolve_dnsResolve and enumerate DNS records (A/AAAA/CNAME/MX/NS/TXT/CAA) for one or more hosts across multiple public resolvers, with optional reverse DNS (PTR). Per-resolver values surface propagation gaps.
attacksurface_inspect_tlsInspect TLS/SSL posture via a real read-only handshake: protocol, cipher, full certificate chain, SANs, validity window, days-to-expiry, issuer, validation status. Reports invalid/expired/self-signed certs instead of fai
attacksurface_probe_httpPassive HTTP(S) probe: one GET following redirects. Returns status, redirect chain, headers, a security-header audit (HSTS/CSP/X-Frame-Options/cookie flags/CORS reflection), and an evidence-bound technology fingerprint.
attacksurface_lookup_registrationRegistration and ownership lookup via RDAP (JSON; WHOIS fallback). A domain returns registrar, status, lifecycle events, nameservers, DNSSEC; an IP/CIDR returns netblock, allocation CIDRs, origin ASN, country.
attacksurface_lookup_hostInfrastructure intelligence for a single IP (open ports, banners, software versions, ASN, geo) or a faceted internet-wide search, via Shodan. **Requires SHODAN_API_KEY** — returns a typed source_unavailable error when un
attacksurface_recon_guidanceOffline synthesis over findings gathered so far. Returns a prioritized **defensive** review plan plus pre-filled follow-up calls (which certs to renew, which hosts to inspect, which software versions to check for CVEs ag
PrerequisitesThe Prerequisites tool exposed by this server.
InstallationThe Installation tool exposed by this server.

How to install the Attack MCP server

{
  "mcpServers": {
    "attack-surface-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/attack-surface-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
MCP_TRANSPORT_TYPEConfiguration value read at startup.Optional
MCP_LOG_LEVELConfiguration value read at startup.Optional
SHODAN_API_KEYCredential the server authenticates with.Yes
CERTSPOTTER_API_KEYCredential the server authenticates with.Yes
ATTACKSURFACE_RDAP_BOOTSTRAP_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Attack to attacksurface map domain.
  • Use Attack to attacksurface enumerate subdomains.
  • Use Attack to attacksurface resolve dns.

Frequently asked questions

It connects Attack to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (attacksurface_map_domain, attacksurface_enumerate_subdomains, attacksurface_resolve_dns, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Attack directly.