Kali MCP Server
Exposes 20+ Kali Linux security tools for performing authorized penetration testing and security assessments, including network scanning, web application testing, password cracking, and exploit database searches.
Provides access to Metasploit's msfvenom payload generator for creating custom exploit payloads in various formats.
Enables packet capture and analysis using Wireshark's CLI tool (tshark) for network traffic inspection.
Integrates WPScan for performing security scans and vulnerability assessments on WordPress installations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kali MCP Server scan ports 22,80,443 on 192.168.1.1 with nmap"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kali MCP Server
A production-quality MCP (Model Context Protocol) server that exposes 20+ Kali Linux security tools through an AI-friendly interface, enabling AI assistants to perform penetration testing and security assessments in a controlled, structured manner.
⚠️ LEGAL NOTICE
This tool is intended for AUTHORIZED security testing only.
You MUST have explicit written permission to test any systems
Unauthorized access to computer systems is ILLEGAL
Users are responsible for ensuring proper authorization
The authors assume NO LIABILITY for misuse of this tool
By using this tool, you acknowledge that you have proper authorization and accept full responsibility for your actions.
Related MCP server: Kali MCP Server
Features
20+ Security Tools across multiple categories
Type-safe using TypeScript and Zod validation
Safe execution with command allowlists, timeouts, and output limits
Input validation to prevent command injection
Rate limiting to prevent abuse
Structured output with proper error handling
MCP-compliant for seamless AI integration
Supported Tools
Network Tools (6)
nmap - Network port scanning and service detection
nmap discover - Host discovery on networks
masscan - High-speed port scanner
netdiscover - ARP reconnaissance
tcpdump - Packet capture
tshark - Wireshark CLI for packet analysis
Web Security Tools (7)
gobuster dir - Directory/file enumeration
gobuster dns - Subdomain enumeration
sqlmap - SQL injection testing
nikto - Web server scanner
wpscan - WordPress security scanner
ffuf - Web fuzzer
nuclei - Template-based vulnerability scanner
Password Tools (3)
hydra - Network login brute-forcer
john - John the Ripper password cracker
hashcat - Advanced password recovery
Exploitation Tools (3)
searchsploit - Exploit database search
searchsploit examine - View exploit details
msfvenom - Metasploit payload generator
Installation
Prerequisites
Kali Linux (or any Linux distribution with security tools installed)
Node.js 18+ and npm
Security tools installed on your system
Install Security Tools (Kali Linux)
sudo apt update
sudo apt install -y \
nmap masscan netdiscover tcpdump tshark \
gobuster sqlmap nikto wpscan ffuf nuclei \
hydra john hashcat \
exploitdb metasploit-frameworkInstall MCP Server
cd kali-mcp-server
npm install
npm run buildUsage
Running the Server
# Start the server
npm start
# Or run directly
node dist/index.jsTesting with MCP Inspector
# Launch the MCP Inspector for interactive testing
npm run inspector
# Or
npx @modelcontextprotocol/inspector node dist/index.jsIntegrating with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"kali-security": {
"command": "node",
"args": ["/path/to/kali-mcp-server/dist/index.js"]
}
}
}Tool Reference
Network Tools
kali_network_nmap_scan
Perform network port scanning using Nmap.
Example:
{
"target": "192.168.1.1",
"ports": "22,80,443",
"scan_type": "tcp_syn",
"timing": "normal",
"service_version": true
}Parameters:
target(required): IP, hostname, or CIDR rangeports(optional): Port specification (default: top 1000)scan_type: tcp_syn, tcp_connect, udp, ack, null, fin, xmastiming: paranoid, sneaky, polite, normal, aggressive, insaneos_detection: Enable OS detection (requires root)service_version: Probe for service versionsscript_scan: NSE scripts to runaggressive: Enable aggressive scantimeout: Timeout in seconds (default: 300)
kali_network_nmap_discover
Discover live hosts on a network.
Example:
{
"network": "192.168.1.0/24",
"method": "ping",
"timeout": 120
}Web Tools
kali_web_gobuster_dir
Enumerate directories and files on web servers.
Example:
{
"url": "https://example.com",
"wordlist": "/usr/share/wordlists/dirb/common.txt",
"extensions": "php,html,txt",
"threads": 10
}kali_web_sqlmap_test
Automated SQL injection testing.
Example:
{
"url": "https://example.com/page?id=1",
"level": 1,
"risk": 1,
"batch": true
}WARNING: Only use on systems you have authorization to test.
Password Tools
kali_password_hydra_brute
Fast network login brute-forcer.
Example:
{
"target": "192.168.1.1",
"service": "ssh",
"username": "admin",
"password_list": "/usr/share/wordlists/rockyou.txt",
"threads": 16
}WARNING: Only use on systems you have authorization to test.
Exploitation Tools
kali_exploit_searchsploit_search
Search the Exploit Database.
Example:
{
"query": "apache 2.4",
"platform": "linux"
}Or search by CVE:
{
"cve": "CVE-2021-44228"
}kali_exploit_msfvenom_generate
Generate custom payloads.
Example:
{
"payload": "linux/x64/shell_reverse_tcp",
"lhost": "192.168.1.100",
"lport": 4444,
"format": "elf"
}Security Features
Command Allowlist
Only pre-approved commands can be executed. The server maintains a strict allowlist of permitted security tools.
Input Validation
All inputs are validated before execution:
IP addresses and CIDR ranges
Hostnames and URLs
Port numbers and ranges
File paths (no directory traversal)
No shell metacharacters
Output Sanitization
Sensitive information is automatically redacted from output:
Passwords
API keys
Tokens
Secrets
Execution Limits
Timeouts: Configurable per tool (default: 5 minutes)
Output size: Maximum 10MB per command
Rate limiting: 10 commands per minute, 100 per hour
Process Isolation
All commands are executed in isolated child processes with:
Separate stdout/stderr capture
Graceful timeout handling
Resource cleanup
Configuration
Environment Variables
Customize tool paths using environment variables:
export NMAP_PATH=/usr/bin/nmap
export GOBUSTER_PATH=/usr/bin/gobuster
export SQLMAP_PATH=/usr/bin/sqlmap
# ... etcWordlist Paths
Default wordlists (Kali Linux):
/usr/share/wordlists/rockyou.txt/usr/share/wordlists/dirb/common.txt/usr/share/seclists/Discovery/Web-Content/common.txt
Error Handling
The server provides detailed, actionable error messages:
❌ Command failed: nmap -sS 192.168.1.1
🔢 Exit code: 1
📋 Error output:
You requested a scan type which requires root privileges.
Possible causes:
- TCP SYN scan requires root/sudo
- Try using scan_type="tcp_connect" instead
- Run the server with sudo (not recommended)
Suggested actions:
1. Use tcp_connect scan type (doesn't require root)
2. Grant CAP_NET_RAW capability to nmap
3. Check permissions and try againTroubleshooting
Tools Not Found
If tools are not in your PATH:
# Check if tool is installed
which nmap
# Install missing tools
sudo apt install nmap
# Or set custom path
export NMAP_PATH=/custom/path/to/nmapPermission Errors
Some tools require root privileges:
nmap TCP SYN scan (-sS)
masscan
tcpdump/tshark
netdiscover
Solutions:
Use non-privileged alternatives (e.g., nmap TCP connect scan)
Grant specific capabilities:
sudo setcap cap_net_raw+ep /usr/bin/nmapRun server with sudo (not recommended for security reasons)
Timeout Issues
If scans are timing out:
{
"target": "192.168.1.1",
"ports": "1-65535",
"timeout": 1800 // Increase to 30 minutes
}Development
Project Structure
kali-mcp-server/
├── src/
│ ├── index.ts # Main server
│ ├── types.ts # Type definitions
│ ├── constants.ts # Configuration
│ ├── utils/
│ │ ├── executor.ts # Command execution
│ │ ├── validator.ts # Input validation
│ │ ├── formatter.ts # Output formatting
│ │ └── parser.ts # Output parsing
│ ├── tools/
│ │ ├── network.ts # Network tool handlers
│ │ ├── web.ts # Web tool handlers
│ │ ├── password.ts # Password tool handlers
│ │ └── exploit.ts # Exploit tool handlers
│ └── schemas/
│ ├── network.schemas.ts
│ ├── web.schemas.ts
│ ├── password.schemas.ts
│ └── exploit.schemas.ts
└── dist/ # Compiled outputAdding New Tools
Define Zod schema in
src/schemas/[category].schemas.tsImplement tool handler in
src/tools/[category].tsRegister tool in
src/index.tsAdd to
ALLOWED_COMMANDSinsrc/constants.ts
Example:
// 1. Schema
export const MyToolSchema = z.object({
target: z.string().describe("Target to scan"),
option: z.boolean().default(false),
});
// 2. Handler
export async function myTool(input: MyToolInput): Promise<ToolResult> {
const args = [input.target];
if (input.option) args.push("--option");
const result = await executeCommand("mytool", args);
return formatExecutionResult(result);
}
// 3. Register in index.ts
{
name: "kali_category_mytool_action",
description: "Description of what it does",
inputSchema: zodToJsonSchema(MyToolSchema),
}
// 4. Add to ALLOWED_COMMANDS
export const ALLOWED_COMMANDS = new Set([
// ... existing commands
"mytool",
]);Running Tests
npm run build
npm startTest with MCP Inspector:
npm run inspectorCommon Workflows
1. Network Reconnaissance
1. Discover hosts: kali_network_nmap_discover
2. Port scan: kali_network_nmap_scan
3. Service detection: kali_network_nmap_scan with service_version=true
4. Vulnerability scan: kali_network_nmap_scan with script_scan="vuln"2. Web Application Testing
1. Directory enumeration: kali_web_gobuster_dir
2. Subdomain discovery: kali_web_gobuster_dns
3. Vulnerability scanning: kali_web_nikto_scan
4. SQL injection testing: kali_web_sqlmap_test3. Password Assessment
1. Network brute force: kali_password_hydra_brute
2. Hash identification: Manual analysis
3. Hash cracking: kali_password_john_crack or kali_password_hashcat_crack4. Exploit Research
1. Search exploits: kali_exploit_searchsploit_search
2. Examine exploit: kali_exploit_searchsploit_examine
3. Generate payload: kali_exploit_msfvenom_generatePerformance Tips
Use appropriate timing: Balance speed vs stealth
Limit port ranges: Scan only necessary ports
Use wordlists wisely: Smaller wordlists for faster results
Adjust threads: More threads = faster, but more resource-intensive
Set realistic timeouts: Complex scans need more time
Contributing
Contributions are welcome! Please ensure:
All inputs are validated
Commands are in the allowlist
Error messages are actionable
Documentation is updated
Security best practices are followed
License
MIT License - See LICENSE file for details
Acknowledgments
Kali Linux team for the excellent security distribution
Anthropic for the Model Context Protocol
Security tool authors: nmap, gobuster, sqlmap, hydra, john, hashcat, and many more
Disclaimer
This tool is provided for educational and authorized security testing purposes only. The authors are not responsible for any misuse or damage caused by this tool. Always ensure you have proper authorization before testing any systems.
Version: 1.0.0 Last Updated: 2025-11-29
Available Tools
19 toolskali_exploit_msfvenom_generateA
Generate custom payloads for Metasploit Framework.
Msfvenom is a payload generator and encoder combining msfpayload and msfencode.
WARNING: Only use generated payloads for authorized security testing.
Common Payloads:
windows/meterpreter/reverse_tcp
linux/x64/shell_reverse_tcp
php/meterpreter/reverse_tcp
Example:
payload="linux/x64/shell_reverse_tcp", lhost="192.168.1.100", lport=4444, format="elf"
Inputs: payload (required), lhost (required), lport (required), format, +5 more.
kali_exploit_searchsploit_examineC
Examine and display the contents of an exploit from searchsploit results.
Inputs: exploit_id (required), color.
kali_exploit_searchsploit_searchB
Search the Exploit Database for public exploits and vulnerability information.
SearchSploit is a command-line search tool for Exploit-DB.
Search Options:
By software name/version
By CVE identifier
By platform (linux, windows, php, etc.)
By exploit type (local, remote, webapps, dos)
Example:
query="apache 2.4", platform="linux"
cve="CVE-2021-44228"
Inputs: query (required), exact, cve, platform, +1 more.
kali_network_masscan_scanB
High-speed port scanner capable of scanning the entire internet in minutes. Use with caution and proper authorization.
Inputs: target (required), ports (required), rate, banners, +1 more.
kali_network_netdiscover_scanB
ARP reconnaissance tool for discovering hosts on a local network. Supports active and passive modes.
Inputs: interface, range, passive, timeout.
kali_network_nmap_discoverA
Discover live hosts on a network using Nmap. Supports ping, ARP, TCP, UDP, and ICMP discovery methods.
Inputs: network (required), method, timeout.
kali_network_nmap_scanA
Perform network port scanning using Nmap.
Nmap (Network Mapper) is a powerful network scanner for discovering hosts, services, and potential vulnerabilities.
Capabilities:
TCP SYN, Connect, UDP, and stealth scans
Service version detection (-sV)
OS fingerprinting (-O, requires root)
NSE script execution
Multiple output formats
Usage Notes:
TCP SYN scan requires root privileges
Use appropriate timing for stealth vs speed
Large port ranges increase scan time significantly
Example:
Quick scan: target="192.168.1.1", ports="22,80,443"
Full scan: target="10.0.0.0/24", ports="-", timing="aggressive"
Inputs: target (required), ports, scan_type, timing, +6 more.
kali_network_tcpdump_captureB
Capture network packets for analysis. Supports BPF filters and can save to PCAP files.
Inputs: interface (required), filter, count, duration, +2 more.
kali_network_tshark_captureC
Wireshark CLI for packet capture and analysis with advanced filtering and multiple output formats.
Inputs: interface (required), filter, count, duration, +2 more.
kali_password_hashcat_crackC
Advanced password recovery tool using GPU acceleration. Supports 300+ hash types.
Inputs: hash_file (required), mode (required), attack_type, wordlist, +3 more.
kali_password_hydra_bruteA
Fast network login brute-forcer supporting many protocols.
Hydra is a parallelized login cracker which supports numerous protocols.
Supported Services:
SSH, FTP, HTTP(S), MySQL, SMB, RDP, Telnet, and more
WARNING: Only use on systems you have authorization to test.
Example:
SSH: target="192.168.1.1", service="ssh", username="admin", password_list="/usr/share/wordlists/rockyou.txt"
Inputs: target (required), service (required), username, username_list, +6 more.
kali_password_john_crackC
John the Ripper password cracker supporting many hash formats and attack modes.
Inputs: hash_file (required), format, wordlist, rules, +2 more.
kali_web_ffuf_fuzzA
Fast web fuzzer for discovering hidden files, directories, and parameters. URL must contain FUZZ keyword.
Inputs: url (required), wordlist, method, headers, +5 more.
kali_web_gobuster_dirA
Enumerate directories and files on web servers using wordlists.
Gobuster is a fast directory/file brute-forcing tool written in Go.
Features:
Fast multi-threaded scanning
Customizable file extensions
Status code filtering
Recursive scanning support
Example:
Basic: url="https://example.com", wordlist="/usr/share/wordlists/dirb/common.txt"
With extensions: url="https://example.com", extensions="php,html,txt"
Inputs: url (required), wordlist, extensions, threads, +4 more.
kali_web_gobuster_dnsC
Enumerate subdomains using DNS brute-forcing with wordlists.
Inputs: domain (required), wordlist, threads, timeout, +1 more.
kali_web_nikto_scanC
Comprehensive web server scanner for vulnerabilities, misconfigurations, and security issues.
Inputs: target (required), port, ssl, tuning, +1 more.
kali_web_nuclei_scanC
Template-based vulnerability scanner with extensive CVE coverage and custom templates support.
Inputs: target (required), templates, severity, tags, +2 more.
kali_web_sqlmap_testA
Automated SQL injection testing and exploitation.
SQLMap automates the detection and exploitation of SQL injection vulnerabilities.
WARNING: Only use on systems you have authorization to test.
Features:
Automatic SQL injection detection
Database fingerprinting
Data extraction
Multiple injection techniques
Example:
GET: url="https://example.com/page?id=1"
POST: url="https://example.com/login", data="user=admin&pass=test", method="POST"
Inputs: url (required), data, cookie, method, +7 more.
kali_web_wpscan_scanC
WordPress security scanner for finding vulnerabilities in WordPress sites, themes, and plugins.
Inputs: url (required), enumerate, api_token, plugins_detection, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Each tool has a clearly distinct purpose with no ambiguity. The tools are organized into categories (exploit, network, password, web) and target specific resources or actions, such as kali_network_nmap_discover for host discovery versus kali_network_nmap_scan for port scanning. There is no overlap in functionality, making it easy for an agent to select the correct tool.
All tool names follow a consistent verb_noun pattern with a uniform prefix structure (kali_category_tool_action). For example, kali_exploit_searchsploit_search and kali_web_gobuster_dir adhere to the same naming convention throughout. There are no deviations or mixed styles, ensuring predictability and readability.
With 19 tools, the server is well-scoped for its purpose of providing security testing and penetration testing utilities. Each tool earns its place by covering distinct aspects like network scanning, password cracking, and web vulnerability assessment. The count is appropriate for the domain, avoiding both thin coverage and overwhelming complexity.
The tool surface is complete with comprehensive coverage of the security testing domain. It includes tools for exploitation, network reconnaissance, password attacks, and web application scanning, with no obvious gaps. Each category has multiple tools that support full workflows, such as discovery, scanning, and exploitation, ensuring agents can handle typical tasks without dead ends.
Maintenance
Related MCP Connectors
Pay-per-call cybersecurity for AI agents: vuln scans, threat intel, compliance, code security.
AI pentesting: run scans, triage vulnerabilities, review PRs, manage schedules and assets.
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to execute Kali Linux security tools like nmap, sqlmap, and hydra in a secure, sandboxed environment. Provides both MCP and HTTP API interfaces for penetration testing and security assessment tasks.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to execute penetration testing commands and security tools on Kali Linux remotely. Supports automated reconnaissance, vulnerability scanning, and CTF solving through integration with 25+ offensive security tools like nmap, gobuster, and nuclei.16-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform penetration testing and security assessments by exposing 60+ Kali Linux security tools including network scanning, web security testing, password cracking, exploitation frameworks, and OSINT capabilities through an AI-friendly interface.2MIT
- 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.-