loading…
Search for a command to run...
loading…
A comprehensive DNS query server that enables querying all types of DNS records, including A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, and DNSSEC checks, a
A comprehensive DNS query server that enables querying all types of DNS records, including A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, and DNSSEC checks, as well as advanced tools like WHOIS-style lookup and DNS delegation tracing.
A comprehensive DNS query server built with FastMCP that provides tools to query all types of DNS records and gather complete domain information.
pip install -r requirements.txt
python dns_server.py
The server will start on http://localhost:8000 by default.
pip install fastmcp
fastmcp login
fastmcp deploy dns_server.py
import asyncio
from fastmcp import Client
# Replace with your deployed URL
client = Client("https://your-server.fastmcp.app/mcp")
async def main():
async with client:
# Query A records
result = await client.call_tool("query_a_record", {"domain": "google.com"})
print(result)
# Query all records
result = await client.call_tool("query_all_records", {"domain": "example.com"})
print(result)
# Reverse DNS lookup
result = await client.call_tool("query_ptr_record", {"ip_address": "8.8.8.8"})
print(result)
# Check DNSSEC
result = await client.call_tool("check_dnssec", {"domain": "cloudflare.com"})
print(result)
asyncio.run(main())
query_a_record(domain: str) - Get IPv4 addressesquery_aaaa_record(domain: str) - Get IPv6 addressesquery_mx_record(domain: str) - Get mail serversquery_txt_record(domain: str) - Get TXT recordsquery_ns_record(domain: str) - Get nameserversquery_cname_record(domain: str) - Get CNAME aliasquery_soa_record(domain: str) - Get SOA informationquery_caa_record(domain: str) - Get CAA recordsquery_ptr_record(ip_address: str) - Reverse DNS lookupquery_srv_record(service: str, protocol: str, domain: str) - Service locationquery_all_records(domain: str) - Get all DNS records at oncecheck_dnssec(domain: str) - Check DNSSEC statuswhois_lookup(domain: str) - Comprehensive domain infocheck_domain_availability(domain: str) - Check if domain is configuredtrace_dns_delegation(domain: str) - Trace delegation chainThe server uses the following public DNS resolvers:
Timeout: 5 seconds Lifetime: 10 seconds
All tools return structured JSON responses with:
success: Boolean indicating if query succeededdomain/ip_address: The queried domain or IPrecord_type: Type of DNS recordrecords: Array of record data with TTL informationnameserver: The nameserver that provided the responseerror: Error message if query failed{
"domain": "example.com",
"record_type": "A",
"records": [
{
"data": "93.184.216.34",
"ttl": 86400,
"type": "A"
}
],
"nameserver": "8.8.8.8",
"success": true
}
The server gracefully handles DNS query failures and returns structured error responses:
{
"domain": "nonexistent.example",
"record_type": "A",
"error": "The DNS query name does not exist: nonexistent.example.",
"success": false
}
MIT License
Contributions are welcome! Please feel free to submit issues or pull requests.
Выполни в терминале:
claude mcp add dns-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.