Kali MCP Server
Exposes Kali Linux penetration testing tools for network reconnaissance, web application testing, vulnerability assessment, and Active Directory enumeration.
Provides WordPress vulnerability scanning via the wpscan tool, including detection of vulnerabilities, themes, and plugins.
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 Serverscan example.com with nmap for open ports"
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
Production-grade MCP server that exposes Kali Linux penetration testing tools to AI agents via the Model Context Protocol (MCP).
Quick Start
# Install dependencies
just install
# Start the server
just start
# Or with debug logging
just debugThe server runs on http://0.0.0.0:8399/mcp by default. Point your AI agent's MCP client at this URL to connect.
Related MCP server: Arsenal MCP
Configuration
Copy .env and adjust values:
Variable | Default | Description |
|
| Listen address |
|
| Listen port |
|
| Default command timeout (seconds) |
|
| Maximum allowed timeout |
|
| Max concurrent tool executions |
|
| Log output directory |
|
| Command output artifacts |
|
| Enable verbose debug logging |
Available Tools (30)
General Execution
Tool | Description |
| Execute arbitrary shell commands on the Kali machine — the escape hatch for any tool not wrapped natively |
| Execute Python scripts directly on the Kali machine — access any installed Python library (scapy, impacket, requests, etc.) |
| Read files from the Kali machine |
| Write/create files on the Kali machine |
| Generate download links for files on the Kali machine |
Reconnaissance & Enumeration
Tool | Description |
| Network port scanner with service/version detection and NSE scripts |
| Fast TCP/UDP port scanner (SYN scan support) |
| Passive subdomain discovery from multiple sources |
| Attack surface mapping and deep subdomain enumeration |
| Email, subdomain, and name harvesting from public sources |
| OSINT automation and reconnaissance |
| Web crawler and URL discovery |
| Domain intelligence — recon, asset discovery, threat intel, typosquat detection |
| Web technology fingerprinting — CMS, frameworks, libraries, plugins |
Web Application Testing
Tool | Description |
| HTTP probing, technology detection, and web recon |
| Template-based vulnerability scanner with severity filtering |
| Web fuzzer — directory discovery, parameter fuzzing, vhost enumeration |
| Full web app security scanner — XSS, SQLi, LFI, SSRF, IDOR, CSRF, CMDi, SSTI, CORS, file upload, BOLA, mass assignment, GraphQL, DOM XSS, subdomain discovery |
| HTTP parameter discovery — finds hidden GET/POST/JSON parameters |
| SQL injection detection and exploitation |
| Command injection detection and exploitation |
| WordPress vulnerability scanning and enumeration |
| SMB/Samba enumeration |
Network & Infrastructure
Tool | Description |
| Network protocol execution — SMB, WinRM, SSH, LDAP, RDP, MSSQL, FTP |
| Network authentication testing and exploitation |
| Active Directory enumeration and attack path analysis |
Security Analysis & Audit
Tool | Description |
| Exploit-DB search — by keyword, CVE, or EDB-ID with exploit details |
| CI/CD pipeline security analyzer for GitHub/GitLab/Bitbucket workflows |
| GitHub Actions workflow static security auditor |
| Red team network framework — network scanning, C2 listener, agent deployment, evasion simulation |
Tool Details
generic_command
The escape hatch for any command not covered by a native tool. Runs shell commands directly on the Kali machine.
{
"command": "nmap -sV 10.0.0.1",
"timeout": 300,
"cwd": "/tmp"
}Supports full bash scripting: pipes, redirects, here docs, functions, arrays, arithmetic
Returns structured output: stdout, stderr, exit code, timing
Timeout protection prevents hung commands
python_command
Execute Python scripts on the Kali machine. This is a superpower — any Python library installed on the system is available.
{
"code": "import requests; r = requests.get('https://example.com'); print(r.status_code, len(r.text))"
}Runs as a standalone Python process with its own timeout
Full access to system Python libraries
Supports multi-line scripts with functions, classes, imports
nmap
Network port scanner with full Nmap feature support.
{
"target": "10.0.0.1",
"scan_type": "-sV -sC",
"ports": "1-1000",
"extra_args": "--script vuln"
}nuclei
Template-based vulnerability scanner. Scan targets against the full Nuclei template library.
{
"target": "https://example.com",
"templates": "cves/",
"severity": "critical,high"
}dursgo
Comprehensive web application security scanner with AI-powered analysis. Covers 16+ vulnerability classes in a single scan.
{
"target": "https://example.com",
"scanners": "xss,sqli,lfi,ssrf,csrf",
"render_js": true,
"enable_ai": true,
"enrich": true
}Architecture
┌─────────────────────────────────────────────────────────┐
│ MCP Client (AI Agent) │
└───────────────────────┬─────────────────────────────────┘
│ HTTP/SSE
┌───────────────────────▼─────────────────────────────────┐
│ Kali MCP Server (:8399) │
│ ┌──────────┐ ┌──────────────┐ ┌───────────────────┐ │
│ │ Security │ │ Execution │ │ Tool Registry │ │
│ │ │ │ Engine │ │ │ │
│ │ Allowlist│ │ ┌──────────┐ │ │ 30 tools with │ │
│ │ Input │→ │ │ asyncio │ │ │ validated schemas │ │
│ │ Validate │ │ │ timeout │ │ │ │ │
│ │ Sanitize │ │ │ watchdog │ │ └───────────────────┘ │
│ │ Block │ │ │ semaphor │ │ │
│ └──────────┘ │ └──────────┘ │ │
│ └──────┬───────┘ │
│ │ subprocess │
│ ┌──────▼───────┐ │
│ │ Kali Linux │ │
│ │ 30 tools │ │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────┘Security Layers
Allowlist — Commands must match a strict allowlist pattern
Input Validation — Arguments validated against JSON schemas
Shell Injection Prevention — All arguments sanitized before execution
Timeout Protection — 3-layer defense: asyncio timeout, watchdog thread, semaphore
Output Truncation — stdout/stderr capped at 100KB to prevent memory exhaustion
Resilience
3-layer timeout defense: asyncio.wait_for → watchdog thread → semaphore
Automatic process cleanup: Zombie processes killed via process tree termination
Concurrent execution limits: Semaphore prevents resource exhaustion
Graceful degradation: All errors return structured responses, never crash
Directory Structure
kali-mcp/
├── server.py ← HTTP/SSE server, tool dispatch, health monitor
├── execution.py ← 3-layer hardened execution engine
├── security.py ← Allowlist, input validation, shell injection prevention
├── config.py ← Configuration loading with validation
├── models.py ← ExecutionResult, ToolError, ToolDefinition dataclasses
├── responses.py ← Standardized JSON response builders
├── registry.py ← Tool registration and lookup
├── logging_utils.py ← Structured logging with execution tracking
├── utils/
│ └── process.py ← Process tree cleanup
├── tools/
│ ├── __init__.py ← Tool registration
│ ├── base.py ← BaseTool ABC — all tools extend this
│ ├── generic_command.py ← GenericCommandTool — shell escape hatch
│ ├── python_command.py ← PythonCommandTool — Python execution
│ ├── file_read.py ← FileReadTool — file reading
│ ├── file_write.py ← FileWriteTool — file writing
│ ├── file_download.py ← FileDownloadTool — file download links
│ ├── nmap.py ← NmapTool — port scanner
│ ├── httpx.py ← HttpxTool — HTTP probing
│ ├── nuclei.py ← NucleiTool — vuln scanner
│ ├── ffuf.py ← FfufTool — web fuzzer
│ ├── katana.py ← KatanaTool — web crawler
│ ├── subfinder.py ← SubfinderTool — subdomain discovery
│ ├── amass.py ← AmassTool — attack surface mapping
│ ├── sqlmap.py ← SqlmapTool — SQL injection
│ ├── commix.py ← CommixTool — command injection
│ ├── wpscan.py ← WpscanTool — WordPress scanner
│ ├── enum4linux.py ← Enum4linuxTool — SMB enumeration
│ ├── netexec.py ← NetexecTool — network protocol execution
│ ├── crackmapexec.py ← CrackmapexecTool — network auth testing
│ ├── bloodhound.py ← BloodhoundTool — AD enumeration
│ ├── theharvester.py ← TheharvesterTool — OSINT harvesting
│ ├── spiderfoot.py ← SpiderfootTool — OSINT automation
│ ├── naabu.py ← NaabuTool — fast port scanner
│ ├── arjun.py ← ArjunTool — parameter discovery
│ ├── whatweb.py ← WhatwebTool — technology fingerprinting
│ ├── dursgo.py ← DursgoTool — web app scanner
│ ├── zighound.py ← ZighoundTool — red team framework
│ ├── searchsploit.py ← SearchsploitTool — exploit search
│ ├── farsight.py ← FarsightTool — domain intelligence
│ ├── flowlyt.py ← FlowlytTool — CI/CD security
│ └── zizmor.py ← ZizmorTool — GitHub Actions audit
├── tests/
├── logs/
├── artifacts/
├── .env
├── justfile
├── pyproject.toml
└── uv.lockThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityBmaintenanceAn MCP server that exposes over 20 standard penetration testing utilities, such as Nmap, SQLMap, and OWASP ZAP, as callable tools for AI agents. It enables natural language control over complex security workflows for automated and interactive penetration testing.90
- -license-quality-maintenanceA Kali Linux-based MCP server that exposes over 45 penetration testing tools for AI-assisted security auditing and vulnerability scanning. It features strict scope enforcement, structured output parsing, and persistent finding storage to automate the offensive security workflow.
- Flicense-qualityDmaintenanceA penetration testing MCP server that runs 20 hacking tools inside a Kali Linux Docker container, enabling AI assistants to execute security scans and attacks via natural language.2
- Flicense-qualityCmaintenanceAn MCP server that turns Kali Linux into an AI-driven penetration testing powerhouse, enabling control of 40+ offensive security tools via natural language.
Related MCP Connectors
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Scans MCP servers for tool poisoning, prompt injection and supply chain risks.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/magichrist/kali-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server