Skip to main content
Glama
glucn

MCP DNS

by glucn
README.md
# 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

## Usage

The tool provides a `dns-query` command that accepts two parameters:

- `name`: The domain name to query
- `type`: The DNS record type (A, AAAA, MX, TXT, CNAME, NS, etc.)

## Development

### Prerequisites

- Node.js (latest LTS version recommended)
- npm

### Setup

1. Clone the repository:

```bash
git clone https://github.com/glucn/mcp-dns.git
cd mcp-dns
```

2. Install dependencies:

```bash
npm install
```

3. Build the project:

```bash
npm run build
```

### Project Structure

- `src/` - Source code directory
  - `server.ts` - Main server implementation
- `build/` - Compiled JavaScript output
- `package.json` - Project configuration and dependencies

## Dependencies

- [@modelcontextprotocol/sdk](https://www.npmjs.com/package/@modelcontextprotocol/sdk) - MCP SDK for server implementation
- [zod](https://www.npmjs.com/package/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](https://glucn.com/posts/2025-05-17-my-first-mcp-server)

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The tool's purpose is clearly defined as making DNS queries, leaving no ambiguity for an agent to misselect among alternatives.

Naming Consistency5/5

A single tool inherently has perfect naming consistency, as there are no other tools to compare against. The tool name 'dns-query' follows a clear and descriptive pattern, using a hyphen to separate domain and action.

Tool Count2/5

A single tool is generally too few for a DNS server's scope, which typically involves operations like querying, resolving, or managing DNS records. This minimal set feels thin and may limit functionality for agents needing more comprehensive DNS interactions.

Completeness2/5

The tool surface is severely incomplete for a DNS domain. While 'dns-query' covers basic lookups, there are obvious gaps such as reverse DNS lookups, record management (e.g., adding or deleting records), or handling different DNS server configurations, which could cause agent failures in broader DNS-related tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues