# netdiag MCP

> netdiag MCP is an open-source MCP server for developer tools. MCP server for one-off DNS, ping, TLS, HTTP and WHOIS checks from a chat. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Linux, macOS
- **Repository:** https://github.com/shigechika/netdiag-mcp
- **MCP Registry name:** io.github.shigechika/netdiag-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

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

### Cursor (~/.cursor/mcp.json)

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

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

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add netdiag-mcp -- uvx netdiag-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

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

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

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

### Devin Desktop (~/.config/devin/mcp_config.json)

```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.

### Cline (cline_mcp_settings.json)

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

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

### Zed (Zed settings.json)

```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.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

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

### Kiro (~/.kiro/settings/mcp.json)

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

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

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_lookup` (name suggests: reads): Resolve a DNS record with dig
- `dnssec_check` (name 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_check` (name suggests: reads): Check whether a TCP port accepts a connection
- `http_check` (name suggests: reads): HEAD or GET a URL and report status, redirects and latency
- `http_get` (name suggests: reads): GET a URL and return a text body
- `tls_cert_check` (name suggests: reads): Report the certificate a host presents
- `whois_lookup` (name suggests: reads): WHOIS lookup for a domain
- `asn_lookup` (name 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_check` (name suggests: reads): Version and which wrapped binaries are present

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/netdiag-mcp
