MCP server for domain and email security audits — SPF, DKIM, DMARC, MTA-STS, BIMI, DNSSEC, DNS, TLS/SSL and WHOIS. No API keys required.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add domain-security -- npx -y domain-security-mcp-server{
"mcpServers": {
"domain-security": {
"command": "npx",
"args": ["-y", "domain-security-mcp-server"],
"env": {
"MCP_AUTH_TOKEN": "<mcp_auth_token>"
}
}
}
}MCP_AUTH_TOKENResumen de MCP Servers
# domain-security-mcp-server
> An [MCP](https://modelcontextprotocol.io) server that lets an AI agent audit the **email and domain security** of any domain — SPF, DKIM, DMARC, MTA-STS, TLS-RPT, BIMI, DNSSEC, DNS, TLS/SSL and WHOIS — in plain language. **No API keys required.**
[](https://github.com/OrtaMarco/domain-security-mcp-server/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/domain-security-mcp-server)
[](https://modelcontextprotocol.io)
[](https://www.typescriptlang.org/)
[](./LICENSE)
Built on the **v2 MCP SDK**: the server speaks the **2026-07-28** protocol
revision and keeps accepting 2025-era clients (Claude Desktop, Claude Code,
Cursor) from the same factory — the era is negotiated per connection, so there
is nothing to configure on either side.
Ask Claude *"Is acme.com protected against email spoofing?"* and it runs a full
authentication audit and hands you a graded report with prioritised fixes —
instead of you pasting a domain into five different web tools.
```
> Is ortamarco.me protected against email spoofing?
email_auth_audit(domain="ortamarco.me")
Grade: A (95/100) · MX: present
✅ SPF ends in '-all' (hard fail). 3/10 DNS lookups.
✅ DMARC policy is enforced ('p=reject').
✅ DKIM key found for selector: google.
Top recommendation: add a TLS-RPT record for delivery-failure reports.
```
---
## Why this exists
The email-security ecosystem is full of single-purpose web checkers (SPF here,
DMARC there, WHOIS somewhere else) and the few MCP equivalents are locked behind
paid API tokens. This server brings the whole **deliverability & domain-security
toolkit** to any MCP client, key-free, with one headline workflow tool that does
the synthesis for you.
It is the agent-facing companion to the network tools at
[ortamarco.me](https://ortamarco.me) and shares the same battle-tested core
(public-resolver DNS, host validation, timeouts).
## Tools
| Tool | What it does |
|---|---|
| **`email_auth_audit`** ⭐ | One-call SPF + DKIM + DMARC + MX audit → 0–100 score, A–F grade, prioritised fixes |
| `spf_check` | Parse SPF; recursively count DNS lookups vs the RFC 7208 limit of 10; flag `+all`/`?all` |
| `dmarc_check` | Parse DMARC policy (`p`, `sp`, `rua`, `pct`, `aspf`/`adkim`) with warnings |
| `dkim_check` | Probe `<selector>._domainkey` keys (supply selectors or use common ones) |
| `mta_sts_check` | Validate the `_mta-sts` TXT **and** the `.well-known/mta-sts.txt` policy + mode |
| `tls_rpt_check` | Check the `_smtp._tls` TLS-RPT record |
| `bimi_check` | Check the `default._bimi` BIMI record |
| `dnssec_check` | DS/DNSKEY presence + DNSSEC `AD` validation flag (via DoH) |
| `dns_lookup` | All record types (A/AAAA/CNAME/MX/NS/TXT/SOA) via public resolvers |
| `ssl_certificate` | TLS cert issuer, validity window, days-to-expiry, SANs, fingerprint |
| `whois_lookup` | Registrar, dates, name servers, status (raw port-43 WHOIS, IANA-resolved) |
| `reverse_dns` | PTR records for an IP |
| `ip_geolocation` | Offline IP geolocation ([DB-IP Lite](https://db-ip.com)) + reverse DNS |
| `mx_lookup` | Mail servers (MX) with priority and resolved IPs |
| `caa_check` | Which CAs may issue TLS certificates (CAA records) |
| `blacklist_check` | IP/domain against open-access email DNSBLs |
| `dns_propagation` | Compare a record across 5 public resolvers worldwide |
| `http_security_headers` | Grade a site's HSTS, CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy and COOP |
| `analyze_email_headers` | Parse raw headers → SPF/DKIM/DMARC verdicts + Received hop chain with delays |
Every tool is **read-only**, declares an `outputSchema` and returns
`structuredContent` (validated by the SDK) alongside human-readable Markdown
(default) or JSON (`response_format="json"`), plus actionable error messages.
## Install
Requires **Node.js 20.18+**. Nothing to clone — every MCP client can run it with `npx`.
## Use it with Claude Code
```bash
claude mcp add domain-security -- npx -y domain-security-mcp-server
```
## Use it with Claude Desktop or Cursor
Add to `claude_desktop_config.json` (or `~/.cursor/mcp.json`) — see [`examples/`](./examples/claude_desktop_config.json):
```json
{
"mcpServers": {
"domain-security": {
"command": "npx",
"args": ["-y", "domain-security-mcp-server"]
}
}
}
```
On Windows use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "domain-security-mcp-server"]`.
Restart the client, then ask: *"Audit the email security of stripe.com."*
## Self-host (HTTP transport)
The same server speaks stateless **Streamable HTTP** for remote or multi-client
use. One endpoint serves both protocol eras and there is no session state, so no
`Mcp-Session-Id` header is issued or expected.
```bash
TRANSPORT=http npx -y domain-security-mcp-server
# POST JSON-RPC to http://127.0.0.1:3000/mcp · health at /healthz
```
It is **safe by default**: it binds to `127.0.0.1` and only accepts `localhost`
`Host` and `Origin` headers, which blocks DNS-rebinding attacks from a web page.
To expose it — for example behind Coolify or Traefik — opt in explicitly:
| Variable | Default | Purpose |
|---|---|---|
| `TRANSPORT` | `stdio` | `http` to serve Streamable HTTP |
| `PORT` | `3000` | Listening port |
| `HOST` | `127.0.0.1` | Bind address; `0.0.0.0` to accept remote connections |
| `ALLOWED_HOSTS` | — | Comma-separated hostnames the `Host` header may carry (e.g. `mcp.example.com`) |
| `ALLOWED_ORIGINS` | — | Comma-separated origins allowed to call from a browser |
| `MCP_AUTH_TOKEN` | — | If set, every request needs `Authorization: Bearer <token>` |
Binding to a non-loopback address without `ALLOWED_HOSTS` or `MCP_AUTH_TOKEN`
works, but the server says so on stderr. With Docker (the image sets `HOST=0.0.0.0`):
```bash
docker build -t domain-security-mcp .
docker run -p 3000:3000 -e ALLOWED_HOSTS=mcp.example.com -e MCP_AUTH_TOKEN=change-me domain-security-mcp
```
## Security
The tools reach out to hosts that the *caller* names, so every outbound
connection is screened against server-side request forgery:
- Private, loopback, link-local (cloud metadata), shared, multicast and reserved
addresses are refused in every spelling, including IPv4 embedded in IPv6
(`[::ffff:169.254.169.254]`).
- The check happens **at connect time**, on the address the socket is actually
about to use, so DNS rebinding and names only an internal resolver knows are
refused too. Redirects are followed by hand and every hop is re-checked.
- Response bodies, redirects, WHOIS referrals and every network call are capped
and time-limited.
Found a problem? Please open a [private security advisory](https://github.com/OrtaMarco/domain-security-mcp-server/security/advisories/new).
## Develop
```bash
npm run dev # tsx watch (stdio)
npm run inspect # open the MCP Inspector against the built server
npm run build # type-check + emit dist/
npm run typecheck # type-check only
npm test # offline unit tests: SSRF guard, SPF/DMARC/DKIM scoring,
# header parsing, HTTP transport defaults
npm run smoke # call all 19 tools on BOTH protocol eras and validate
# structuredContent against each tool's outputSchema
```
[`evals/`](./evals/) holds a 10-question LLM evaluation set (stable, verifiable)
and instructions for running it — see [`evals/README.md`](./evals/README.md).
## How it works
```
src/
├── index.ts # transport selection (stdio | http), v2 SDK entry points
├── server.ts # factory: registers every tool on one McpServer
├── core/ # pure logic, no MCP coupling — reusable & testable
│ ├── validate.ts # input validation and the address classifier
│ ├── netguard.ts # connect-time SSRF guard, redirect-safe fetch, capped bodies
│ ├── dns.ts # public-resolver DNS + DoH client
│ ├── net.ts # MX, CAA, DNSBL and propagation checks
│ ├── tls.ts # certificate inspection and trust
│ ├── whois.ts # port-43 WHOIS with IANA/registrar referral
│ ├── http.ts # security-header grading
│ ├── geoip.ts # offline IP geolocation on DB-IP Lite (each file read on first use)
│ ├── email-headers.ts # raw header parsing and hop timing
│ └── email-auth.ts # SPF/DKIM/DMARC/MTA-STS/TLS-RPT/BIMI/DNSSEC + scoring
└── tools/ # thin MCP wrappers (Zod schemas, descriptions, formatting)
```
The `core/` layer is deliberately free of any MCP types, so the exact same logic
powers both this server and the web tools on ortamarco.me.
## Credits
<a href='https://db-ip.com'>IP Geolocation by DB-IP</a>. `ip_geolocation` uses the
free DB-IP "IP to City Lite" database, licensed under
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) and installed as the
[`@ip-location-db/dbip-city-mmdb`](https://www.npmjs.com/package/@ip-location-db/dbip-city-mmdb)
package; the credit also appears in the tool's description and Markdown output. The
database has no time zone, so `time_zone` is estimated from the coordinates with
[`@photostructure/tz-lookup`](https://github.com/photostructure/tz-lookup) (CC0).
## License
MIT © [Marco Orta](https://ortamarco.me)
Lo que la gente pregunta sobre domain-security-mcp-server
¿Qué es OrtaMarco/domain-security-mcp-server?
+
OrtaMarco/domain-security-mcp-server es mcp servers para el ecosistema de Claude AI. MCP server for domain and email security audits — SPF, DKIM, DMARC, MTA-STS, BIMI, DNSSEC, DNS, TLS/SSL and WHOIS. No API keys required. Tiene 0 estrellas en GitHub y su última actualización registrada es del 2026-09-14.
¿Cómo se instala domain-security-mcp-server?
+
Puedes instalar domain-security-mcp-server clonando el repositorio (https://github.com/OrtaMarco/domain-security-mcp-server) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar OrtaMarco/domain-security-mcp-server?
+
Nuestro agente de seguridad ha analizado OrtaMarco/domain-security-mcp-server y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene OrtaMarco/domain-security-mcp-server?
+
OrtaMarco/domain-security-mcp-server es mantenido por OrtaMarco. La última actividad registrada en GitHub es del 2026-09-14, con 0 issues abiertos.
¿Hay alternativas a domain-security-mcp-server?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega domain-security-mcp-server en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/ortamarco-domain-security-mcp-server)<a href="https://claudewave.com/repo/ortamarco-domain-security-mcp-server"><img src="https://claudewave.com/api/badge/ortamarco-domain-security-mcp-server" alt="Featured on ClaudeWave: OrtaMarco/domain-security-mcp-server" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
The fastest path to AI-powered full stack observability, even for lean teams.