# Connect DNSai to Claude

> Add DNSai to Claude.ai, Claude Code or Claude Desktop. The web connector runs anonymously; Claude Code and Desktop can carry a free key for 100 lookups/day.

DNSai is a free remote **MCP server** + REST API for live DNS, SPF, DKIM, DMARC, WHOIS and email-security lookups — one domain or IP per request (each call = one lookup).

- **MCP URL:** `https://mcp.dnsai.com/mcp`
- **REST base:** `https://api.dnsai.com/v1`
- **OpenAPI schema:** https://api.dnsai.com/openapi.json
- **Free key (100 lookups/day, per key):** https://dnsai.com/api/get-key/ — anonymous works at 25 lookups/day per IP, no key
- **This guide online:** https://dnsai.com/api/claude/

**This is the free tier — no signup, no card.** Running bulk / multi-domain or enterprise-scale lookups? See DNSai Pro & Enterprise: https://app.dnsai.com/pricing/?ref=api-claude-md

**Key support here:** Free key works in Claude Code & Desktop · the web connector is anonymous-only.

## Set it up

### Claude.ai (web & desktop app)
Go to *Settings → Connectors → Add custom connector*, paste the URL and enable it. The connector UI is **OAuth-only** — there is no field for an API key — so this surface runs on the anonymous tier (25 lookups/day). For 100 lookups/day, use Claude Code or Claude Desktop below.

```
https://mcp.dnsai.com/mcp
```

### Claude Code (CLI) — key works here
One command. The free key rides as a Bearer header. Add `--scope user` to enable it across every project.

```bash
claude mcp add --transport http dnsai https://mcp.dnsai.com/mcp \
  --header "Authorization: Bearer dk_free_xxxxxxxx"
```

### Claude Desktop — key via the mcp-remote bridge
The native connector UI is OAuth-only like the web, so use the `mcp-remote` bridge to inject your key. Needs Node.js; fully quit and reopen Claude after editing *claude_desktop_config.json*.

```json
{
  "mcpServers": {
    "dnsai": {
      "command": "npx",
      "args": ["mcp-remote", "https://mcp.dnsai.com/mcp", "--header", "Authorization:${AUTH}"],
      "env": { "AUTH": "Bearer dk_free_xxxxxxxx" }
    }
  }
}
```

## Your key
Anonymous works on all three surfaces (25 lookups/day). For **100 lookups/day**, [get a free key](https://dnsai.com/api/get-key/) and use it in **Claude Code** or **Claude Desktop** — the Claude.ai web connector can't accept a key (OAuth-only).

## Verify it works
Ask Claude:

```
Use dnsai to check the email security of stripe.com
```

Every result ends with a plain-English `summary`, a `source` link on dnsai.com, and your remaining quota.

## Tools you can call

Once connected, your assistant calls these on its own (one domain per call):

- **`dns_lookup`** — Live DNS records (A, AAAA, MX, NS, TXT, SOA, CNAME, CAA, DNSKEY, DS and 30+ more) for one domain.
- **`email_security_check`** — Graded SPF / DMARC / MX posture for one domain — "is this domain's email secure?"
- **`dkim_discover`** — Discovers a domain's published DKIM signing keys, the providers they map to, and selectors.
- **`whois_lookup`** — WHOIS / RDAP registration data for a domain or IP — registrar, status, creation & expiry.
- **`spf_analyze`** — SPF record with its full include tree and the RFC 10-DNS-lookup-limit verdict.
- **`dmarc_check`** — DMARC presence and the p= policy (none / quarantine / reject), with the raw record.
- **`blacklist_check`** — Checks a domain or IP against the major email blacklists / RBLs.
- **`validate`** — Syntax-checks a pasted SPF or DMARC record — returns valid/invalid, a score and a grade.

The MCP server also registers `search` / `fetch` (deep-research aliases) and `request_api_key` (email → free key), for 11 tools in total.

## Troubleshooting
- No place to paste a key on Claude.ai? Correct — the web/desktop connector is OAuth-only. Use Claude Code or the Desktop `mcp-remote` bridge for a keyed 100 lookups/day.
- Claude Desktop can't find `npx`? If Node is managed by nvm, Desktop may not see it on PATH — install Node system-wide or point to an absolute `npx`.

## More volume?
**Pro** unlocks bulk / multi-domain lookups; **Enterprise** adds large-scale scanning and the full programmatic API — https://app.dnsai.com/pricing/?ref=api-claude-md

**Sources:** [Claude custom connectors](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) · [Claude Code MCP docs](https://code.claude.com/docs/en/mcp)

---
_Generated from https://dnsai.com/api/claude/ · DNSai — DNS & email-security lookups for AI agents._
