Skip to main content
Glama

netcheck-mcp

Ask your AI "is my site healthy and configured right?" and get a verdict with the exact fix.

netcheck-mcp is an MCP server with six focused checks for TLS, DNS, HTTP, security headers, ports and email DNS. Every result starts with a VERDICT: PASS | WARN | FAIL, and every problem comes with a concrete fix (the header line to add, the record to publish, the file to serve).

What is different from other site-audit MCP servers. The closest I found are all-in-one "audit this site" servers such as security-mcp (one graded audit_site call that bundles headers, certificate and email-auth DNS) and certificate management servers such as CERT-MCP-SERVER. I only read their READMEs, not their code. netcheck-mcp is a diagnosis toolkit instead: separate tools the agent can combine, and checks that tell why something is wrong:

  • TLS failures are told apart: expired vs not-yet-valid vs self-signed vs incomplete chain (server forgot the intermediate) vs untrusted root vs wrong hostname, each with its own fix. It parses the X.509 itself, so it can describe certificates that fail verification, which Python's ssl module refuses to decode.

  • A hand-written DNS resolver (RFC 1035 over UDP with TCP fallback, name compression, TTLs, CNAME chains) with no dnspython, that separates NXDOMAIN from NODATA and can ask any resolver (system, 1.1.1.1, 8.8.8.8, or a specific IP).

  • SPF is actually expanded: includes and redirects are followed and the 10-lookup and 2-void-lookup limits are counted the way receivers count them.

  • SSRF protection by design (see Security), and tests that are hermetic: local CAs, local TLS/HTTP servers and a local DNS server, with the real-internet checks (example.com, badssl.com) in a separate opt-in suite.

  • One runtime dependency: mcp.

What it looks like

Real output (tls_check incomplete-chain.badssl.com, abridged):

TLS check: incomplete-chain.badssl.com:443 (104.154.89.105)
VERDICT: FAIL

[FAIL] Server sends an incomplete chain: it ends at a certificate issued by 'C=US, O=Let's Encrypt, CN=YR1', which is not in the trust store (unable to get local issuer certificate).
       fix: Serve the intermediate certificate(s) too: use the 'fullchain' file (leaf + intermediates), not just the leaf certificate.
[WARN] Server still offers TLSv1.0, which is deprecated (RFC 8996).
       fix: Disable TLSv1.0: allow TLS 1.2 and 1.3 only (e.g. nginx: ssl_protocols TLSv1.2 TLSv1.3;).
[INFO] TLS 1.3 is not offered (TLS 1.2 works).
[PASS] Certificate is valid for another 52 day(s).
[PASS] Certificate covers incomplete-chain.badssl.com.

Handshake:
  protocol TLSv1.2, cipher ECDHE-RSA-AES128-GCM-SHA256
  supported: TLSv1.0=offered, TLSv1.1=offered, TLSv1.2=offered, TLSv1.3=not offered
Chain served (1 certificate(s)):
  [0] CN=*.badssl.com  (issuer: C=US, O=Let's Encrypt, CN=YR1; expires 2026-12-28)

And from email_dns_check (against the test DNS server, an SPF record with too many includes):

[FAIL] SPF needs 14 DNS-lookup terms; the limit is 10 (RFC 7208), so receivers return permerror.
       fix: Flatten includes, remove unused services, or replace include: with ip4:/ip6: ranges.

Related MCP server: claude-ops-mcp

Tools

Tool

What it answers

tls_check(host, port=443)

Certificate subject/SAN/issuer/validity/days left, chain served, hostname match, trust, TLS 1.0-1.3 offered, cipher. Expiry under 30 days WARN, under 14 FAIL.

dns_lookup(name, types="A,AAAA", resolver="system")

A AAAA CNAME MX TXT NS CAA SOA SRV PTR with TTLs, the CNAME chain, NXDOMAIN vs NODATA (with negative-cache TTL).

http_check(url)

Redirect chain with each hop's status and DNS/connect/TLS/TTFB/total ms, final URL, compression, caching headers, HSTS, downgrade and loop detection.

security_headers(url)

Grade A+ to F for HSTS, CSP (unsafe-inline/eval, wildcards), clickjacking, nosniff, Referrer-Policy, Permissions-Policy, cookie flags, version leaks, with the exact header to add.

port_check(host, ports)

TCP open/closed/filtered for up to 20 ports plus a passive banner grab; warns on exposed databases, RDP, telnet.

email_dns_check(domain, resolver, selectors)

MX health, SPF syntax + lookup/void limits, DMARC policy, DKIM selector probe, MTA-STS / TLS-RPT presence.

Try asking:

  • "Is the certificate on example.com okay? When does it expire, and is the chain complete?"

  • "Why does https://shop.example.com redirect so many times? Show me each hop and how long it took."

  • "Grade the security headers on my site and give me the nginx lines to fix them."

  • "My domain's mail is going to spam. Check SPF, DKIM and DMARC for example.org."

  • "Does www.example.com resolve the same on Cloudflare and Google DNS? What are the TTLs?"

  • "Is port 5432 on my server reachable from the internet?"

  • "Is staging.example.com returning NXDOMAIN or just no A record?"

Install

Requires Python 3.10+. Nothing else.

Claude Code

claude mcp add netcheck -- uvx netcheck-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "netcheck": {
      "command": "uvx",
      "args": ["netcheck-mcp"]
    }
  }
}

Or pip install netcheck-mcp and run netcheck-mcp.

To check hosts on your own network (a NAS, a staging box at 10.x, localhost), start it with the explicit opt-in flag: "args": ["netcheck-mcp", "--allow-private"].

Security and responsible use

This server makes network connections on behalf of an AI agent, so it is deliberately cautious:

  • SSRF guard. By default every target is resolved and refused if any address is loopback, private (RFC 1918/ULA), link-local, CGNAT, multicast, reserved or a cloud metadata endpoint (169.254.169.254 and friends). This blocks the classic "make the server fetch its own internal services" attack, including numeric-IP spellings, IPv4-mapped IPv6 and hostnames that resolve to internal addresses.

  • No DNS rebinding. The address that passed the check is the address that gets connected to; the name is not looked up a second time.

  • Every redirect hop is re-checked, so a public site cannot bounce you into the internal network. Redirects to non-http(s) schemes and URLs with embedded credentials are refused.

  • --allow-private lifts the block for the whole process. Only the person who configures the server can set it; the agent cannot.

  • Hard caps: 10 redirects, 1 MiB of body, 30 s total per HTTP check, 5 s connect timeout, at most 20 ports per call, one host per call. CIDR ranges are rejected. This is a health checker, not a scanner.

  • No secrets sent: no cookies, no Authorization, no custom headers; the only request header beyond Host is a netcheck-mcp/<version> User-Agent.

  • A custom DNS resolver you pass is held to the same private-address rule. The system resolver is whatever the machine already uses (it was configured by the machine's owner, not by the agent).

Only test hosts you own or are authorised to test. Port probing and repeated requests against third parties can be unwelcome or against their terms of service. You are responsible for what you point this at.

Limits you should know

  • OCSP stapling is not reported. Python's ssl module cannot see a stapled response. tls_check reports the certificate's OCSP responder URL instead.

  • Probing TLS 1.0/1.1 needs a client OpenSSL that still allows them. When it does not, the result says untestable rather than guessing "not offered".

  • Some DNS providers (Cloudflare among them) answer a nonexistent name with NOERROR/NODATA instead of NXDOMAIN ("compact denial of existence"). netcheck-mcp reports what the resolver said, so such names show as NODATA.

  • DKIM selectors are arbitrary, so the probe of common selectors can find keys but can never prove there is none. Pass your own via selectors.

  • DMARC is looked up at exactly _dmarc.<domain>; the organisational-domain fallback for subdomains needs the Public Suffix List and is not done.

  • The system DNS resolver on Windows is read from the registry (adapter settings), on Linux/macOS from /etc/resolv.conf.

Development

uv sync --extra test
uv run pytest                 # hermetic: local CA, TLS/HTTP servers and DNS server
uv run pytest -m network      # optional: real example.com / badssl.com
uv run ruff check src tests && uv run mypy --strict src

cryptography is a test-only dependency: the tests mint throwaway CAs and certificates (expired, self-signed, wrong host, missing intermediate) at run time. The server itself parses certificates with its own DER reader.

There is a from-scratch tutorial that builds a small version of this server step by step: netcheck-mcp-the-hard-way.

License

MIT

Available Tools

6 tools
dns_lookupA

Look up DNS records with TTLs, following the CNAME chain.

types is a comma-separated list from A, AAAA, CNAME, MX, TXT, NS, CAA, SOA, SRV, PTR. resolver is 'system' (this machine's configured DNS), 'cloudflare' (1.1.1.1), 'google' (8.8.8.8), 'quad9', or an IP address (optionally ip:port) to ask a specific server, which is how you compare what different resolvers see. The result says NXDOMAIN (the name does not exist) separately from NODATA (the name exists but has no record of that type).

Inputs: name (required), types, resolver. Returns: result

email_dns_checkA

Audit a domain's email DNS: MX, SPF, DMARC, DKIM and MTA-STS.

MX targets must resolve and not be CNAMEs. SPF is parsed and expanded through include:/redirect= and the 10-DNS-lookup limit and 2-void-lookup limit are counted (exceeding either makes receivers return permerror). DMARC reports its policy (none/quarantine/reject), pct and rua. DKIM probes common selectors; pass your own as a comma-separated selectors (e.g. 'mail2024,s1') since selectors are arbitrary. MTA-STS and TLS-RPT presence are reported.

Inputs: domain (required), resolver, selectors. Returns: result

http_checkA

Follow a URL through its redirects and time every hop.

For each hop: status, DNS/connect/TLS/time-to-first-byte/total milliseconds. Then judges the final response: status, redirect problems (loops, >3 hops, HTTPS->HTTP downgrade, no HTTPS), compression, caching headers, and HSTS. Sends no cookies or credentials; reads at most 1 MiB of body; follows at most 10 redirects; gives up after 30 seconds. url may omit the scheme (https assumed).

Inputs: url (required). Returns: result

port_checkA

Check whether specific TCP ports on one host are reachable, and grab any banner.

ports is e.g. '22,80,443' or '8000-8005' (max 20 ports per call; this is a health check, not a scanner, and CIDR ranges are refused). Each port is reported open, closed (refused) or filtered (no answer, usually a firewall). Open ports are listened to passively for a banner (SSH, SMTP, FTP announce themselves); nothing is sent. Warns when databases/RDP/telnet are open to the internet.

Inputs: host (required), ports, timeout_s. Returns: result

security_headersA

Grade a site's security headers (A+ to F) and give the exact header line to add for each gap.

Covers Strict-Transport-Security, Content-Security-Policy (flags unsafe-inline, unsafe-eval, wildcards), clickjacking protection (X-Frame-Options / frame-ancestors), X-Content-Type-Options, Referrer-Policy, Permissions-Policy, cookie flags (Secure/HttpOnly/SameSite), version-disclosing headers, and cross-origin isolation headers. Follows redirects and grades the final page.

Inputs: url (required). Returns: result

tls_checkA

Check a host's TLS setup and judge it PASS/WARN/FAIL with fixes.

Reports the leaf certificate (subject, SAN, issuer, validity, days left, key and signature algorithms), the chain actually served, whether the name matches, whether the chain validates against the system trust store (distinguishing expired, self-signed, incomplete chain and untrusted root), which of TLS 1.0/1.1/1.2/1.3 the server offers, and the negotiated cipher. Expiry under 30 days is a WARN, under 14 days a FAIL. host is a name or IP (no scheme); use port for non-443 TLS services (e.g. 465, 993). OCSP stapling cannot be observed from Python's ssl module, so only the responder URL is reported.

Inputs: host (required), port. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool targets a distinct diagnostic concern (HTTP hops, TLS handshake, DNS records, header grading, TCP ports, email DNS), and the descriptions make the boundaries explicit. The only real overlap is that http_check and security_headers both fetch a page and follow redirects, and http_check reports some TLS timing that tls_check also covers, so an agent may occasionally hesitate between them.

    Naming Consistency4/5

    All names are snake_case, lowercase, and consistently resource-first (http_/tls_/dns_/port_/email_dns_ prefix). Minor deviations: the suffix alternates between _check and _lookup, and security_headers has no suffix at all, but the overall pattern is still predictable.

    Tool Count5/5

    Six tools is well within the sweet spot and each one maps to a clearly separate diagnostic domain (HTTP, TLS, DNS, headers, ports, email). Nothing appears redundant or padded for the stated purpose of a network checkup server.

    Completeness4/5

    The surface covers the core network-health workflow end to end: reachability, TLS validity, DNS resolution, security headers, open ports, and email authentication. Gaps remain around domain registration/WHOIS expiry, IP/ASN reputation, and any raw HTTP request capability, but agents can still complete most audits with what is present.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to perform passive security scans on domains, checking email spoofing (DMARC/SPF/DKIM), TLS weaknesses, security headers, exposed files, and subdomain-takeover risk without needing an API key.
      7
      77 npm
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude to run safe, read-only diagnostics against servers and websites — certificate chains and expiry, HTTP status/redirects/security headers, DNS records, email authentication (SPF, DKIM, DMARC, MTA-STS, TLS-RPT) and sitemaps. Every check returns severity-tagged findings with concrete fixes, plus a 0-100 score and A-F grade, without any ability to modify the target.
      8
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      This server provides comprehensive website diagnostics, allowing AI agents and clients to perform detailed HTTP, DNS, SSL/TLS, security header, SEO, and AI-readiness checks on any public website. It covers a wide range of tools including WHOIS, email checks, and network analysis.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to inspect any public domain’s web technology stack, email deliverability and DNS health (MX, SPF, DKIM, DMARC, MTA-STS, TLS-RPT, BIMI), and HTTPS security posture with typed JSON scores and remediation-ready findings, plus history, bulk checks, monitoring alerts, and reverse technology lookups.
      12
      61 npm
      MIT