DEV Community

Rumblingb
Rumblingb

Posted on • Originally published at smithery.ai

Stop Paying for Email Verification APIs — A Zero-Cost DNS Approach

Stop Paying for Email Verification APIs — A Zero-Cost DNS Approach

Most email verification APIs charge $0.005-0.01 per check. At 10,000 signups a month, that's $50-100 — before you've made a cent.

Here's the thing: you don't need them. DNS already has the answers.

How Email Verification Actually Works

When you type user@gmail.com, three things matter:

  1. Syntax — is it even a valid email format?
  2. Domain — does gmail.com have MX records? (DNS)
  3. Mailbox — does user exist on that server? (SMTP)

Steps 1 and 2 cost you nothing. Step 3 requires an SMTP handshake, but most services skip it anyway — it's slow, unreliable, and many servers don't even respond.

So 80% of "verification" is just DNS queries.

The DNS Trick

dig gmail.com MX +short
# 10 alt1.gmail-smtp-in.l.google.com.
# 20 alt2.gmail-smtp-in.l.google.com.
Enter fullscreen mode Exit fullscreen mode

No MX records? The domain can't receive email. That's a definitive bounce.

Add a disposable domain check and you've already caught:

  • Typos (gmai.com → no MX → invalid)
  • Disposable inboxes (mailinator.com → known pattern)
  • Non-existent domains (asdfghjkl.com → NXDOMAIN)

Why I Built This as an MCP Server

I wanted my AI agents to verify emails without API keys, rate limits, or monthly bills. So I built Email Verify MCP — it runs DNS queries locally and exposes them as MCP tools.

Any agent (Claude, Cursor, Goose) can call:

verify_email("test@gmail.com")
 { valid: true, domain: "gmail.com", has_mx: true, disposable: false }
Enter fullscreen mode Exit fullscreen mode

No API key. No rate limit. No cost.

The Architecture

Agent → MCP Protocol → Email Verify Server → DNS Resolver
                                              ↓
                                     MX, A, TXT records
                                              ↓
                                     Validation result
Enter fullscreen mode Exit fullscreen mode

The server uses Node.js dns.promises module — no external dependencies, no network calls (except DNS), no third-party API.

Free tier: 50 verifications/day. Pro tier ($19/mo): 1,000/month. That's $0.019 per check at scale — 2-5x cheaper than commercial APIs.

What I Learned Shipping This

Build what agents need. AI agents are the new power users. They don't care about pretty dashboards — they need programmatic access.

DNS is underrated. Most verification problems are DNS problems in disguise. MX records, SPF, DKIM, DMARC — all free to query.

MCP is the distribution channel. Instead of building yet another SaaS, I built an MCP server. Now 27 servers on Smithery act as a discovery network.

Try It

npm install -g @rumblingb/email-verify-mcp
Enter fullscreen mode Exit fullscreen mode

Or add it to your Claude/Cursor MCP config:

{
  "mcpServers": {
    "email-verify": {
      "command": "npx",
      "args": ["-y", "@rumblingb/email-verify-mcp"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Stop paying per verification. DNS is free.


Building MCP servers at smithery.ai/servers/vishar-rumbling. Follow the build at @rumblingboya.

Top comments (0)