# NetsCLI

> NetsCLI is an open-source MCP server for security. Network scanner for AI agents: host discovery, port scans, DNS, ARP and mDNS lookups. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Windows, Linux, self-hosted
- **Website:** https://netscli.com/docs/mcp/
- **Repository:** https://github.com/fstubner/netscli
- **MCP Registry name:** io.github.fstubner/netscli
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-16

## About

NetsCLI is a Rust network scanner with a command line, terminal UI, desktop app and this MCP server, all built on one library. By default the server exposes nine tools and returns structured results, so an agent can ask which device joined the network or whether port 22 is open on a host instead of parsing human-oriented output. Packet-capture builds add four more tools, but the npm package leaves capture out because it needs libpcap or Npcap.

Scanning is restricted to your own networks unless you set NETSCLI_MCP_ALLOW_PUBLIC_TARGETS, which is off by default. The server speaks JSON-RPC over stdio and can be run from an installed binary, via npx, or as an .mcpb bundle that carries its own binary. Installing the binary is preferred, since packet capture then works and the version is the one you chose.

The project is MIT licensed, with installers for macOS, Linux and Windows.

## Features

- **Host discovery:** Find reachable hosts on a subnet and sweep selected ports.
- **TCP and UDP scanning:** Return open ports, with closed ones on request.
- **DNS, ARP and mDNS:** Query records, read the ARP cache and discover local services.
- **Host inspection:** Combine reachability, DNS, MAC vendor, OS hint and ports.
- **Local-only default:** Scanning beyond your own networks must be explicitly enabled.
- **Optional packet capture:** Capture-enabled builds add pcap tools.

## Good for

- Ask which device just joined the home network
- Check whether a port is open on a server you manage
- Inventory local mDNS services
- Get structured scan output into scripts or agents

## Install

### Claude Code (Terminal)

```sh
claude mcp add netscli -- npx -y netscli
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "netscli": {
      "command": "npx",
      "args": [
        "-y",
        "netscli"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "netscli": {
      "command": "npx",
      "args": [
        "-y",
        "netscli"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "netscli": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "netscli"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "netscli": {
      "command": "npx",
      "args": [
        "-y",
        "netscli"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "netscli": {
      "command": "npx",
      "args": [
        "-y",
        "netscli"
      ]
    }
  }
}
```

## Tools

- `discover_network`: Discover reachable hosts on a subnet
- `scan_ports`: Scan TCP ports or UDP services on a host
- `ping_host`: Check reachability and latency
- `dns_lookup`: Query DNS records
- `get_arp_table`: Read the local ARP cache
- `inspect_host`: Build a host profile
- `sweep_network`: Discover hosts and scan selected ports
- `list_network_interfaces`: List local network interfaces
- `discover_mdns`: Discover mDNS and DNS-SD services
- `capture_pcap`: Capture packets in one blocking call
- `start_pcap_capture`: Start a packet capture job
- `get_pcap_capture_status`: Poll a capture job
- `get_pcap_capture_result`: Fetch a completed capture

## FAQ

### Can it scan public hosts?

Not by default. Setting NETSCLI_MCP_ALLOW_PUBLIC_TARGETS to 1 allows targets outside your own networks.

### Does it need installing?

No. You can run it with npx, but installing the binary is preferred and enables packet capture.

### How many tools are there?

Nine by default, plus four with packet-capture support.

### What licence?

MIT.

### Is NetsCLI free?

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

### How do I add NetsCLI to Claude Code?

Run this command in your terminal: claude mcp add netscli -- npx -y netscli

### What are the best alternatives to NetsCLI?

The closest alternatives to NetsCLI are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [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-2): 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.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

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