Nikto MCP Server for AI Scanner Integration
Deploy a secure MCP server to enable AI agents to run Nikto web scans via npx or Docker for automated, centralized vulnerability testing.
npx -y @weldpua2008/nikto-mcpOverview
This project implements an MCP (Model Context Protocol) server that exposes Nikto web-scanning as a programmable tool for AI agents and automation pipelines. By running a centralized MCP server you can give AI agents (or orchestration systems) a consistent, secure interface to launch Nikto scans, collect results in structured formats, and manage scan artifacts — without giving agents direct access to raw system processes or networked scanners.
The server is useful for teams that want to integrate vulnerability discovery into automated workflows (CI/CD, triage agents, red-team tooling) while retaining central control over scan policies, resource limits, authentication, and logging. It supports running Nikto either via a local Node environment (npx) or through Docker containers, making deployment flexible to fit different infrastructure and security postures.
Features
- Exposes Nikto as an MCP-compatible tool that agents can discover and invoke
- Supports backend execution via npx (local Node) or Docker container
- Returns scan output in JSON and raw report formats for downstream processing
- Configurable resource and timeout limits to reduce blast radius
- API key / token-based access control with optional TLS support
- Scan artifact storage and retrieval (logs, reports)
- Simple manifest endpoint so agents can auto-discover available tools and invocation schema
Installation / Configuration
The server can be deployed locally for development or in a container for production. Below are two common approaches.
Clone the repository:
Run locally (Node / npx)
# install deps and run (development)
# start with environment variables
MCP_PORT=3000 MCP_API_KEY=changeme
Run via Docker (recommended for production isolation)
# build from repository
# run with basic environment configuration
Example environment variables
| Variable | Description | Default |
|---|---|---|
| MCP_PORT | TCP port the MCP server listens on | 3000 |
| MCP_API_KEY | Shared API key for client authentication | (none) |
| NIKTO_BACKEND | Execution backend: docker or local | local |
| DOCKER_IMAGE | Docker image to use for nikto scans | nikto:latest |
| SCAN_TIMEOUT | Per-scan timeout (seconds) | 600 |
Notes
- Enable TLS by placing a reverse proxy (nginx/Caddy) in front of the container or configure the server to use certs if provided.
- Use firewall/network policies to restrict scanning targets or isolate the scanning subnet.
Available Resources
The server implements the typical MCP-style discovery and invocation pattern so AI agents can integrate programmatically.
- Manifest endpoint (tool discovery)
- GET /mcp/manifest — returns the list of tools, schemas, and accepted arguments
- Invocation endpoint (run a scan)
- POST /mcp/invoke — request body includes tool name (e.g., “nikto”) and args
- Artifacts / logs
- GET /artifacts/:id — fetch saved scan reports (JSON, HTML, txt)
- Health & metrics
- GET /health — basic liveness/checks
- GET /metrics — optional Prometheus metrics export
Example invocation payload (illustrative)
Example response (illustrative)