Skip to content
VS Code

attack surface mcp server for VS Code

io.github.cyanheads/attack-surface-mcp-server

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

client:VS Code transport:stdio runtime:npm

Install attack surface mcp server in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "shodan-api-key",
      "description": "SHODAN_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "certspotter-api-key",
      "description": "CERTSPOTTER_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "attacksurface-default-resolvers",
      "description": "ATTACKSURFACE_DEFAULT_RESOLVERS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "attacksurface-http-user-agent",
      "description": "ATTACKSURFACE_HTTP_USER_AGENT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "attacksurface-max-subdomains",
      "description": "ATTACKSURFACE_MAX_SUBDOMAINS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "attacksurface-rdap-bootstrap-url",
      "description": "ATTACKSURFACE_RDAP_BOOTSTRAP_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "attacksurface-allow-private-targets",
      "description": "ATTACKSURFACE_ALLOW_PRIVATE_TARGETS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mcp-log-level",
      "description": "MCP_LOG_LEVEL",
      "password": true
    }
  ],
  "servers": {
    "attack-surface-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cyanheads/attack-surface-mcp-server"
      ],
      "env": {
        "SHODAN_API_KEY": "${input:shodan-api-key}",
        "CERTSPOTTER_API_KEY": "${input:certspotter-api-key}",
        "ATTACKSURFACE_DEFAULT_RESOLVERS": "${input:attacksurface-default-resolvers}",
        "ATTACKSURFACE_HTTP_USER_AGENT": "${input:attacksurface-http-user-agent}",
        "ATTACKSURFACE_MAX_SUBDOMAINS": "${input:attacksurface-max-subdomains}",
        "ATTACKSURFACE_RDAP_BOOTSTRAP_URL": "${input:attacksurface-rdap-bootstrap-url}",
        "ATTACKSURFACE_ALLOW_PRIVATE_TARGETS": "${input:attacksurface-allow-private-targets}",
        "MCP_LOG_LEVEL": "${input:mcp-log-level}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

attack surface mcp server in other clients