Skip to content
MCP server

netdiag MCP

MCP server for one-off DNS, ping, TLS, HTTP and WHOIS checks from a chat

Runs locally

netdiag MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Linux, macOS
Runs
Locally
Version
0.10.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add netdiag-mcp -- uvx netdiag-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "netdiag-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "netdiag-mcp"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add netdiag-mcp -- uvx netdiag-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.netdiag-mcp]
command = "uvx"
args = ["netdiag-mcp"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "netdiag-mcp": {
      "command": "uvx",
      "args": [
        "netdiag-mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

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

    Or run: gemini mcp add -s user netdiag-mcp uvx -- netdiag-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

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

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "netdiag-mcp": {
          "command": "uvx",
          "args": [
            "netdiag-mcp"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About netdiag MCP

Instead of logging into a jump host to run dig, ping or curl for each report, an assistant can run single-target network checks through this server. Its DNSSEC check reads the resolver's AD bit, because an RRSIG in a plain reply does not prove validation, and DNS lookups can go over plain DNS, DoT or DoH when dig is version 9.18 or newer.

Every tool is read-only and single-target: there is no batch or range mode, and nmap-style scanning is out of scope on purpose. The TCP, HTTP and TLS tools use Python's own socket, ssl and httpx stack, so they work even without dig, ping, mtr or whois installed. http_get returns text bodies up to 1 MiB and refuses loopback, link-local and cloud-metadata targets, including through redirects.

An optional NETDIAG_HTTP_AUTH setting lets http_get send an Authorization header to a configured https prefix without giving the credential to the model. A --check flag reports missing binaries.

Tools this server provides (12)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 9 of 12 tools read data; 3 names don't say.

From the server's own tool labels and tool names; not verified by us.

dns_lookupName suggests: reads
Resolve a DNS record with dig
dnssec_checkName suggests: reads
Report whether the AD bit is set from a validating resolver
ping_host
ICMP ping
traceroute_path
Hop-by-hop path report via mtr
tcp_port_checkName suggests: reads
Check whether a TCP port accepts a connection
http_checkName suggests: reads
HEAD or GET a URL and report status, redirects and latency
http_getName suggests: reads
GET a URL and return a text body
tls_cert_checkName suggests: reads
Report the certificate a host presents
whois_lookupName suggests: reads
WHOIS lookup for a domain
asn_lookupName suggests: reads
ASN and country lookup for an IP, or org info for an AS
current_time
Date, time and weekday in an IANA timezone
health_checkName suggests: reads
Version and which wrapped binaries are present

What it does

DNS and DNSSEC
Look up records over plain, DoT or DoH and check the AD bit.
Path report
Hop-by-hop loss report using mtr with fixed cycles.
Port, HTTP and TLS checks
Single-port connects, redirect chains with latency, and certificate details.
WHOIS and ASN
Domain WHOIS and ASN or country lookups via Team Cymru.
Guarded HTTP fetch
http_get refuses internal and metadata addresses and caps body size.
Credential isolation
Optional auth header applies only to configured https prefixes and is never printed.

Good for

  • Triage a "can't reach X" report
  • Check whether a DNS change has propagated
  • Verify a certificate's issuer and expiry
  • Trace where packets are being lost to a host
  • Look up who owns an IP address

Pricing

Open source

netdiag MCP FAQ

Can netdiag MCP scan many hosts or ports?

No. Each call targets one host or port by design.

What system packages does netdiag MCP need?

dig, ping, mtr and whois for those tools; the TCP, HTTP and TLS tools work without them.

How do I install netdiag MCP?

pip install netdiag-mcp or uv tool install netdiag-mcp, then add it to Claude Code or Codex.

Why can a TLS check on an IP fail?

SNI needs a hostname, so CDN-fronted origins can reject an IP-literal handshake.

Is netdiag MCP free?

Yes. netdiag MCP is open source, so you can use and self-host it for free.

How do I add netdiag MCP to Claude Code?

Run this command in your terminal: claude mcp add netdiag-mcp -- uvx netdiag-mcp

What are the best alternatives to netdiag MCP?

The closest alternatives to netdiag MCP are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers