netdiag-mcp
Performs DNS lookups via Cloudflare's DNS-over-HTTPS API, returning records such as A, AAAA, MX, TXT, NS, CNAME, SOA, and CAA with TTLs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@netdiag-mcp Check DNS and TLS for example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
netdiag-mcp
An MCP server that gives an AI agent read-only network diagnostics for a target host: DNS, TLS, HTTP and registry data.
Agents are good at reasoning about infrastructure problems and bad at gathering the facts. "Why is this domain not loading?" needs a resolver, a certificate, a redirect chain and a registry lookup — four different tools, none of which an LLM can do on its own. This server supplies them.
No API keys. Every backing service is keyless, so it runs the moment you clone it.
Install and run
uv sync
uv run netdiag-mcp # speaks MCP over stdioRegister it with any MCP client. For Claude Desktop, in claude_desktop_config.json:
{
"mcpServers": {
"netdiag": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/netdiag-mcp", "netdiag-mcp"]
}
}
}Related MCP server: External Reconnaissance MCP Server
Tools
Tool | Answers | Backed by |
| What does this resolve to? A/AAAA/MX/TXT/NS/CNAME/SOA/CAA, with TTLs. | Cloudflare DNS-over-HTTPS |
| Who issued the cert, when does it expire, which SANs, which TLS version? | Python |
| Where does this redirect to, how slow is each hop, which security headers are missing? |
|
| Who owns this address, which allocation, which country? | RDAP registries |
Each is annotated readOnlyHint so a client can auto-approve it safely.
Design notes
NXDOMAIN is a result, not an error. dns_lookup returns {"nxdomain": true, "records": []}. "This domain does not exist" is usually the answer the agent wanted, and burying it in an exception makes it harder to reason about.
A failed certificate check is also a result. tls_certificate returns valid: false with the verification message rather than raising — an expired or mismatched cert is frequently the thing being investigated.
Errors come back as {"error": ...}. A tool call that raises gives an agent nothing to work with. Every failure path returns a dict describing what went wrong.
Security
These tools accept a hostname from a language model and then make a network request to it. That is a textbook SSRF surface: without a guard, an agent could be talked into using this server to reach 169.254.169.254 (cloud metadata), 127.0.0.1, or anything on an internal RFC1918 network.
resolve_public() resolves the target and refuses it unless every returned address is publicly routable. Checking every answer matters — a hostile domain can return one public and one private record and win the race if only the first is inspected.
Three details that are easy to get wrong, and are covered by tests:
Redirects are re-checked at every hop. A public URL is allowed to redirect to
127.0.0.1. Following redirects withfollow_redirects=Truewould validate only the first URL, so the chain is walked by hand.Opaque schemes.
data:andjavascript:contain no://, so a check for://misses them entirely.example.com:8080is not a scheme. URL scheme grammar permits dots, so a bare host:port matches the scheme pattern exactly and must not be rejected as one.
Tests
uv run pytest -m "not integration" # 62 offline tests
uv run pytest # adds 3 that need the networkValidation and the SSRF guard are tested offline on purpose: they are the parts that must not regress, and they should not need a working internet connection to verify.
Requirements
Python 3.12+, mcp>=2.0. Note that MCP SDK 2.0 renamed FastMCP to MCPServer; this targets the 2.x API.
Licence
MIT
Available Tools
4 toolsdns_lookupDNS lookupARead-only
Resolve a DNS record for a domain over DNS-over-HTTPS. Returns the records with TTLs; NXDOMAIN is reported as an empty result, not an error.
Inputs: domain (required), record_type. Returns: object
http_probeHTTP probeARead-only
Follow a URL's redirect chain and report each hop, the final status, response timing, and which common security headers are present or missing.
Inputs: url (required). Returns: object
ip_rdapIP registry lookupARead-only
Look up an IP address in the regional registry via RDAP: allocation handle, network range, country, and responsible organisations.
Inputs: ip (required). Returns: object
tls_certificateTLS certificateARead-only
Inspect the TLS certificate a host serves: issuer, subject, SANs, validity window, days until expiry, and negotiated protocol. A failed chain verification is returned as valid=false with the reason.
Inputs: host (required), port. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct aspect of network diagnostics: DNS lookup, TLS certificate inspection, HTTP probing, and IP RDAP lookup. There is no functional overlap between them.
All tool names use a consistent lowercase_with_underscores convention (dns_lookup, tls_certificate, http_probe, ip_rdap), making them predictable and easy to parse.
With 4 tools, the set is well-scoped for a network diagnostic server, fitting the typical 3-15 range comfortably without being too sparse or overwhelming.
The tool set covers common network diagnostics (DNS, TLS, HTTP, IP), but might omit tools like ping or traceroute. However, the included coverage is coherent and meets the obvious intended purpose.
Maintenance
Related MCP Connectors
Inspects live IPv4/IPv6 DNS resolution, TLS certificate issuer/expiry, and HTTP security grade.
Inspects live IPv4/IPv6 DNS resolution, TLS certificate issuer/expiry, and HTTP security grade.
Passive OSINT and security recon: DNS, TLS, email posture, IP reputation, CVE/KEV, CT logs.
External checks of TLS, HTTP, email domain, DNS, ports, blocklists and domain expiry
Related MCP Servers
- AlicenseNot gradedqualityDmaintenancePerform DNS lookups, WHOIS queries, connectivity testing, TLS certificate analysis, HTTP endpoint monitoring, and hostname resolution, all from your trusty AI.10MIT
- FlicenseNot gradedqualityDmaintenanceEnables external reconnaissance activities including DNS enumeration, subdomain discovery, email security analysis, and SSL certificate inspection against a target domain.14-
- AlicenseAqualityDmaintenancePerforms domain security posture checks including SPF, DKIM, DMARC, TLS, and HTTP security headers.38 npmMIT
- AlicenseAqualityCmaintenanceProvides safe, read-only network diagnostics (ping, DNS, HTTP health, TLS expiry, port checks, traceroute, and fleet sweeps) for monitoring infrastructure.7MIT