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-mcpCheck 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.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name, e.g. example.com | |
| record_type | No | DNS record type | A |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare read-only and non-destructive behavior, but the description adds valuable behavioral details beyond that: it returns TTLs and reports NXDOMAIN as an empty result rather than an error. This enriches the agent's understanding of the tool's runtime behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exceptionally concise — two short sentences — yet conveys all essential information: the action, target, method, and key behavioral notes. There is no redundancy or extraneous detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simple nature, the description is complete. It covers what the tool does, how it behaves on success and failure (NXDOMAIN), and what the return contains (TTLs). No additional context is needed for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema is fully covered with descriptions for both parameters (domain and record_type), including an enum for record_type and a default. The description does not add significant semantic information beyond what the schema already provides, so it meets the baseline but does not exceed it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action — resolving a DNS record — and the resource (a domain) via DNS-over-HTTPS. It also clarifies the return format (records with TTLs) and edge-case behavior (NXDOMAIN as empty result), leaving no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear context for when to use the tool (for DNS record resolution) but does not explicitly compare it to the sibling tools (tls_certificate, http_probe, ip_rdap) or state when not to use it. The context is sufficient to infer appropriate usage, though explicit exclusions would make it stronger.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL or bare hostname; https:// is assumed if omitted |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover read-only/open-world safety. The description adds behavioral transparency by stating it follows redirects and may make HTTP requests to a given URL, with no side effects indicated, and the param note clarifies scheme defaulting.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one tightly worded sentence that front-loads the action and enumerates the key outputs. The parameter note is also concise and useful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a probe tool with an output schema and read-only annotations, the description covers the key behavioral context: redirects, final status, timing, and security headers. No major gaps are visible.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The url parameter is fully described, including that bare hostnames are accepted and https:// is assumed when no scheme is provided. This adds meaning beyond the schema, which only names the parameter and marks it required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as an HTTP probe that follows redirects and reports status, timing, and security headers. This is specific enough to distinguish it from the DNS, TLS, and RDAP siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The use case is implied by the description—investigating HTTP endpoint responses and security headers—but it gives no explicit guidance about when to choose this over dns_lookup, tls_certificate, or ip_rdap, nor any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ip_rdapIP registry lookupARead-only
Look up an IP address in the regional registry via RDAP: allocation handle, network range, country, and responsible organisations.
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes | Public IPv4 or IPv6 address |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true and destructiveHint=false, so the description adds little behavioral detail beyond stating the operation type. No additional side effects, rate limits, or failure modes are disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that front-loads the primary action and lists the key output fields. It contains no filler or redundancy, making it highly concise and efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple lookup tool, the description provides sufficient context: it names the protocol (RDAP), the input type (IP address), and the output fields. The sibling tools are clearly different network operations, so no additional context is needed for selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The sole parameter 'ip' is described as 'Public IPv4 or IPv6 address', which fully covers the schema (100% coverage). However, the description does not add extra meaning beyond the schema, so it remains at the baseline for full coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'look up' and the resource 'IP address in the regional registry via RDAP', and enumerates the returned information (allocation handle, network range, country, responsible organisations). It is easily distinguishable from sibling tools like dns_lookup, tls_certificate, and http_probe.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when IP registry information is needed, but does not explicitly state when to use this tool versus alternatives or when not to use it. There is no mention of scenarios where other sibling tools would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Hostname, e.g. example.com | |
| port | No | TCP port |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true and destructiveHint=false, covering safety. The description adds valuable behavioral context by disclosing that failed chain verification returns valid=false with the reason, which goes beyond the structured annotations. It also lists the negotiated protocol, a behavioral output. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero wasted words. The primary purpose and specific outputs are front-loaded, and the failure behavior is appended as a separate sentence. It is efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema, so return values are documented there and the description need not repeat them. The description covers the essential behavioral aspects (what it inspects, failure handling) and the annotations cover safety. Complexity is low (two parameters), and nothing an agent needs to call it correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (both host and port have descriptions), so baseline is 3. The tool description does not add further parameter semantics beyond what the schema already provides. It mentions 'host' implicitly but does not elaborate on format or constraints beyond the schema's examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Inspect') with a clear resource ('TLS certificate a host serves') and enumerates the exact fields returned (issuer, subject, SANs, validity window, days until expiry, negotiated protocol). It also states failure behavior. This clearly distinguishes it from sibling tools (dns_lookup, http_probe, ip_rdap) which cover DNS, HTTP, and IP info respectively.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when TLS certificate details are needed) and its sibling set makes alternatives obvious. However, it does not explicitly state when not to use it or name alternatives as the calibration example does. The domain is clear enough that an agent can infer correct usage without exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
dns_lookup - First observed
http_probe - First observed
ip_rdap - First observed
tls_certificate
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
Network, domain and website diagnostics for AI clients via MCP.
Inspect one endpoint's served certificate, expiry, hostname coverage, and accepted TLS versions.
Signed internet telemetry, read-only: DNS, TLS, WHOIS, reachability. Every record Ed25519-signed.
DNS resolution, HTTP security headers, and SPF/DMARC email hygiene audits.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenancePerform 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.13-
- AlicenseAqualityDmaintenanceNetwork diagnostics tool for AI agents that provides DNS lookup, IP geolocation, SSL certificate inspection, WHOIS queries, and HTTP latency testing.530 npm1MIT
- AlicenseAqualityCmaintenancePerforms domain security posture checks including SPF, DKIM, DMARC, TLS, and HTTP security headers.32 npmMIT