Skip to main content
Glama

IT Tools MCP Server

index.ts•1.01 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; import dns from "dns"; export function registerDig(server: McpServer) { server.registerTool("dig", { description: "Perform DNS lookup with dig command", inputSchema: { target: z.string().describe("Hostname or IP address"), type: z.string().default("A").describe("DNS record type") }, // VS Code compliance annotations annotations: { title: "Dig", description: "Perform DNS lookup with dig command", readOnlyHint: false } }, async ({ target, type }) => { return new Promise((resolve) => { dns.resolve(target, type, (err, addresses) => { if (err) { resolve({ content: [{ type: "text", text: `dig failed: ${err.message}` }] }); } else { resolve({ content: [{ type: "text", text: `${type} records for ${target}:\n${JSON.stringify(addresses, null, 2)}` }] }); } }); }); } ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wrenchpilot/it-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server