Data source: Cloudflare DNS-over-HTTPS
Overview
DNS Lookup wraps Cloudflare DNS-over-HTTPS, handling authentication, pagination, and rate limits for you. This tutorial covers all 4 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-dns-lookup": {
"url": "https://context.gnist.ai/mcp/dns-lookup/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (4)
dns_lookup
Look up DNS records for a domain. Returns the DNS records of the specified type. Supported types: A, AAAA, CNAME, MX, NS, TXT, SOA, SRV, CAA, PTR. Args: domain: Domain name to query (e.g. "example.com"). record_type: DNS record type (default "A"). One of: A, AAAA, CNAME, MX, NS, TXT, SOA, SRV, CAA, PTR.
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | required | |
record_type | string | optional | (default: A) |
curl -X POST "https://context.gnist.ai/mcp/dns-lookup/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "dns_lookup", "arguments": {"domain": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/dns-lookup/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'domain': 'example'}, 'name': 'dns_lookup'}},
)
print(resp.json())
dns_mx_lookup
Look up MX (mail exchange) records for a domain. Returns the mail servers responsible for receiving email for the domain, sorted by priority (lower = preferred). Args: domain: Domain name to query (e.g. "gmail.com").
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | required |
curl -X POST "https://context.gnist.ai/mcp/dns-lookup/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "dns_mx_lookup", "arguments": {"domain": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/dns-lookup/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'domain': 'example'}, 'name': 'dns_mx_lookup'}},
)
print(resp.json())
reverse_dns
Perform reverse DNS lookup — find hostnames associated with an IP address. Args: ip: IPv4 or IPv6 address (e.g. "8.8.8.8" or "2001:4860:4860::8888").
| Parameter | Type | Required | Description |
|---|---|---|---|
ip | string | required |
curl -X POST "https://context.gnist.ai/mcp/dns-lookup/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "reverse_dns", "arguments": {"ip": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/dns-lookup/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'ip': 'example'}, 'name': 'reverse_dns'}},
)
print(resp.json())
report_feedback
Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/dns-lookup/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/dns-lookup/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())
FAQ
What data does DNS Lookup provide?
DNS record lookup — A, AAAA, MX, NS, TXT, CNAME, SOA, SRV, CAA, and reverse DNS. It exposes 4 tools: dns_lookup, dns_mx_lookup, reverse_dns, report_feedback.
What do I need to get started?
A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.
What format does the DNS Lookup API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.