A comprehensive network scanning and management solution with a modern web interface, RESTful API, and AI integration via Model Context Protocol (MCP).
Author: Bryan Kemp bryan@kempville.com
License: BSD 3-Clause
Version: 1.0.0
- Features
- Quick Start
- Installation
- Architecture
- Usage
- API Documentation
- MCP Integration
- Development
- Testing
- Deployment
- Container Registry
- Troubleshooting
- π Parallel Network Scanning - Efficient multi-network CIDR scanning
- π₯οΈ Virtual Machine Detection - Automatic identification of VMs and containers
- π Service Discovery - Comprehensive port scanning with service/version detection
- π Network Topology - Traceroute mapping and visualization
- π OS Fingerprinting - Operating system detection with accuracy scoring
- β° Cron-based Schedules - Create recurring scans with flexible cron expressions
- π Pre-configured Presets - Common schedules (hourly, daily, weekly, etc.)
- π Manual Trigger - On-demand execution of scheduled scans
- π HTML Reports - Detailed, styled network scan reports
- π Excel Exports - Structured data in XLSX format
- πΊοΈ Network Diagrams - Auto-generated topology maps (PNG/SVG)
- π¨ Modern Flutter UI - Responsive Material Design 3 interface
- π± Mobile-Ready - Works on desktop, tablet, and mobile
- π Dark/Light Themes - Automatic theme switching
- π Role-based Access - Admin and user roles
- π JWT Authentication - Secure token-based authentication
- π€ Claude/Warp AI Integration - Query scan data using natural language
- π¬ Conversational Queries - "Show me all VMs" or "What services are running on 192.168.1.10?"
- π Network Statistics - Get insights via AI assistants
# Clone the repository
git clone https://github.com/yourusername/network-scan.git
cd network-scan
# Set up development environment
python3 setup.py dev
# Run tests
python3 setup.py test
# Start the backend server
cd backend
source venv/bin/activate
uvicorn app.main:app --reloadThe API will be available at http://localhost:8000
API documentation at http://localhost:8000/docs
# Build and run
python3 setup.py docker
# Or use docker-compose
docker-compose up -d# Install as system service (macOS/Linux)
python3 setup.py serviceRequired:
- Python 3.8+
- nmap
Optional:
- Flutter 3.9+ (for web UI)
- Docker (for containers)
- Graphviz (for diagrams)
# Backend
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Frontend (optional)
cd frontend
flutter pub get
# MCP Server
cd mcp_server
pip install -r requirements.txtnetwork-scan/
βββ backend/ # FastAPI REST API
βββ frontend/ # Flutter web app
βββ mcp_server/ # AI integration
βββ tests/ # Test suite
βββ setup.py # Setup automation
βββ run_tests.py # Test runner
Tech Stack: FastAPI, Flutter, SQLite, nmap, MCP
# Create scan
curl -X POST http://localhost:8000/api/scans \
-H "Content-Type: application/json" \
-d '{"network_range": ["192.168.1.0/24"]}'
# Get scan details
curl http://localhost:8000/api/scans/1
# Download reports
curl http://localhost:8000/api/scans/1/artifacts/html -o report.html
curl http://localhost:8000/api/scans/1/artifacts/xlsx -o report.xlsxNavigate to http://localhost:8000
Default Credentials:
- Username:
admin - Password:
Admin123! β οΈ Change on first login!
Interactive docs: http://localhost:8000/docs
POST /api/scans- Create scanGET /api/scans- List scansPOST /api/schedules- Create scheduleGET /api/hosts/unique- Latest host dataGET /api/stats- Network statisticsPOST /api/auth/login- Authentication
list_scans- List all scansquery_hosts- Search hostsget_host_services- Get services for hostget_network_stats- Network statisticslist_vms- List VMs/containerssearch_service- Find service on network
Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json
Warp AI: ~/.warp/mcp_config.json
{
"mcpServers": {
"network-scanner": {
"command": "python3",
"args": ["/path/to/network-scan/mcp_server/server.py"],
"env": {
"DATABASE_PATH": "/path/to/network-scan/network_scanner.db"
}
}
}
}# Run with auto-reload
cd backend
source venv/bin/activate
uvicorn app.main:app --reload
# Code quality
black backend/ --line-length 100
ruff check backend/
# Tests
python3 setup.py testTotal: 92 tests (33 backend, 38 MCP, 21 frontend)
# All tests
python3 setup.py test
# Individual components
cd backend && pytest tests/ -v
cd mcp_server && pytest test_mcp_server.py -v
cd frontend && flutter testThe easiest way to run Network Scanner is using the pre-built container image:
# Pull the latest image
docker pull ghcr.io/bryank/network-scan:latest
# Run the container
docker run -d \
--name network-scan \
--cap-add NET_RAW \
--cap-add NET_ADMIN \
-p 8000:8000 \
-p 8001:8001 \
-v $(pwd)/data/scan_outputs:/app/scan_outputs \
-v $(pwd)/data/database:/app/database \
ghcr.io/bryank/network-scan:latestUsing docker-compose with GHCR:
Create docker-compose.ghcr.yml:
services:
network-scan:
container_name: network-scan
image: ghcr.io/bryank/network-scan:latest
ports:
- "8000:8000"
- "8001:8001"
environment:
- PYTHONUNBUFFERED=1
- TZ=America/Chicago
volumes:
- ./data/scan_outputs:/app/scan_outputs
- ./data/database:/app/database
cap_add:
- NET_RAW
- NET_ADMIN
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40sThen run:
docker-compose -f docker-compose.ghcr.yml up -dAvailable Tags:
latest- Most recent stable releasev1.0.0- Specific versionmain- Latest from main branch
python3 setup.py docker
docker-compose -f docker-compose.production.yml up -dFor detailed information about using GitHub Container Registry, building multi-architecture images, and publishing workflows, see:
π CONTAINER_REGISTRY.md - Complete container registry guide
Key topics covered:
- Pulling and running pre-built images
- Authentication for private registries
- Multi-architecture support (amd64, arm64)
- GitHub Actions automation
- Tag strategies and best practices
python3 setup.py service
# Manage service
# macOS: launchctl list | grep network-scanner
# Linux: sudo systemctl status network-scannerCreate backend/.env:
SECRET_KEY=your-secret-key-here
DEBUG=False
SCAN_PARALLELISM=8nmap not found
# macOS
brew install nmap
# Linux
sudo apt-get install nmapPermission denied
# Linux: Grant nmap capabilities
sudo setcap cap_net_raw,cap_net_admin+eip $(which nmap)Container Permission Issues
If the container can't scan, ensure the container has the required capabilities:
docker run --cap-add NET_RAW --cap-add NET_ADMIN ...Container Image Authentication
For private registries or rate limiting:
# GitHub Container Registry
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
# Then pull
docker pull ghcr.io/bryank/network-scan:latestDatabase locked
For high concurrency, use PostgreSQL instead of SQLite.
BSD 3-Clause License - see LICENSE file
- Email: bryan@kempville.com
- Issues: GitHub Issues
Made with β€οΈ by Bryan Kemp