Skip to main content
Glama
Network Diagnostics MCP

Network Diagnostics MCP

by Ahmad-1276

Network Diagnostics MCP

Let agents inspect interfaces, DNS, reachability, and open TCP ports.

Python MCP License

Tools

Tool

Description

list_interfaces

Network interfaces with addresses, state, speed, and MTU

get_interface_stats

Per-interface byte, packet, error, and drop counters

dns_lookup

Resolve a hostname to IPv4/IPv6 addresses

ping_host

Send ICMP echo requests and report reachability

check_tcp_port

Check whether a TCP port is open and measure latency

Related MCP server: connectivity-diagnostics

Requirements

  • Python 3.10+

  • pip install -e .

Install

git clone https://github.com/Ahmad-1276/network-diagnostics-mcp.git
cd network-diagnostics-mcp

python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate

pip install -e .

Run

network-diagnostics-mcp
# or
python -m network_diagnostics_mcp.server

The server speaks the MCP stdio protocol and waits for a client.

Connect an MCP client

Add this to your client's MCP config (Claude Desktop, Cursor, VS Code, etc.):

{
  "mcpServers": {
    "network-diagnostics": {
      "command": "/absolute/path/to/.venv/bin/network-diagnostics-mcp",
      "args": []
    }
  }
}

Use the absolute path to the executable inside your virtual environment. On Windows the path is .venv\Scripts\network-diagnostics-mcp.exe.

Example prompts

  • List network interfaces and IP addresses.

  • Resolve example.com.

  • Can this host reach 1.1.1.1?

  • Is port 443 open on github.com?

Notes

ping_host and check_tcp_port generate network traffic. Hostnames are validated and commands are executed without a shell. Some networks block ICMP or outbound ports.

Development

pip install -e ".[dev]"
pytest -q

License

MIT — see LICENSE.

Available Tools

5 tools
check_tcp_portC

Check whether a TCP port is open and measure connection latency.

Inputs: host (required), port (required), timeout. Returns: object

dns_lookupC

Resolve a hostname to IPv4/IPv6 addresses.

Inputs: host (required). Returns: object

get_interface_statsA

Return per-interface byte, packet, error, and drop counters.

Inputs: no named parameters. Returns: object

list_interfacesA

Return network interfaces with addresses, state, speed, and MTU.

Inputs: no named parameters. Returns: object

ping_hostB

Send ICMP echo requests and report reachability.

Args: host: Hostname or IP address (no shell metacharacters). count: Number of echo requests (1-10).

Inputs: host (required), count. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a clearly distinct networking task: interface enumeration, interface counters, DNS resolution, ICMP reachability, and TCP port checks. There is little risk of confusing one tool with another.

    Naming Consistency4/5

    All names use consistent snake_case and are readable, but the verb pattern is slightly mixed: dns_lookup is noun-oriented while the others use verbs like list, get, ping, and check. This is a minor deviation rather than a systemic issue.

    Tool Count5/5

    Five tools is well-scoped for a network diagnostics server. Each tool has a clear diagnostic purpose and none feel redundant or extraneous.

    Completeness4/5

    The core diagnostic surface is covered: interfaces, stats, DNS, ping, and TCP connectivity. Minor gaps such as traceroute, route table inspection, or UDP checks exist but are not essential for basic troubleshooting.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Network diagnostics — ping, traceroute, DNS lookup, port scanning, and connectivity testing via MCP.
      14
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to debug local networks in plain language by pinging, sweeping subnets, tracing routes, resolving DNS, scanning ports, inspecting ARP tables and active connections, and checking URL reachability.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables coding agents to perform network diagnostics and lookups, including subnet calculations, port and MAC vendor information, DNS and blocklist checks, TLS certificate inspection, and public IP discovery, all without needing an account or sending telemetry.
      11
      MIT