A secure MCP (Model Context Protocol) server that enables AI agents to interact with Nikto web server scanner for comprehensive web security scanning.
- β¨ Key Features
- β‘ Quick Start
- π Prerequisites & Installation
- π§ Configuration
- π οΈ Available Tools
- π Security Features
- π‘ Example Usage
- π€ Contributing
- License
- β 100% TypeScript β fully typed, production-ready
- π Multiple output formats β JSON (machine-readable) and rich CLI (human-readable)
- π Optional REST API for remote scan management
- π‘οΈ Secure by default β sandboxed execution, sensible timeouts, and minimal privileges
- π³ Docker support with proper volume mounting and JSON output handling
# Install and run with MCP Inspector
npx @modelcontextprotocol/inspector nikto-mcp@latest
Requirements:
- Node.js 20 or newer
- Nikto Scanner - Install and ensure it's accessible in your PATH
- MCP Client - VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client
Basic Configuration:
{
"mcpServers": {
"niktomcp": {
"command": "npx",
"args": [
"nikto-mcp@latest"
]
}
}
}
Install Nikto:
# macOS
brew install nikto
# Ubuntu/Debian
sudo apt-get install nikto
# Or from source
git clone https://github.com/sullo/nikto
Install in VS Code
You can also install the Nikto MCP server using the VS Code CLI:# For VS Code
code --add-mcp '{"name":"niktomcp","command":"npx","args":["nikto-mcp@latest"]}'
After installation, the Nikto MCP server will be available for use with your GitHub Copilot agent in VS Code.
Install in Cursor
Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, use `command` type with the command `npx nikto-mcp@latest`. You can also verify config or add command like arguments via clicking `Edit`.{
"mcpServers": {
"niktomcp": {
"command": "npx",
"args": [
"nikto-mcp@latest"
]
}
}
}
Install in Windsurf
Follow Windsurf MCP documentation. Use following configuration:
{
"mcpServers": {
"niktomcp": {
"command": "npx",
"args": [
"nikto-mcp@latest"
]
}
}
}
Install in Claude Desktop
Follow the MCP install guide, use following configuration:
{
"mcpServers": {
"niktomcp": {
"command": "npx",
"args": [
"nikto-mcp@latest"
]
}
}
}
Install in Claude Code
Use the Claude Code CLI to add the Nikto MCP server:
claude mcp add nikto-mcp npx nikto-mcp
Install in Goose
Go to `Advanced settings` -> `Extensions` -> `Add custom extension`. Name to your liking, use type `STDIO`, and set the `command` to `npx nikto-mcp`. Click "Add Extension".Install in Qodo Gen
Open Qodo Gen chat panel in VSCode or IntelliJ β Connect more tools β + Add new MCP β Paste the following configuration:
{
"mcpServers": {
"niktomcp": {
"command": "npx",
"args": [
"nikto-mcp@latest"
]
}
}
}
Click Save
.
Install in Gemini CLI
Follow the MCP install guide, use following configuration:
{
"mcpServers": {
"niktomcp": {
"command": "npx",
"args": [
"nikto-mcp@latest"
]
}
}
}
# Install and run with MCP Inspector
npx @modelcontextprotocol/inspector nikto-mcp@latest
Add to your MCP client configuration:
{
"mcpServers": {
"nikto": {
"command": "node",
"args": ["/absolute/path/to/nikto-mcp/index.js"],
"env": {
"NIKTO_BINARY": "/usr/local/bin/nikto",
"LOG_LEVEL": "info"
}
}
}
}
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Test the server
npx @modelcontextprotocol/inspector node index.js
NIKTO_MODE
- Execution mode:local
ordocker
(default:local
)NIKTO_DOCKER_IMAGE
- Docker image to use (default:ghcr.io/sullo/nikto:latest
)NIKTO_DOCKER_NETWORK
- Docker network mode (default:host
)NIKTO_BINARY
- Path to Nikto executable for local mode (default:nikto
)LOG_LEVEL
- Logging level: debug, info, warn, error (default:info
)MCP_STDOUT_LOGS
- Allow info/debug logs to stdout:allow
or unset (default: discarded for MCP compatibility)SCAN_TIMEOUT
- Maximum scan duration in seconds (default:3600
)MAX_CONCURRENT_SCANS
- Maximum concurrent scans (default:3
)
Note: JSON output automatically uses unique filenames per scan (
/tmp/nikto-scan-<uuid>.json
) to prevent concurrent scan collisions.
The MCP server supports running Nikto via Docker for better isolation and consistency.
{
"mcpServers": {
"nikto": {
"command": "node",
"args": ["/absolute/path/to/nikto-mcp/index.js"],
"env": {
"NIKTO_MODE": "docker",
"NIKTO_DOCKER_IMAGE": "ghcr.io/sullo/nikto:latest",
"NIKTO_DOCKER_NETWORK": "host",
"LOG_LEVEL": "info"
}
}
}
}
# Build the MCP server with embedded Nikto
docker build -t nikto-mcp .
# Run the containerized MCP server
docker run --rm -i nikto-mcp
# Run with custom configuration
docker run --rm -i \
-e NIKTO_MODE=local \
-e LOG_LEVEL=debug \
nikto-mcp
The enhanced scan
tool supports comprehensive Nikto command-line options for flexible web security scanning.
{
"target": "https://example.com"
}
{
"target": "https://example.com",
"port": 8443,
"ssl": true,
"nolookup": true,
"vhost": "internal.example.com",
"timeout": 1800,
"outputFormat": "json",
"dryRun": false
}
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
target |
string | β | - | Target URL, IP address, or hostname |
port |
number | β | 80 | Port number (1-65535) |
ssl |
boolean | β | false | Force SSL/HTTPS mode |
nossl |
boolean | β | false | Disable SSL (mutually exclusive with ssl ) |
nolookup |
boolean | β | false | Disable DNS lookups |
timeout |
number | β | 3600 | Request timeout in seconds |
vhost |
string | β | - | Virtual host for Host header |
outputFormat |
enum | β | "json" | Output format: "json" or "text" |
dryRun |
boolean | β | false | Test command generation without execution |
- Basic:
nikto -h https://example.com -timeout 3600 -nointeractive
- Advanced:
nikto -h example.com -p 8443 -ssl -nolookup -vhost internal.example.com -timeout 1800 -Format json -nointeractive
Get the current status and results of a running scan.
{
"scanId": "uuid-of-scan"
}
Terminate a currently running scan.
{
"scanId": "uuid-of-scan"
}
- π‘οΈ Input sanitization to prevent command injection
- β Comprehensive validation of targets, ports, and hostnames
- π Sandboxed execution with configurable timeouts and concurrent limits
β οΈ Safe defaults and conflict prevention between options
See examples/scan-demo.js
for comprehensive examples of all supported options and use cases:
node examples/scan-demo.js
- Fork the repository
- Create your feature branch (
git checkout -b feature/awesome
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/awesome
) - Open a Pull Request
Bug reports and feature requests are welcome via GitHub Issues.
This project is licensed under the GNU General Public License v3.0.
Commercial licenses are available for organizations that wish to use this software under different terms. For more information, please contact: weldpua2008