Are you the author? Sign in to claim
MCP server for DNS lookups and network diagnostics
A TypeScript-based Model Context Protocol (MCP) server that provides comprehensive DNS lookup capabilities to AI assistants.
npm install -g @cenemiljezweb/dns-mcp-server
npx @cenemiljezweb/dns-mcp-server
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"dns-server": {
"command": "npx",
"args": ["@cenemiljezweb/dns-mcp-server"],
"env": {}
}
}
}
Or if installed globally:
{
"mcpServers": {
"dns-server": {
"command": "mcp-dns-server",
"args": [],
"env": {}
}
}
}
The server can be configured using a dns-config.json file in your working directory:
{
"dns": {
"servers": ["8.8.8.8", "8.8.4.4", "1.1.1.1", "1.0.0.1"],
"timeout": 5000,
"retries": 2,
"useTCP": false
},
"cache": {
"enabled": true,
"ttl": 300,
"maxSize": 1000
},
"logging": {
"level": "info",
"file": "dns-server.log"
}
}
Perform DNS lookup for a domain to retrieve various record types.
Parameters:
domain (required): The domain name to lookuprecordType: Type of DNS record (A, AAAA, CNAME, MX, TXT, NS, SOA, PTR, SRV, CAA)useCustomServer: Use custom DNS server if configuredtimeout: Query timeout in millisecondsExample:
{
"domain": "example.com",
"recordType": "A"
}
Perform reverse DNS lookup to find the hostname for an IP address.
Parameters:
ipAddress (required): The IP address to perform reverse lookup ontimeout: Query timeout in millisecondsExample:
{
"ipAddress": "8.8.8.8"
}
Perform multiple DNS lookups in a single operation.
Parameters:
queries (required): Array of DNS queries to perform
domain: Domain namerecordTypes: Array of record types to queryparallel: Execute queries in parallel (default: true)timeout: Query timeout per requestExample:
{
"queries": [
{"domain": "example.com", "recordTypes": ["A", "MX"]},
{"domain": "google.com", "recordTypes": ["A", "AAAA"]}
],
"parallel": true
}
Trace the DNS resolution path from root servers to the final result.
Parameters:
domain (required): The domain to trace DNS resolution pathrecordType: The record type to trace (default: A)Example:
{
"domain": "example.com",
"recordType": "A"
}
# Clone the repository
git clone https://github.com/yourusername/mcp-dns-server.git
cd mcp-dns-server
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build the project
npm run build
# Run tests
npm test
npm run build - Compile TypeScript to JavaScriptnpm run dev - Run in development mode with hot reloadnpm start - Run the compiled servernpm test - Run unit testsnpm run lint - Run ESLintnpm run typecheck - Run TypeScript type checkingContributions are welcome! Please feel free to submit a Pull Request.
MIT
MCP DNS Server Contributors
For issues and feature requests, please visit the GitHub repository.
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows