MCPKaliServer
Allows enumeration of WordPress CMS installations, including plugins, themes, and users.
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., "@MCPKaliServerrecon sweep on 192.168.1.0/24"
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.
MCPKaliServer
An MCP (Model Context Protocol) server that connects LLMs to a Kali Linux host over SSH for authorized cloud, API and web-application penetration testing.
It exposes your Kali toolbox to any MCP client (Claude Desktop, Claude Code, or your own agent) as a set of well-defined tools organised into the classic pentest phases — Reconnaissance → Service Enumeration → Exploitation — plus health monitoring, a generic command executor, and an engagement-scope guardrail.
⚠️ Authorized use only. This drives offensive security tooling against whatever you point it at. Only use it against systems you have explicit, written permission to test, and configure the
scopeallow-list to your rules of engagement.
Features
Secure SSH access to the Kali host with public-key or OpenSSH-certificate authentication, strict
known_hostsverification, pooled connection with automatic reconnect. (Password auth is available as a discouraged fallback.)Optional mutual TLS (mTLS) on the networked
streamable-httptransport, so the LLM↔server channel is mutually authenticated.Health tool + heartbeat — a background heartbeat probes the SSH connection every 2 minutes;
health_check,server_statusandlist_available_toolsreport liveness and installed tooling.Phase group functions —
recon_sweep,enumerate_services,exploit_targetorchestrate the common steps of each phase in one call.One function per tool —
recon_*,enum_*,exploit_*map 1:1 to the underlying Kali tools (nmap, subfinder, httpx, nuclei, ffuf, sqlmap, hydra, ScoutSuite, Pacu, …).Generic executor —
execute_command/execute_scriptfor anything not covered by a dedicated tool.Scope guardrail — every target-taking tool refuses out-of-scope hosts when a
scopeallow-list is set; exploitation tools are gated byallow_exploitation.A Claude skill (
skills/cloud-api-pentest-methodology) that teaches the methodology (inspired by Bishop Fox, NetSPI, Rhino Security Labs, with HackerOne as the exploitation reference) and maps every phase to a tool.
Related MCP server: Kali MCP Server
Architecture
┌──────────────┐ MCP (stdio or HTTPS+mTLS) ┌────────────────────┐ SSH (key/cert) ┌────────────┐
│ LLM client │ ─────────────────────────────▶│ MCP Kali Server │ ──────────────────▶│ Kali host │
│ (Claude etc.)│ ◀─────────────────────────────│ (this project) │◀───────────────────│ toolbox │
└──────────────┘ tool calls / results └────────────────────┘ stdout/stderr └────────────┘
• heartbeat every 2m
• scope + exploitation guardThe MCP server runs on your control host (laptop/jump box). It holds the SSH credentials and connects to the Kali host; tools execute remotely over SSH. The LLM never gets shell access directly — it can only call the defined tools.
Requirements
Control host: Python 3.10+, network access to the Kali host over SSH.
Kali host: the pentest tooling the tools invoke (install with
scripts/install_kali_tools.sh), and SSH access.
Install
git clone https://github.com/ElusiveHacker/MCPKaliServer.git
cd MCPKaliServer
./install.sh # creates .venv, installs the package, copies config.example.yaml -> config.yamlThen install the tooling the server drives on the Kali host. Two ways:
From the LLM, over SSH (recommended): once the server is connected, call the
install_kali_toolstool (it runs the installer remotely with sudo). Then calllist_available_toolsto confirm.Manually on the box:
scp scripts/install_kali_tools.sh kali@<kali-host>: ssh kali@<kali-host> 'sudo bash install_kali_tools.sh'
Verify tooling any time from the client by calling the list_available_tools tool.
Configure
Copy and edit config.yaml (created by install.sh), or supply everything via
environment variables (.env.example). Env vars override the YAML file and
are the recommended way to pass secrets.
Minimum viable config:
transport: stdio
ssh:
host: 10.0.0.10
port: 22
username: kali
private_key: ~/.ssh/id_ed25519
known_hosts: ~/.ssh/known_hosts
scope:
- "*.example.com" # your in-scope targets
allow_exploitation: trueKey settings:
Setting | Meaning |
|
|
| Seconds between heartbeats (default 120 = 2 min) |
| Per-command timeout (seconds) |
| stdout/stderr truncation cap returned to the LLM |
| Gate for all |
| Allow-list of hosts / |
| Connection + auth to the Kali host |
| TLS/mTLS options for |
SSH authentication
Key + OpenSSH certificate (recommended). Generate a CA, client key and signed user certificate:
scripts/gen_ssh_cert.sh kali ./ssh-certs # principal = remote userTrust the CA on the Kali host (the script prints the exact commands):
sudo cp ssh-certs/ssh_ca.pub /etc/ssh/mcp_user_ca.pub
echo 'TrustedUserCAKeys /etc/ssh/mcp_user_ca.pub' | sudo tee -a /etc/ssh/sshd_config
sudo systemctl restart sshPoint the config at the key + certificate:
ssh:
private_key: ./ssh-certs/id_ed25519
certificate: ./ssh-certs/id_ed25519-cert.pubPlain key. Omit certificate and use any key the Kali host authorizes
(ssh-copy-id). Host verification: keep strict_host_key_checking: true and
make sure the Kali host key is in your known_hosts (ssh-keyscan -H <host> >> ~/.ssh/known_hosts).
mTLS (for the networked transport)
Generate a CA + server/client certificates:
scripts/gen_mtls_certs.sh <server-hostname-or-ip> ./certsEnable it:
transport: streamable-http
http:
host: 0.0.0.0
port: 8000
tls_cert: certs/server.crt
tls_key: certs/server.key
tls_client_ca: certs/ca.crt # requiring a client cert = mTLSThe client must present certs/client.crt + certs/client.key. Test with:
curl --cacert certs/ca.crt --cert certs/client.crt --key certs/client.key https://<host>:8000/mcpRun
source .venv/bin/activate
mcp-kali-server --config config.yaml # uses transport from config
mcp-kali-server --config config.yaml -t streamable-http
mcp-kali-server -v # debug logging (to stderr)Logs go to stderr (stdout is reserved for the stdio MCP protocol).
Connecting a client
Claude Desktop / Claude Code (stdio)
Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json,
or claude mcp add):
{
"mcpServers": {
"kali": {
"command": "/path/to/MCPKaliServer/.venv/bin/mcp-kali-server",
"args": ["--config", "/path/to/MCPKaliServer/config.yaml"],
"env": {
"MCP_KALI_SSH_PASSPHRASE": "<key passphrase if any>"
}
}
}
}Claude Code CLI equivalent:
claude mcp add kali -- /path/to/.venv/bin/mcp-kali-server --config /path/to/config.yamlNetworked (streamable-http + mTLS)
Run the server with the streamable-http transport and point an
mTLS-capable MCP client at https://<host>:8000/mcp with the client
certificate/key.
Using the skill
The repo ships a Claude skill at
skills/cloud-api-pentest-methodology.
It documents the phase-by-phase methodology and tells the model which MCP tool to
use for each step, so you can drive an engagement in natural language.
Claude Code / claude.ai: copy the skill folder into your skills directory:
mkdir -p ~/.claude/skills
cp -r skills/cloud-api-pentest-methodology ~/.claude/skills/(or a project-local .claude/skills/). The skill activates when you ask about
planning or running a cloud/API/web pentest. With the kali MCP server connected,
the model reads the methodology from the skill and executes it through the tools.
Example prompts once both are loaded:
"Run a recon sweep of
app.example.comand summarise the live services.""Enumerate services on the hosts you found; focus on the web app at
https://app.example.com.""We found a
?id=parameter — validate SQL injection safely and show only the DB banner and current user.""Audit the AWS account configuration with ScoutSuite and list the highest-risk findings."
The model will call health_check / list_available_tools, then the appropriate
recon_* / enum_* / exploit_* tools, respecting the scope guardrail.
Tool reference
Health & control
health_check · server_status · list_available_tools
Setup / provisioning
install_kali_tools — installs/refreshes the required tooling on the Kali host
over SSH (apt packages, Go/ProjectDiscovery tools, ScoutSuite/Pacu, cloud_enum,
awscli). Components: all or a subset of apt,go,cloud,cloudenum,aws. Needs
sudo on the Kali host (pass sudo_password, or configure passwordless sudo).
Long-running — verify afterwards with list_available_tools.
Generic
execute_command · execute_script
Reconnaissance (group: recon_sweep)
recon_nmap_discovery · recon_dns_records · recon_dns_enum ·
recon_subdomains · recon_whois · recon_http_probe · recon_web_crawl ·
recon_wayback_urls · recon_osint · recon_cloud_assets · recon_ssl_info
Service enumeration (group: enumerate_services)
enum_nmap_services · enum_web_tech · enum_web_nikto · enum_dir_bruteforce
· enum_vhosts · enum_parameters · enum_nuclei · enum_api_routes ·
enum_smb · enum_cms_wordpress · enum_cloud_config · enum_ssl_ciphers
Exploitation (group: exploit_target, gated by allow_exploitation)
exploit_sqlmap · exploit_nuclei · exploit_bruteforce ·
exploit_command_injection · exploit_metasploit · exploit_aws_pacu ·
exploit_aws_cli
Each tool returns { command, exit_status, success, timed_out, stdout, stderr, truncated }. Group functions return a steps map of per-step results.
Security notes
Scope & consent — set
scope; the server refuses out-of-scope targets. This is a guardrail, not a substitute for a signed authorization.Least privilege — give the Kali SSH user only what the engagement needs; prefer certificates with a bounded validity (
gen_ssh_cert.shsets ~1 year).Secrets — never commit
config.yaml, keys or certs;.gitignorealready excludes them. Pass secrets via environment variables where possible.Exploitation off-switch — set
allow_exploitation: falsefor recon/enum engagements to disable everyexploit_*tool.Generic executor —
execute_command/execute_scriptare intentionally unrestricted (operator escape hatch) and are not scope-checked. Treat access to this MCP server as equivalent to shell access on the Kali host.
Development
source .venv/bin/activate
pip install -e ".[dev]"
pytest -q # smoke tests (no Kali host required)Project layout:
mcp_kali_server/
__main__.py CLI entry point + transport/TLS selection
config.py layered config (defaults < YAML < env)
ssh_client.py asyncssh transport (key/cert auth, reconnect)
guard.py engagement-scope enforcement
health.py health state + 2-minute heartbeat loop
installer.py builds the remote Kali tooling-install script
server.py FastMCP assembly, lifespan, health tools
runtime.py shared singletons
tools/
setup.py install_kali_tools
generic.py execute_command / execute_script
recon.py reconnaissance tools + recon_sweep
enumeration.py enumeration tools + enumerate_services
exploitation.py exploitation tools + exploit_target
skills/cloud-api-pentest-methodology/ the methodology skill
scripts/ install_kali_tools.sh, gen_ssh_cert.sh, gen_mtls_certs.shLicense
MIT — see pyproject.toml. Use responsibly and legally.
This 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.
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/ElusiveHacker/MCPKaliServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server