Passive attack-surface mapping server that discovers subdomains from Certificate Transparency logs, resolves DNS, inspects TLS and HTTP posture, performs RDAP/WHOIS lookups, and optionally enriches IPs with Shodan. It exposes these capabilities as MCP tools and a resource for mapping a domain's external surface.
From the registry: Passive external attack-surface mapping: CT subdomains, DNS, TLS, HTTP posture, RDAP/WHOIS, Shodan.
Please install the `attack-surface-mcp-server` MCP server into my current AI client (that's you).
Optional prerequisites:
- Install Node.js or Bun — Install Bun v1.3.11+ or Node.js v24+ to run the server. Prefer Node.js if using the npx install path. (https://bun.sh/)
- Optional Shodan API key — Required only to enable the attacksurface_lookup_host tool. Without it, the rest of the server works and that tool returns source_unavailable. (https://account.shodan.io/)
- Optional Certspotter API key — Raises Certspotter rate limits for the CT-log subdomain fallback. The server remains functional without it. (https://sslmate.com/certspotter/api/)
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","@cyanheads/attack-surface-mcp-server@latest"]
- optional environment variables:
- `MCP_TRANSPORT_TYPE`: Transport mode. Set to stdio for MCP client stdio usage. (example: `stdio`)
- `MCP_LOG_LEVEL`: Log level (RFC 5424). (example: `info`)
- `SHODAN_API_KEY`: Enables attacksurface_lookup_host. Without it, only that tool is unavailable. (example: `<your-shodan-api-key>`)
- `CERTSPOTTER_API_KEY`: Raises Certspotter API rate limits for CT fallback. (example: `<your-certspotter-api-key>`)
- `ATTACKSURFACE_DEFAULT_RESOLVERS`: Comma-separated default DNS resolver IPs for attacksurface_resolve_dns. (example: `<resolver-ip-1>,<resolver-ip-2>,<resolver-ip-3>`)
- `ATTACKSURFACE_HTTP_USER_AGENT`: Default User-Agent for attacksurface_probe_http. (example: `<your-user-agent>`)
- `ATTACKSURFACE_MAX_SUBDOMAINS`: Cap on subdomains resolved during a map_domain run. (example: `<max-subdomains>`)
- `ATTACKSURFACE_RDAP_BOOTSTRAP_URL`: RDAP bootstrap base URL override. (example: `<your-rdap-bootstrap-url>`)
- `ATTACKSURFACE_ALLOW_PRIVATE_TARGETS`: Set true to disable the SSRF guard for internal-network assessment. (example: `<true-or-false>`)
- `MCP_HTTP_PORT`: Port for HTTP transport mode. (example: `<port>`)
- `MCP_AUTH_MODE`: Auth mode: none, jwt, or oauth. (example: `<none-or-jwt-or-oauth>`)
- `OTEL_ENABLED`: Enable OpenTelemetry instrumentation. (example: `<true-or-false>`)
Note: README also documents Streamable HTTP support. For HTTP mode, start the server with MCP_TRANSPORT_TYPE=http; it listens on /mcp, with MCP_HTTP_PORT defaulting to 3010. Canonical stdio config chosen because it is the simplest portable client configuration path.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.SHODAN_API_KEYrequiredRequired for the Shodan-based host lookup tool.Dead code, security, secrets detection and code quality for Python, TypeScript, Go.