Linux Network Scanner MCP Server
Provides comprehensive network vulnerability scanning capabilities using Linux tools like nmap, including network discovery, port scanning, service identification, vulnerability assessment, and device detection for authorized security testing.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
# NetSecMCP
NetSecMCP is a secure, modular network security assessment platform designed for authorized lab environments. It combines MCP-compatible tools with a lightweight agentic workflow, centralized authorization checks, and an allowlisted execution engine.
What changed
The original repository was refactored away from shell-based, unconstrained scanning primitives toward a safer architecture:
Centralized asynchronous subprocess execution using
asyncio.create_subprocess_execNo
shell=TrueNo string concatenation of untrusted arguments into shell commands
Executable allowlist enforcement
Explicit IPv4/IPv6 and CIDR validation
Private-network default allowlist
Scan profile enforcement and timeout limits
Persistent scan history via repository abstraction
Agentic orchestration skeleton using LangGraph when available
Related MCP server: Kali Pentest MCP Server
Core architecture
NetSecMCP/
├── server.py
├── src/netsecmcp/
│ ├── config.py
│ ├── main.py
│ ├── core/
│ │ ├── executor.py
│ │ ├── permissions.py
│ │ ├── validator.py
│ │ ├── scheduler.py
│ │ └── exceptions.py
│ ├── mcp_server/
│ │ └── server.py
│ ├── scanners/
│ │ ├── nmap.py
│ │ ├── masscan.py
│ │ ├── sslscan.py
│ │ └── nuclei.py
│ ├── parsers/
│ │ └── nmap_parser.py
│ ├── models/
│ │ ├── asset.py
│ │ ├── finding.py
│ │ └── scan.py
│ └── storage/
│ ├── database.py
│ └── repository.py
├── agent/
│ ├── graph.py
│ ├── planner.py
│ ├── state.py
│ └── nodes/
│ ├── scope_validator.py
│ ├── recon.py
│ ├── scanning.py
│ ├── analysis.py
│ ├── verification.py
│ └── reporting.py
├── api/
│ └── main.py
├── pyproject.toml
├── Dockerfile
├── requirements.txt
├── README.md
└── tests/Security principles
Explicit authorization is required for every scan target.
Default policy allows only lab-safe private ranges such as
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16, and loopback ranges.Intrusive operations such as credential brute force, stealth scanning, and exploit execution are intentionally removed from the default tool surface.
Commands are limited to an executable allowlist and are validated before execution.
Every execution returns structured output and capture limits to prevent runaway or oversized logs.
MCP tools exposed
The server currently includes safe, authorized tools:
authorize_targetscan_networkscan_portsscan_servicesscan_sslrun_security_assessmentassessment_planCompatibility aliases:
networkDiscovery,portScan,osDetection,webScan,sslScan
Typical usage
from netsecmcp.mcp_server.server import mcp
# The tool runner enforces allowed targets and scan limits.
# Example: authorized lab target only.Running locally
Install the Python dependencies and ensure Nmap is available on PATH:
python -m pip install -r requirements.txt
python server.pyThe MCP server uses stdio transport. For Docker:
docker build -t netsecmcp .
docker run --rm -i netsecmcpScans are restricted to the CIDRs configured in NetSecConfig.allowed_cidrs in
src/netsecmcp/config.py. The defaults permit private IPv4 lab ranges,
carrier-grade NAT space, and loopback; public targets are denied. Keep the
allowlist narrow and limited to systems you are authorized to assess.
The scanner adapters currently use Nmap for discovery, port, and service scans;
OpenSSL is used for the TLS connection check. Additional adapters are present
for Masscan, sslscan, and Nuclei, but their executables must be installed in the
runtime image before those adapters can be used. Scan history is stored locally
in .netsecmcp/scan_history.json.
Validation
Run the unit and execution-policy tests with:
python -m unittest discover -s tests -vNotes
The LangGraph workflow and API are scaffolding and are not enabled as live assessment interfaces by the MCP server. This project intentionally focuses on safe, authorized assessment patterns for lab and controlled environments. It does not implement credential theft, stealth evasion, persistence, or unauthorized exploitation.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Nmap Cloud - Port Scanner & Service Detection | Free Trial
Autonomous AppSec & DAST scanner across 12 security domains (260+ controls) with 3-Layer Triage.
Threat modeling, code/cloud/pipeline scanning, shadow-AI discovery, compliance checks and fixes.
Agent rental platform: web-vuln scanning, OSINT and red-team tools via subscription.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides secure access to Kali Linux security tools through a dockerized environment for authorized penetration testing and defensive security. Enables network scanning, web application testing, system enumeration, and credential testing with built-in input sanitization and network restrictions.MIT
- -licenseNot gradedqualityDmaintenanceProvides secure access to Kali Linux penetration testing tools including nmap, nikto, dirb, wpscan, and sqlmap for educational vulnerability assessment on whitelisted targets. Runs in a controlled Docker environment and includes reconnaissance capabilities for authorized security testing.1-
- AlicenseNot gradedqualityDmaintenanceEnables network discovery, port scanning, and infrastructure monitoring with device detection, service fingerprinting, and cluster health checks for autonomous AI systems.3MIT
- FlicenseNot gradedqualityDmaintenanceProvides access to over 40 industry-standard penetration testing tools, including Nmap, SQLMap, and Metasploit, within an isolated Kali Linux Docker container. It enables security professionals to perform comprehensive network reconnaissance, web application testing, and vulnerability research through natural language commands.-