MCP Server for DNS: Setup, Lookups and Reliable Answers
Connect your AI client to EdgeDNS, run a verifiable DNS lookup, and compare resolver answers after a change. Learn which checks your account can run, how to interpret the results, and what requires saved history or a separate monitoring workflow.
What a DNS MCP server actually does
A DNS MCP server lets an AI client request live DNS and domain checks through the Model Context Protocol. EdgeDNS returns the tool result; your assistant explains it. A useful answer should identify the queried hostname, record type, returned values, and any errors instead of relying on a fluent summary alone.
The hosted connection URL is https://mcp.edgedns.dev/mcp. It exposes supported analysis tools, filtered by the account's plan. It does not expose the dashboard's API-key management, usage analytics, or alert-management routes as MCP tools. The separate legacy `/v1/advanced/mcp` REST endpoint is not the connection URL described here.
This guide follows one practical workflow: connect a client, verify a DNS answer, compare resolvers after a change, and retain the evidence. The MCP integration reference contains the client-specific configuration examples.
Connect Claude Code with an EdgeDNS API key
Create an account and generate a key in API keys. In Claude Code, add the hosted HTTP server with the command below, replacing the placeholder with your own key. Use your client's connection status to confirm that authentication and tool discovery complete before asking for a lookup.
This is a Claude Code command, not a configuration format shared by every client. Claude Desktop, ChatGPT, Gemini CLI, and Cursor use different setup screens or files. Use the client setup guide for your client, and consult the Claude Code MCP documentation for command options and configuration scopes. Keep the key out of committed project configuration and shared screenshots.
claude mcp add --transport http edgedns https://mcp.edgedns.dev/mcp \
--header "Authorization: Bearer edns_live_YOUR_API_KEY"First lookup: ask for records and evidence
Begin with a narrow request that is easy to verify. The DNS tool is named `dns_lookup`; its required argument is `domain`, with an optional `type`. For a mail-routing question, ask for MX records rather than a broad domain health score.
Query dns_lookup for example.com with type MX. Show each returned mail server, its priority, and TTL. If no records are returned or the request fails, say that explicitly. Do not infer that email delivery is working from DNS alone.
You can compare the answer with the DNS API reference. The tool returns structured record data, while the assistant's wording is an interpretation. An MX lookup does not send a message, inspect a mailbox, or prove that an email provider accepts mail.
Checks can use cached API data. Starting a new conversation does not force a fresh origin measurement. Retain the collection time separately and review cache behavior when comparing results after a change.
After a DNS change: compare resolver answers
For a migration, the useful question is whether the sampled resolvers return your intended answer. The `dns_propagation` tool compares public resolvers; their responses are a sample, not a view of every cache worldwide.
Check dns_propagation for api.example.com with type A. The expected address is 203.0.113.50. List each resolver's answer and identify any differences. Explain the TTLs without predicting a guaranteed time when every cache will update.
The address above is an illustrative expected value; substitute the address you actually deployed. A difference can reflect cache age, resolver location, or intentional geographic routing. Compare it with your authoritative configuration before treating it as an incident. The propagation guide explains those distinctions; the propagation checker offers a browser check.
Email authentication: separate configuration from delivery
The `security_spf` and `security_dmarc` tools can inspect published email policies. The `security_dkim` tool requires Developer or higher, and knowing the sender's actual DKIM selector makes a targeted check more useful. A successful policy check does not verify that a real message passed alignment: that requires message headers or provider logs.
Check SPF and DMARC for example.com. Quote the published policies and report validation errors. Separate what DNS proves from what would require a sample message. Suggest the next check, but do not change DNS.
Use the DMARC guide and SPF setup guide to interpret the result before changing enforcement. A DNS lookup by itself cannot establish when a policy changed or reconstruct last month's configuration.
Which tools and limits apply to my account?
MCP access is included with EdgeDNS plans; access to each tool follows that endpoint's minimum plan. Discovery is tier-aware, so a tool requiring Developer or Pro will not appear for a Free caller. DNS lookup, propagation, SPF, DMARC, and SSL certificate checks have Free access; tools such as DKIM analysis and domain authority require a higher plan. Check the endpoint catalogue for the current per-tool requirements.
The Free plan includes 200 requests per month and a rate limit of 10 requests per minute. Tool calls consume the same request budget as the underlying API. Most analysis calls use one request unit per call. Uncached ping and traceroute probes use one unit per requested zone; cached results and status polls use one unit. Scheduled checks share your monthly request allowance. An assistant that calls several tools makes several API calls. The pricing page and rate-limit reference describe the limits.
If discovery fails, check authentication first. If an individual call returns a tier or quota error, keep that error visible in the answer rather than substituting an invented result.
A conversation is a check; monitoring needs saved results
An MCP lookup runs when the client calls a tool. It does not, by itself, schedule another check or preserve a comparison baseline. For a recurring workflow, configure an endpoint watch, or run the REST API on your own schedule and store the outputs.
A comparison needs the same hostname, parameters, and measurement scope in both runs. Save the raw result, your collection time, and relevant API metadata. If you ask an assistant to compare two dates, provide the saved earlier result or a history source it can actually access. Avoid prompts that assume the assistant can retrieve an earlier scan that was never retained.
The supported tools described here inspect data. They do not publish DNS changes or purchase domains. Review suggested fixes in the DNS provider or deployment system that owns your configuration.
Verify the same lookup with the REST API
A direct API request helps distinguish a client setup problem from a DNS finding. This request checks the same MX record used above. A successful REST response contains `data.records`; inspect the HTTP status and error envelope when a request fails. The `--fail-with-body` option makes cURL exit unsuccessfully on HTTP errors while preserving the response body.
For a programmatic integration, keep the credential server-side and follow the authentication reference. The endpoint's parameters and examples are the technical contract; this guide explains how to use the result in a workflow.
curl --fail-with-body --get "https://api.edgedns.dev/v1/dns/lookup" \
--data-urlencode "domain=example.com" \
--data-urlencode "type=MX" \
--header "Authorization: Bearer YOUR_API_KEY"A short checklist for reliable answers
Confirm which tool ran and which hostname and parameters it received.
Keep empty data, unsupported tools, and failed requests distinct from a passing check.
Read the original record values or findings before acting on the assistant's summary.
Use the same parameters when comparing saved results, and label the collection times.
Treat recommendations as reviewable suggestions; apply and validate changes through your own operational process.
For broader investigations, the domain intelligence feature connects the relevant lookups. For interpretation of domain scores, the authority and trust-score guide explains which signals the scores measure and which conclusions they do not support.
Related Guides
How to Check Your DMARC Record
Check your published DMARC policy and understand how it relates to SPF, DKIM, and real message authentication. This guide separates DNS configuration from delivery evidence and explains how to review legitimate senders before changing enforcement.
SPF Record Setup Guide: From Zero to Protected
If you send any email at all from a domain you own, you should have an SPF record. This guide explains what SPF is in plain language, walks you through setting one up step by step, and warns you about the gotchas before you hit them.
DNS Propagation Explained: Why Changes Aren't Instant
Ever changed a DNS record and then refreshed your browser, hoping to see the change instantly — but it took hours? That's DNS propagation. This guide explains why it happens, how to check on it, and how to make it as fast as possible next time.
Domain Authority & Trust Scores: Check and Interpret Them
Check a domain’s authority and operational trust signals, then see what the numbers actually measure. Understand the four-source authority formula, optional DNS/email/HTTPS trust score, and the limits of using either as an SEO metric.
Need Programmatic Access?
Automate domain intelligence with 100+ API endpoints and a free MCP server for AI integration.