# NetsCLI

Network scanner that lets coding agents discover subnet hosts, inspect TCP and UDP ports, query DNS records, and examine ARP tables.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 19
- Author: fstubner
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/fstubner/netscli
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/netscli

## What it does

NetsCLI exposes structured network investigation tools directly to language models. Instead of parsing messy terminal output from shell utilities, the assistant receives direct responses from Rust-based routines. The default configuration includes nine operations: host discovery, port scanning, ping checks, DNS lookups, mDNS resolution, network interface inspection, and ARP lookups.

Accessing external endpoints requires setting the `NETSCLI_MCP_ALLOW_PUBLIC_TARGETS` environment variable. Specific builds compiled with packet capture support provide four extra diagnostic tools. Clients can invoke the service via `npx` or by launching an installed binary with `netscli serve`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `NETSCLI_MCP_ALLOW_PUBLIC_TARGETS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env NETSCLI_MCP_ALLOW_PUBLIC_TARGETS=<NETSCLI_MCP_ALLOW_PUBLIC_TARGETS> --transport stdio netscli -- npx -y netscli
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add netscli --env NETSCLI_MCP_ALLOW_PUBLIC_TARGETS=<NETSCLI_MCP_ALLOW_PUBLIC_TARGETS> -- npx -y netscli
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "netscli": {
            "command": "npx",
            "args": [
                "-y",
                "netscli"
            ],
            "env": {
                "NETSCLI_MCP_ALLOW_PUBLIC_TARGETS": "<NETSCLI_MCP_ALLOW_PUBLIC_TARGETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "netscli": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "netscli"
            ],
            "env": {
                "NETSCLI_MCP_ALLOW_PUBLIC_TARGETS": "<NETSCLI_MCP_ALLOW_PUBLIC_TARGETS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e NETSCLI_MCP_ALLOW_PUBLIC_TARGETS=<NETSCLI_MCP_ALLOW_PUBLIC_TARGETS> netscli npx -y netscli
```
Replace <…> with your own values

## When to use it
- locate active devices across the local subnet
- check open TCP and UDP ports on a given IP
- fetch DNS and mDNS records for a domain
- inspect the system ARP cache with vendor details

## Example prompts
- Scan ports 22, 80, and 443 on host 192.168.1.10.
- Discover all reachable devices on my subnet.
- Inspect example.com to check ping latency and DNS records.

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
