# Zero-DOM DNS, Email Auth & SEO Hygiene MCP Actor (`autonomycorp/zero-dom-dns-seo-audit-mcp-actor`) Actor

Python stdlib Zero-DOM domain hygiene auditor and MCP server checking Cloudflare DoH DNS (A, AAAA, MX, SPF, DMARC), port 443 TLS certificates, robots.txt, HTTP security headers, and HTML SEO tags with strict SSRF protection.

- **URL**: https://apify.com/autonomycorp/zero-dom-dns-seo-audit-mcp-actor.md
- **Developed by:** [Kenz Labs](https://apify.com/autonomycorp) (community)
- **Categories:** SEO tools, MCP servers, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 domain hygiene audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Zero-DOM DNS, TLS & SEO Hygiene MCP Actor

[![Apify Actor](https://img.shields.io/badge/Apify-Pay--Per--Event%20%240.02-blue.svg)](https://apify.com/autonomyCorp/zero-dom-dns-seo-audit-mcp-actor)
[![Model Context Protocol](https://img.shields.io/badge/MCP-Stdio%20%26%20HTTP-green.svg)](https://modelcontextprotocol.io)
[![Zero Dependencies](https://img.shields.io/badge/Runtime-Python%203.10%2B%20Stdlib-brightgreen.svg)]()

> **Sub-Second Domain Security & SEO Audits Without Headless Browsers**: Inspect Cloudflare DoH DNS (`A`, `AAAA`, `MX`, `SPF`, `DMARC`), port 443 TLS certificates, `robots.txt` (`<4 KB`), HTTP security headers, and HTML SEO metadata (`<15 KB`) in pure Python stdlib with strict SSRF protection.

***

### Value Proposition & Transparent Pricing

Most SEO and technical audit actors launch full Chromium containers (consuming 2–4 GB RAM and megabytes of JS/CSS traffic per URL). This Actor executes **Zero-DOM bounded wire audits** (`<28 KB` total per domain) using Python's standard library.

- **DNS & Email Authentication (Cloudflare DoH)**: Queries `A`, `AAAA`, `MX`, `TXT` (`v=spf1`), and `_dmarc.<domain>` `TXT` (`v=DMARC1`, `p=` policy) with an `8,192` byte cap.
- **TLS Certificate (Port 443)**: Verifies certificate validity, subject CN, SANs, issuer, `notAfter` UTC timestamp, and remaining days.
- **HTTP Security & SEO (`<15 KB`)**: Fetches `/robots.txt` (`4,096` byte cap) and `/` HTML (`15,360` byte cap), extracting HSTS, CSP, X-Frame-Options, `<title>`, `<meta name="description">`, canonical, `<h1>` count, and `og:title`.
- **Transparent Pay-Per-Event Pricing**: **$0.02 per event** (`domain-hygiene-audit`, `dns-email-auth-check`) — zero headless browser compute waste, zero fabricated scores.

***

### Copy-Paste MCP Client Configs (Claude Desktop, Cursor, Antigravity)

Install locally (`pip install .`) to run via `stdio`, or connect directly to the hosted Apify MCP Standby endpoint (`https://mcp.apify.com/?actors=autonomycorp/zero-dom-dns-seo-audit-mcp-actor`) or run locally (`python3 -m zero_dom_dns_seo_mcp.mcp_server --transport http --port 8080`).

#### Claude Desktop (`claude_desktop_config.json`) — Stdio

```json
{
  "mcpServers": {
    "zero-dom-dns-seo-audit": {
      "command": "python3",
      "args": [
        "-m",
        "zero_dom_dns_seo_mcp.mcp_server",
        "--transport",
        "stdio"
      ]
    }
  }
}
```

#### Cursor (`.cursor/mcp.json`) — Stdio & Hosted Apify MCP

```json
{
  "mcpServers": {
    "zero-dom-dns-seo-audit": {
      "command": "python3",
      "args": [
        "-m",
        "zero_dom_dns_seo_mcp.mcp_server",
        "--transport",
        "stdio"
      ]
    },
    "zero-dom-dns-seo-audit-apify": {
      "url": "https://mcp.apify.com/?actors=autonomycorp/zero-dom-dns-seo-audit-mcp-actor"
    }
  }
}
```

#### Antigravity (`mcp_config.json`) — Stdio

```json
{
  "mcpServers": {
    "zero-dom-dns-seo-audit": {
      "command": "python3",
      "args": [
        "-m",
        "zero_dom_dns_seo_mcp.mcp_server",
        "--transport",
        "stdio"
      ]
    }
  }
}
```

***

### Sample Input & Verified JSON Output

#### Sample Input

```json
{
  "action": "audit_domain_hygiene",
  "domain": "python.org",
  "include_dns": true,
  "include_tls": true,
  "include_http_seo": true,
  "use_cache": true,
  "timeout_seconds": 5
}
```

#### Verified Sample Output

```json
{
  "domain": "python.org",
  "action": "audit_domain_hygiene",
  "status": "SUCCEEDED",
  "checked_at_utc": "2026-11-15T16:40:00+00:00",
  "sharia_allowed": true,
  "ssrf_allowed": true,
  "dns": {
    "domain": "python.org",
    "a_records": ["151.101.0.223"],
    "mx_records": ["50 mail.python.org."],
    "has_spf": true,
    "has_dmarc": true,
    "dmarc_policy": "reject",
    "bytes_transferred": 912
  },
  "tls": {
    "domain": "python.org",
    "port": 443,
    "is_valid": true,
    "issuer": "GlobalSign nv-sa",
    "days_remaining": 140
  },
  "http_seo": {
    "final_url": "https://www.python.org/",
    "status_code": 200,
    "robots_txt_status": 200,
    "robots_txt_allows_root": true,
    "title": "Welcome to Python.org",
    "h1_count": 1,
    "html_bytes_read": 15360,
    "truncated": true
  }
}
```

***

### Exposed MCP Tools & Apify Cloud Usage

1. `audit_domain_hygiene` — Full Cloudflare DoH + port 443 TLS + `/robots.txt` + HTTP headers/SEO audit.
2. `check_dns_email_auth` — Fast Cloudflare DoH DNS, SPF, and DMARC posture check.

#### Apify Cloud cURL Example

```bash
curl -X POST "https://api.apify.com/v2/acts/autonomyCorp~zero-dom-dns-seo-audit-mcp-actor/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "audit_domain_hygiene",
    "domain": "python.org",
    "include_dns": true,
    "include_tls": true,
    "include_http_seo": true
  }'
```

#### Python SDK Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("autonomyCorp/zero-dom-dns-seo-audit-mcp-actor").call(
    run_input={
        "action": "audit_domain_hygiene",
        "domain": "python.org",
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["domain"], item["status"], item["tls"]["is_valid"])
```

***

### Honest Failure Modes & Guardrails

- **SSRF Firewall (`BLOCKED_SSRF`)**: Rejects loopback, RFC 1918 private subnets, `169.254.0.0/16` metadata, CGNAT `100.64.0.0/10`, multicast, IPv6 ULA/link-local/NAT64/6to4/Teredo tunnels, and non-HTTPS targets. Redirects are validated hop-by-hop with IP pinning and a `3`-hop limit.
- **Sector Policy Screen (`BLOCKED_SHARIA`)**: Rejects gambling, adult content, interest-based lending/banking, alcohol, tobacco, pork, and weapons domains before network connections occur.
- **Fail-Closed Network Errors**: Raises `RuntimeError` when Cloudflare DoH, port 443 TLS handshake, or target HTTP transport fails or exceeds byte limits. Never falls back to synthetic data.
- **Byte Truncation**: Homepage HTML larger than `15,360` bytes sets `"truncated": true`. Tags located past `15,360` bytes are not parsed.

***

### Maintainer, Engineering Suite & License

- **License**: MIT
- **Maintainer**: Kenz Labs (`kenzailab@gmail.com`)
- **Engineering Suite**: [iktisad Token & Bandwidth Efficiency MCP](https://shiny-apricot.github.io/iktisad/) | [GitHub](https://github.com/shiny-apricot) | [Apify Actor](https://apify.com/autonomyCorp/zero-dom-dns-seo-audit-mcp-actor)

# Actor input Schema

## `action` (type: `string`):

Audit operation to execute

## `domain` (type: `string`):

Public domain name or HTTPS URL to audit (e.g. python.org)

## `include_dns` (type: `boolean`):

Query Cloudflare DoH for A, AAAA, MX, TXT (SPF), and \_dmarc TXT records

## `include_tls` (type: `boolean`):

Inspect port 443 TLS certificate CN, SANs, issuer, and expiry

## `include_http_seo` (type: `boolean`):

Fetch robots.txt (<4 KB) and homepage HTML (<15 KB) over SSRF-guarded HTTPS

## `upgrade_http_to_https` (type: `boolean`):

Upgrade http:// URLs and redirects to https:// before connecting

## `use_cache` (type: `boolean`):

Reuse cached audit reports within the 300s TTL window

## `timeout_seconds` (type: `number`):

Per-request socket/HTTP timeout in seconds (1-15)

## Actor input object example

```json
{
  "action": "audit_domain_hygiene",
  "domain": "python.org",
  "include_dns": true,
  "include_tls": true,
  "include_http_seo": true,
  "upgrade_http_to_https": true,
  "use_cache": true,
  "timeout_seconds": 5
}
```

# Actor output Schema

## `resultsDataset` (type: `string`):

Dataset containing verified DNS (A, AAAA, MX, SPF, DMARC), TLS certificate, robots.txt, security headers, and HTML SEO audit reports.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "action": "audit_domain_hygiene",
    "domain": "python.org",
    "include_dns": true,
    "include_tls": true,
    "include_http_seo": true,
    "upgrade_http_to_https": true,
    "use_cache": true,
    "timeout_seconds": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("autonomycorp/zero-dom-dns-seo-audit-mcp-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "action": "audit_domain_hygiene",
    "domain": "python.org",
    "include_dns": True,
    "include_tls": True,
    "include_http_seo": True,
    "upgrade_http_to_https": True,
    "use_cache": True,
    "timeout_seconds": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("autonomycorp/zero-dom-dns-seo-audit-mcp-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "action": "audit_domain_hygiene",
  "domain": "python.org",
  "include_dns": true,
  "include_tls": true,
  "include_http_seo": true,
  "upgrade_http_to_https": true,
  "use_cache": true,
  "timeout_seconds": 5
}' |
apify call autonomycorp/zero-dom-dns-seo-audit-mcp-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,autonomycorp/zero-dom-dns-seo-audit-mcp-actor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/EjbHH4EEQMFdAdojd/builds/7kMXyaHgzLfiNKIhZ/openapi.json
