JBobby508/dnsenum_MCP
If you are the rightful owner of dnsenum_MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The DNSEnum MCP Server is a Model Context Protocol server that facilitates DNS enumeration using the DNSEnum tool on Kali Linux, enabling AI agents like Claude to conduct thorough DNS reconnaissance for web application testing and security assessments.
DNSEnum MCP Server
A Model Context Protocol (MCP) server that provides DNS enumeration capabilities through the DNSEnum tool on Kali Linux. This server enables AI agents like Claude to perform comprehensive DNS reconnaissance for web application testing and security assessments.
Features
- Comprehensive DNS Enumeration - A, AAAA, MX, NS, SOA, TXT, CNAME record discovery
- Subdomain Brute Forcing - Custom wordlist support with multi-threading
- Zone Transfer Attempts - Automatic AXFR testing
- Reverse DNS Lookups - IP to hostname resolution
- WHOIS Integration - Domain registration information
- Google Scraping - Additional subdomain discovery via search engines
- Structured Output - Parsed DNS records and statistics
- Health Monitoring - Server status and tool availability checks
Architecture
Claude Desktop ←→ MCP Client ←→ Kali API Server ←→ DNSEnum Tool
- MCP Client (
MCPserver_web.py
) - Connects Claude to the Kali server - Kali API Server (
kali_server_dnsenum.py
) - Executes DNSEnum and parses results - DNSEnum Tool - Performs the actual DNS enumeration
Prerequisites
Kali Linux Machine
# Update system
sudo apt update && sudo apt upgrade -y
# Install DNSEnum
sudo apt install dnsenum -y
# Install Python dependencies
pip3 install flask paramiko requests
Client Machine (Running Claude Desktop)
# Install MCP dependencies
pip3 install fastmcp requests
Installation
1. Clone/Download Files
# Create project directory
mkdir WebbMCP && cd WebbMCP
# Download the MCP client and server files
# Place MCPserver_web.py and kali_server_dnsenum.py in this directory
2. Configure Kali Server
# On your Kali Linux machine, start the API server
python3 kali_server_dnsenum.py --port 5000
# Optional: Run in debug mode
python3 kali_server_dnsenum.py --port 5000 --debug
3. Configure Claude Desktop
Windows:
notepad "%APPDATA%\Claude\claude_desktop_config.json"
macOS:
nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
Linux:
nano ~/.config/Claude/claude_desktop_config.json
Configuration:
{
"mcpServers": {
"dnsenum-kali": {
"command": "python3",
"args": [
"/full/path/to/MCPserver_web.py",
"--server",
"http://YOUR_KALI_IP:5000",
"--debug"
]
}
}
}
4. Test Installation
# Test MCP client connection
python3 MCPserver_web.py --server http://YOUR_KALI_IP:5000 --debug
# Test Kali server health
curl http://YOUR_KALI_IP:5000/health
Usage
Basic DNS Enumeration
"Perform DNS enumeration on example.com"
Advanced Reconnaissance
"Run comprehensive DNS scan on target.com with:
- Custom wordlist /usr/share/wordlists/dirb/small.txt
- Enable reverse DNS lookups
- Enable WHOIS queries
- Use 10 threads
- 10-minute timeout"
Bug Bounty Research
"Help me map the DNS infrastructure for company.com:
- Use DNS server 8.8.8.8
- Enable Google scraping for additional subdomains
- Look for development and staging environments"
Available Tools
dnsenum_scan
Comprehensive DNS enumeration with full DNSEnum capabilities.
Parameters:
domain
(required) - Target domain to enumeratewordlist
- Custom wordlist path (default: DNSEnum default)dns_server
- Custom DNS server (e.g., "8.8.8.8")enable_reverse
- Enable reverse DNS lookupsenable_whois
- Enable WHOIS queriesenable_google_scraping
- Enable Google search scrapingthreads
- Thread count (1-50, default: 5)timeout
- Scan timeout in seconds (default: 300)additional_args
- Extra DNSEnum arguments
server_health
Check the status and availability of the Kali server and DNSEnum tool.
Output Format
The DNSEnum tool returns structured data including:
{
"success": true,
"stdout": "Raw DNSEnum output...",
"discovered_subdomains": ["www.example.com", "mail.example.com"],
"dns_records": {
"A": [{"hostname": "www.example.com", "ip": "192.168.1.1"}],
"MX": [{"domain": "example.com", "priority": 10, "mx_server": "mail.example.com"}],
"NS": [{"domain": "example.com", "ns_server": "ns1.example.com"}]
},
"scan_summary": {
"total_subdomains": 15,
"unique_ips": ["192.168.1.1", "192.168.1.2"],
"zone_transfer_attempted": true,
"zone_transfer_successful": false
}
}
Common Wordlists
DNSEnum comes with several useful wordlists:
# Default DNSEnum wordlist
/usr/share/dnsenum/dns.txt
# DIRB wordlists
/usr/share/wordlists/dirb/small.txt
/usr/share/wordlists/dirb/common.txt
# SecLists (if installed)
/usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt
Troubleshooting
MCP Client Won't Start
# Check if FastMCP is installed
python3 -c "import fastmcp; print('FastMCP OK')"
# Test direct connection
python3 MCPserver_web.py --server http://YOUR_KALI_IP:5000 --debug
Kali Server Connection Issues
# Test server connectivity
ping YOUR_KALI_IP
telnet YOUR_KALI_IP 5000
# Check if DNSEnum is installed
which dnsenum
dnsenum --version
Claude Desktop Not Recognizing MCP
- Verify config file location and JSON syntax
- Use absolute paths in configuration
- Restart Claude Desktop completely
- Check Claude Desktop logs for errors
Permission Issues
# Make scripts executable
chmod +x MCPserver_web.py
chmod +x kali_server_dnsenum.py
# Check Python path
which python3
Security Considerations
- Authorized Testing Only - Only use on domains you own or have permission to test
- Rate Limiting - Use appropriate thread counts to avoid overwhelming targets
- Network Visibility - DNS queries may be logged by target infrastructure
- OPSEC - Consider using custom DNS servers to reduce attribution
API Endpoints
The Kali server exposes these endpoints:
GET /health
- Server health and tool statusPOST /api/tools/dnsenum
- Execute DNSEnum scan
Configuration Options
Kali Server Arguments
python3 kali_server_dnsenum.py --help
--debug Enable debug logging
--port PORT API server port (default: 5000)
MCP Client Arguments
python3 MCPserver_web.py --help
--server URL Kali server URL
--timeout SECS Request timeout (default: 300)
--debug Enable debug logging
Contributing
This MCP server is designed for educational and authorized security testing purposes. Contributions for additional DNS enumeration features, better parsing, or integration with other tools are welcome.
License
Use responsibly and only on systems you own or have explicit permission to test.
Support
For issues:
- Check the troubleshooting section
- Review server and client logs with
--debug
- Verify network connectivity between components
- Ensure all dependencies are properly installed