kali-mcp-server
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 an nmap service scan against app.acme.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 Ethical Hacking MCP Server
A personal, advanced Model Context Protocol (MCP) server for authorized penetration testing and ethical hacking. It lets an MCP client (Claude Desktop, Claude Code) drive the standard Kali/pentest toolchain — reconnaissance, scanning, web application testing, exploitation support, credential work, and reporting — with authorization scoping, exploitation gating, and audit logging enforced on every action.
Built on the Red Hat template-mcp-server
(FastMCP, tools-first architecture).
⚠️ Authorized use only
This server operates real offensive security tooling. Use it only against systems you own or have explicit, written authorization to test. Unauthorized scanning, exploitation, or credential attacks are illegal in most jurisdictions. The server enforces an engagement scope and refuses to act on targets you have not declared as authorized — keep
REQUIRE_SCOPE=True. You are responsible for operating within the law and your rules of engagement.
Related MCP server: Kali MCP Server
How it works
Claude (MCP client) ──► Kali MCP Server ──► ┌─ host binary (nmap on PATH) [mode: host]
(scope + audit) └─ Kali container (docker exec ...) [mode: docker]Hybrid execution — each tool runs on a host binary if present, otherwise inside a persistent
kalilinux/kali-rollingcontainer the server starts on demand (missing tools areapt-installed into it automatically). Controlled byEXECUTION_MODE(auto|host|docker).Scope enforcement — every active tool validates its target against your declared engagement scope (
ScopeManager). Out-of-scope targets are refused.Exploitation gating — active exploitation / brute-force tools (
sqlmap,hydra) additionally requireALLOW_EXPLOITATION=True.Audit logging — every invocation is appended to
~/.kali-mcp/audit.jsonl.Engagement session — scans and findings are recorded and can be rendered into a report.
Tool catalog (24 tools)
Category | Tools |
Recon & Scanning |
|
OSINT (passive) |
|
Web App Testing |
|
Exploitation & Creds |
|
Reporting & Workflow |
|
† Gated behind ALLOW_EXPLOITATION=True and an in-scope target.
Requirements
Python 3.12+ and
uvDocker (for the Kali fallback). No security tools need to be installed on the host — they run in the Kali container. If you do have tools on your
PATH, they're used directly.
Install
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e ".[dev]"
cp .env.example .env # then review the settingsRun
stdio (local — for Claude Desktop / Claude Code):
MCP_TRANSPORT_PROTOCOL=stdio kali-mcp-serverHTTP (shared / remote):
MCP_TRANSPORT_PROTOCOL=http MCP_PORT=5001 kali-mcp-serverConnect it to Claude
Claude Code:
claude mcp add kali-ethical -- /ABSOLUTE/PATH/ethical-mcp/.venv/bin/kali-mcp-serverClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"kali-ethical": {
"command": "/ABSOLUTE/PATH/ethical-mcp/.venv/bin/kali-mcp-server",
"env": { "MCP_TRANSPORT_PROTOCOL": "stdio", "EXECUTION_MODE": "auto" }
}
}
}Typical workflow
Authorize the engagement — record who approved it and the reference:
scope_manage(action="set_engagement", client="Acme", authorized_by="J. Smith", ticket="PT-42")Declare scope — only targets you're permitted to test:
scope_manage(action="add", targets=["10.0.0.0/24", "app.acme.com"])Check tooling —
list_tools_status()shows host vs Docker availability.Recon & scan —
nmap_scan("app.acme.com", "service"),subdomain_enum("acme.com"), …Web testing —
nikto_scan(...),nuclei_scan(...),dir_bruteforce(...).Exploitation (only with
ALLOW_EXPLOITATION=True) —sqlmap_test(...),hydra_bruteforce(...).Record & report —
record_finding(...)thengenerate_report("markdown").
Anything against a target not in scope is refused; gated tools are refused unless explicitly enabled.
Configuration
Key settings (see .env.example for all):
Variable | Default | Purpose |
|
|
|
|
|
|
|
| Fallback toolbox image |
|
| Refuse out-of-scope targets |
|
| Enable active exploitation/brute-force tools |
|
| Per-run timeout |
|
| Scope, audit log, outputs, wordlists |
Safety model
No target contact without scope. Recon/scan/exploit tools call the scope gate first.
Two-key exploitation.
sqlmap/hydraneedALLOW_EXPLOITATION=Trueand an in-scope target.Rate limits.
masscanpacket rate is capped to avoid turning a scan into a flood.Full audit trail.
~/.kali-mcp/audit.jsonlrecords every command (incl. blocked attempts).No DoS / mass-internet scanning helpers. The toolset is engagement-scoped by design.
Development
make test # run the test suite
make lint # ruff + formatting checks
pytest tests/ # scope, executor, gating, reporting testsLicense
Apache-2.0. This tool is provided for authorized security testing and education only.
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.
Related MCP Servers
- Flicense-qualityDmaintenanceEnables 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.Last updated
- Flicense-qualityDmaintenanceProvides access to 20+ Kali Linux penetration testing tools including nmap, sqlmap, nikto, and hydra for authorized security testing and vulnerability assessment through a Docker-based MCP interface.Last updated1
- Alicense-qualityBmaintenanceEnables AI agents to perform professional penetration testing through a containerized Kali Linux environment, exposing industry-standard offensive security tools as structured MCP tools.Last updated4MIT
- Alicense-qualityCmaintenanceEnables AI-assisted penetration testing by connecting MCP clients to execute terminal commands on a Kali Linux machine, supporting tools like Nmap, Metasploit, and custom commands.Last updatedMIT
Related MCP Connectors
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
A paid remote MCP for ClawManager, built to return verdicts, receipts, usage logs, and audit-ready J
Remote MCP for A2A caller identity, scope policy, verdict receipts, and audit history.
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/bsahane/kali-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server