Utilizes Node.js native DNS module to perform DNS lookups for various record types (A, AAAA, MX, TXT, CNAME, NS, etc.) through a standardized MCP interface.
MCP DNS
A Model Context Protocol (MCP) tool that provides DNS querying capabilities. This tool allows you to perform DNS lookups for various record types through a standardized MCP interface.
Features
DNS querying for various record types (A, AAAA, MX, TXT, CNAME, NS, etc.)
Simple and standardized MCP interface
Built with TypeScript for type safety
Uses Node.js native DNS module
Related MCP server: IR Toolshed MCP Server
Usage
The tool provides a dns-query command that accepts two parameters:
name: The domain name to querytype: The DNS record type (A, AAAA, MX, TXT, CNAME, NS, etc.)
Development
Prerequisites
Node.js (latest LTS version recommended)
npm
Setup
Clone the repository:
Install dependencies:
Build the project:
Project Structure
src/- Source code directoryserver.ts- Main server implementation
build/- Compiled JavaScript outputpackage.json- Project configuration and dependencies
Dependencies
@modelcontextprotocol/sdk - MCP SDK for server implementation
zod - TypeScript-first schema validation
TypeScript - For type safety and modern JavaScript features
Other Links
Personal Blog: Building My First MCP Server: A DNS Query Tool