# B2B Domain, DMARC, SPF, MX & TLS Security Audit (MCP)

> Audit B2B domains via live RFC protocols for DNS MX email providers, SPF SaaS stacks, DMARC spoofing risk, port 443 TLS X.509 certificates, IANA RDAP domain age, RIPEstat BGP ASNs, 0-100 security posture scores, and MSP sales triggers via remote MCP.

B2B Domain, DMARC, SPF, MX & TLS Security Audit (MCP) is a free AI agent skill on Agensi by Ignacio De Saeger, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ignacio De Saeger](https://www.agensi.io/creators/ignacio-de-saeger)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.1
- Last updated: 2026-11-30
- Security: scan passed (2026-11-30); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/b2b-domain-dmarc-spf-mx-tls-security-audit-mcp
- Tags: security, sales-lead-gen, devops-cloud, domain-security, dmarc-spf-mx, technographics, msp-leads, cybersecurity-audit

## About this skill

### B2B Domain, Email Security (DMARC/SPF/MX), TLS & RDAP Posture

Inspect single or bulk B2B domains, website URLs, and email addresses across four live RFC infrastructure layers—native DNS (`MX`, `SPF`, `DMARC`, `NS`, root `TXT`), direct port `443` TLS SNI handshakes, official **IANA RDAP** registries (`data.iana.org`), and **RIPEstat BGP/ASN** routing (`stat.ripe.net`)—returning `0–100` security grades (`A`–`F`), SaaS technographics, and actionable `mspSalesTrigger` talking points.

#### When to Use This Skill

**Activate this skill when the user wants to:**
- Check whether one or more domains are vulnerable to email spoofing (`emailSpoofingVulnerable: true` due to missing DMARC or `p=none` monitoring-only policies) or permissive SPF (`+all` / `?all` / `~all`).
- Detect a company's email provider (`Google Workspace`, `Microsoft 365`, `Proofpoint`, `Mimecast`, `Proton Mail`), DNS host (`Cloudflare`, `AWS Route53`), cloud ASN holder, and third-party SPF/TXT SaaS stack (`HubSpot`, `Salesforce`, `SendGrid`, `Zendesk`, `DocuSign`).
- Verify domain registration age (`domainAgeDays`), registrar, and `<90`-day newly registered shell-company risk (`newlyRegisteredShellRisk`) for fraud/KYB screening.
- Audit live port `443` TLS certificate validity, issuing CA, days until expiration (`daysUntilCertExpiry`), and Subject Alternative Name (`SAN`) subdomains.

**Do NOT use this skill when:**
- Guessing personal employee email addresses, scraping LinkedIn profiles, or performing intrusive port scanning / vulnerability exploitation (this tool executes strictly passive/standard RFC DNS, port 443 TLS SNI, RDAP, and BGP queries).
- Looking up corporate legal filings, SEC disclosures, FDA recalls, or federal contracts (combine with `us-kyb-compliance-dossier` for legal-entity KYB).

#### Connect the Remote MCP Server

This skill connects to the live Apify Standby Streamable HTTP MCP server (`$0.50 / 1,000 domains` launch pay-per-event rate; `$1.50 / 1,000` standard rate; zero third-party WHOIS/DNS API keys required).

- **Remote Streamable HTTP MCP Endpoint:** `https://desastreger--b2b-domain-mail-security-posture.apify.actor/mcp`
- **Authentication Header:** `Authorization: Bearer $APIFY_TOKEN`

##### Claude Code CLI
```bash
claude mcp add --transport http b2b-domain-mail-security-posture https://desastreger--b2b-domain-mail-security-posture.apify.actor/mcp \
  --header "Authorization: Bearer $APIFY_TOKEN"
```

##### Cursor / Claude Desktop (`mcp.json` / `claude_desktop_config.json`)
```json
{
  "mcpServers": {
    "b2b-domain-mail-security-posture": {
      "url": "https://desastreger--b2b-domain-mail-security-posture.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

##### Apify REST API Fallback (cURL / Scripts / Clay / n8n)
For larger domain lists (>50 domains in a single run) or automated webhook pipelines:
```bash
curl -sS -X POST "https://api.apify.com/v2/acts/desastreger~b2b-domain-mail-security-posture/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": ["apify.com", "stripe.com", "https://www.cloudflare.com"],
    "includeTlsCertCheck": true,
    "includeRdapDomainAge": true,
    "includeBgpAsnLookup": true,
    "concurrency": 5
  }'
```

#### MCP Tools & Parameter Selection

| MCP Tool | Purpose | Key Arguments & Defaults |
| :--- | :--- | :--- |
| `audit_domain_posture` | Deep real-time RFC security & technographic audit of a single domain, URL, or email address. | `domain` (required string: raw domain, URL, or email like `"ceo@stripe.com"`), `includeTlsCertCheck` (`true`), `includeRdapDomainAge` (`true`), `includeBgpAsnLookup` (`true`). |
| `batch_audit_domains` | Parallel multi-domain posture audit (`1–50` domains per MCP call) with automatic deduplication. | `domains` (required `string[]`, max `50` per MCP call), `includeTlsCertCheck` (`true`), `includeRdapDomainAge` (`true`), `includeBgpAsnLookup` (`true`), `concurrency` (`5` default, `1–20`). |

##### Parameter Selection Rules
1. **Input Normalization:** Pass raw domains, full `https://` URLs, or email addresses (`sales@company.com`) directly—the server automatically strips schemes/paths/mailboxes and deduplicates normalized hostnames.
2. **Speed Optimization for Pure Mail/GTM Runs:** When the user only needs MX email provider, SPF SaaS stack, and DMARC status across dozens of domains, set `includeTlsCertCheck: false`, `includeRdapDomainAge: false`, and `includeBgpAsnLookup: false` with `concurrency: 10` for sub-second DNS-only execution.
3. **Full KYB & MSP Security Mode:** Keep all three boolean flags `true` (default) when auditing vendor legitimacy (`newlyRegisteredShellRisk`), SSL expiry (`daysUntilCertExpiry`), or full `0–100` `securityScore` grades.

##### Canonical MCP Tool Call Payloads

**Single-Domain Deep Audit (`audit_domain_posture`):**
```json
{
  "domain": "stripe.com",
  "includeTlsCertCheck": true,
  "includeRdapDomainAge": true,
  "includeBgpAsnLookup": true
}
```

**Parallel Prospect Batch (`batch_audit_domains`):**
```json
{
  "domains": [
    "apify.com",
    "https://www.cloudflare.com",
    "sales@hubspot.com"
  ],
  "includeTlsCertCheck": true,
  "includeRdapDomainAge": true,
  "includeBgpAsnLookup": true,
  "concurrency": 5
}
```

##### Interpreting Posture Signals & GTM Triggers

| Output Field | High-Signal Values | Actionable Security / GTM Interpretation |
| :--- | :--- | :--- |
| `emailSpoofingVulnerable` | `true` (`dmarcPresent: false` or `dmarcPolicy: "none"`) | Domain lacks enforced DMARC (`quarantine`/`reject`), exposing executives and customers to spoofing; prime MSP/MSSP outbound hook via `mspSalesTrigger`. |
| `emailProvider` & `hasEmailSecurityGateway` | `Microsoft 365` / `Google Workspace` + `false` | Cloud inbox without Proofpoint/Mimecast/Barracuda perimeter gateway — ideal target for API-native cloud email security solutions. |
| `detectedSaasSenders` | `["HubSpot", "Salesforce", "SendGrid", ...]` | Verified third-party marketing/CRM/support platforms authorized in DNS SPF/TXT records for RevOps technographic segmentation. |
| `newlyRegisteredShellRisk` | `true` (`domainAgeDays < 90`) | Authoritative IANA RDAP registration is under 90 days old — escalate immediately in vendor KYB, wire-payment, or procurement workflows. |
| `daysUntilCertExpiry` | `<= 30` or `tlsAuthorized: false` | Imminent port `443` HTTPS outage or untrusted certificate chain requiring immediate DevOps remediation. |

See references/schema-and-examples.md for the complete 45-field output schema and 3 concrete B2B recipes.

#### Execution Workflow

Follow this deterministic 4-step workflow on every invocation:

1. **Scoping & Cost-Aware Sizing:** Deduplicate candidate domains/URLs/emails first. Use `audit_domain_posture` for a single target or `batch_audit_domains` in chunks of up to `50` domains per MCP call (`$0.025` per 50 domains at launch pricing).
2. **Tool Call & Filtering:** Execute the audit with appropriate protocol flags (`TLS`, `RDAP`, `BGP`). Filter out non-existent domains (`domainExists: false`) separately from live misconfigured domains.
3. **Cross-Field Normalization & Ranking:** For MSP/security prospecting, rank live domains with `emailSpoofingVulnerable: true`, expiring certs (`daysUntilCertExpiry <= 30`), or low `securityScore` (`securityGrade` `C`/`D`/`F`) at the top. For KYB risk triage, flag `newlyRegisteredShellRisk: true` (`domainAgeDays < 90`) immediately.
4. **Structured Deliverable Output:** Present findings using templates/report-template.md, pairing each `domain` with its exact `emailProvider`, `dmarcPolicy`, `spfAllQualifier`, `detectedSaasSenders`, `domainAgeDays`, `securityScore`, and `mspSalesTrigger` remediation hooks.

#### Data Provenance & Safety Rules

- **Anchor to Verifiable RFC Evidence:** Cite the exact normalized `domain`, `primaryMx`, `spfRecord` / `spfAllQualifier`, `dmarcRecord` / `dmarcPolicy`, TLS `issuerOrg`, IANA RDAP `registeredAt` / `registrarName`, BGP `asn` / `asnHolder`, and `auditedAt` timestamp.
- **Zero Fabrication of Contacts or Vulnerabilities:** Report only observed DNS/TLS/RDAP/BGP states. If a TLD registry does not support RDAP (`domainAgeDays: null`) or port 443 is closed on a mail-only domain (`tlsReachable: false`), state that explicitly rather than inventing registration dates or claiming a breach.
- **Transparent Warnings & Budget Caps:** Surface `budgetCapReached: true`, `AUDIT_ERROR` signals in `riskAndSalesSignals`, or any `escalationWarnings` clearly in the report summary.

## Requires

- Apify API token (free $5/mo tier)
- Optional: Streamable HTTP MCP client

Connects over remote Streamable HTTP MCP (mcp.apify.com) or direct REST API fallback using your APIFY_TOKEN.

## Known limitations

Covers official public registry filings and RFC records only; never scrapes login-walled sites or fabricates unverified personal contact details.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the B2B Domain, DMARC, SPF, MX & TLS Security Audit (MCP) skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Do I need paid third-party vendor API keys (SEC, GLEIF, Grants.gov, PubMed, EPA)?

No. All underlying official US/EU public registries are queried deterministically by the remote Apify MCP server with zero upstream API keys required.

### How does usage billing work?

This Agensi skill is 100% free. Live MCP/API runs on Apify use your own Apify account (which includes $5/month in free platform credits—enough for ~5,000 to 10,000 leads at our $0.50–$1.00/1k early-adopter PPE rates).

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
