Provides comprehensive access to the Kali Linux security toolset, enabling AI assistants to perform network scanning, web enumeration, and vulnerability assessments in a containerized security environment.
Integrates the Metasploit Framework, allowing AI agents to search for security exploits and conduct penetration testing operations.
Click on "Install 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 ServerRun a quick vulnerability scan on example.com"
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-ready MCP (Model Context Protocol) server running in a Kali Linux Docker container, providing AI assistants with access to a comprehensive security toolset.
π Overview
This project provides a Docker containerized MCP server that runs on Kali Linux, giving AI assistants (like Claude) access to a full suite of security and penetration testing tools. The server communicates via Server-Sent Events (SSE) and allows AI to execute commands in a controlled environment with appropriate security measures.
β¨ Features
π Security Tools Access: Full access to Kali Linux security toolset through a controlled interface
π‘οΈ Command Validation: Commands are validated against an allowlist for security
π Web Content Fetching: Retrieve and analyze web content
π Resource Information: Comprehensive system resource details and command examples
π€ Security Focus: Running as non-root user with appropriate permissions
π§ Pre-installed Security Tools
π Network Scanning: nmap, netcat
πΈοΈ Web Application Testing: nikto, gobuster, dirb
π§ͺ Penetration Testing: metasploit-framework
π Credential Testing: hydra
π Data Extraction: sqlmap
βΉοΈ Information Gathering: whois, dig, host
π Quick Start
π³ Building and Running the Container
π Connecting to Claude Desktop
Edit your Claude Desktop config file:
Location:
~/Library/Application Support/Claude/claude_desktop_config.jsonAdd this configuration:
{ "mcpServers": { "kali-mcp-server": { "transport": "sse", "url": "http://localhost:8000/sse", "command": "docker run -p 8000:8000 kali-mcp-server" } } }
Restart Claude Desktop
Test the connection with a simple command:
/run nmap -F localhost
π οΈ Available MCP Tools
The server provides several tools through the MCP protocol:
π» run - Execute Commands
Run security tools and commands in the Kali Linux environment.
Commands are validated against an allowlist for security. Long-running commands will be executed in the background with results saved to an output file.
π fetch - Retrieve Web Content
Fetch and analyze web content from specified URLs.
π resources - List Available Resources
Get information about the system and available commands. (The AI can use these resources to run the commands on you behalf using Natural Language.)
π vulnerability_scan - Automated Vulnerability Assessment
Perform automated vulnerability assessment with multiple tools.
Scan Types:
quick: Fast scan with nmap and niktocomprehensive: Full scan with multiple toolsweb: Web-focused vulnerability assessmentnetwork: Network-focused vulnerability assessment
π web_enumeration - Web Application Discovery
Perform comprehensive web application discovery and enumeration.
Enumeration Types:
basic: Basic web enumeration with nikto and gobusterfull: Comprehensive enumeration including vhost discoveryaggressive: Aggressive enumeration with SQL injection testing
π network_discovery - Network Reconnaissance
Perform multi-stage network reconnaissance and discovery.
Discovery Types:
quick: Quick network discoverycomprehensive: Comprehensive network mappingstealth: Stealthy network reconnaissance
π exploit_search - Exploit Database Search
Search for exploits using searchsploit and other exploit databases.
Search Types:
all: Search all exploit typesweb: Web application exploitsremote: Remote exploitslocal: Local exploitsdos: Denial of service exploits
πΎ save_output - Save Content to File
Save content to a timestamped file for evidence collection.
Categories:
general: General content (default)scan: Vulnerability scan resultsenum: Enumeration resultsevidence: Evidence collection
π create_report - Generate Structured Reports
Generate a structured report from findings.
Report Types:
markdown: Markdown format (default)text: Plain text formatjson: JSON format
π file_analysis - Analyze Files
Analyze a file using various tools (file type, strings, hash).
Analysis includes:
File type detection
String extraction
SHA256 hash
File metadata
Content preview
π₯ download_file - Download Files
Download a file from a URL and save it locally.
Features:
Automatic filename extraction from URL
SHA256 hash generation
Content-type detection
Safe filename sanitization
ποΈ session_create - Create New Session
Create a new pentest session with name, description, and target.
Features:
Session metadata storage
Automatic session activation
Organized file structure
π session_list - List Sessions
List all pentest sessions with metadata and status.
Shows:
All available sessions
Active session indicator
Session descriptions and targets
Creation dates and history counts
π session_switch - Switch Sessions
Switch to a different pentest session.
Features:
Validates session existence
Updates active session
Shows session details after switch
π session_status - Session Status
Show current session status and summary.
Shows:
Active session details
Session metadata
File count and history
Recent activity
ποΈ session_delete - Delete Session
Delete a pentest session and all its evidence.
Safety Features:
Cannot delete active session
Confirms deletion with session details
Removes all session files and evidence
π session_history - Session History
Show command/evidence history for the current session.
Shows:
Chronological history of activities
Action types and timestamps
Session-specific evidence tracking
Enhanced Web Application Testing Tools
π·οΈ Spider Website
Comprehensive web crawling and spidering using gospider.
Parameters:
url(required): Target URL to spiderdepth(optional): Crawling depth (default: 2)threads(optional): Number of concurrent threads (default: 10)
π Form Analysis
Discover and analyze web forms for security testing.
Parameters:
url(required): Target URL to analyzescan_type(optional): Type of analysis - "basic", "comprehensive", "aggressive" (default: "comprehensive")
π Header Analysis
Analyze HTTP headers for security information and misconfigurations.
Parameters:
url(required): Target URL to analyzeinclude_security(optional): Include security header analysis (default: true)
π SSL Analysis
Perform SSL/TLS security assessment using testssl.sh.
Parameters:
url(required): Target URL to analyzeport(optional): SSL port (default: 443)
π Subdomain Enumeration
Perform subdomain enumeration using multiple tools (subfinder, amass, waybackurls).
Parameters:
url(required): Target domain to enumerateenum_type(optional): Type of enumeration - "basic", "comprehensive", "aggressive" (default: "comprehensive")
π Web Audit
Perform comprehensive web application security audit.
Parameters:
url(required): Target URL to auditaudit_type(optional): Type of audit - "basic", "comprehensive", "aggressive" (default: "comprehensive")
Tools Used in Web Audit:
Nikto (web vulnerability scanner)
Gobuster (directory/vhost enumeration)
SQLMap (SQL injection testing)
Dirb (directory enumeration)
TestSSL.sh (SSL/TLS analysis)
Curl (header analysis)
Session Management Tools
β οΈ Troubleshooting
π Connection Issues
Ensure port 8000 is available on your machine
Check that the Docker container is running:
docker psVerify the URL in Claude Desktop configuration matches the container's port
βοΈ Command Execution Problems
If commands timeout, try running them in the background:
command > output.txt &Use
/resourcesto see examples of properly formatted commandsFor permission errors, ensure you're not trying to access protected system areas
π Security Considerations
This container provides access to powerful security tools. Please observe the following:
Use responsibly and only in controlled environments
The container is designed to be run locally and should not be exposed to the internet
Commands are validated against an allowlist for security
The server runs as a non-root user inside the container
Only use this tool for legitimate security testing with proper authorization
π Requirements
Docker
Claude Desktop or other SSE enabled MCP clients
Port 8000 available on your host machine
π¨βπ» Development
π οΈ Setting Up a Development Environment
π§ͺ Running Tests
π Acknowledgements
Kali Linux for their security-focused distribution
Anthropic for Claude and the MCP protocol
The open-source security tools community