Kali MCP Serverのロゴ

Kali MCP Server

コミュニティ
k3nn3dy-ai

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.

公開者k3nn3dy-ai
リポジトリkali-mcp
言語Python
フォーク
11
スター
25
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    Kali MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには25件のスターと11件のフォークがあります。

Kali MCP Server

A production-ready MCP (Model Context Protocol) server running in a Kali Linux Docker container, providing AI assistants with access to 35 security tools covering the full offensive security lifecycle.

Kali Linux Docker Python

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) or stdio and allows AI to execute commands in a controlled environment.

Quick Start

Building and Running the Container

bash
# Quick start with the helper script
./run_docker.sh

# Or with Docker Compose
docker compose up --build -d

# Or manually:
docker build -t kali-mcp-server .
docker run -p 8000:8000 kali-mcp-server

Development Checks

bash
# install dev dependencies
./run_tests.sh install

# individual checks
./run_tests.sh typecheck     # pyright
./run_tests.sh lint          # ruff check .
./run_tests.sh format        # ruff format .
./run_tests.sh test          # pytest
./run_tests.sh test-tools    # pytest tests/test_tools.py
./run_tests.sh test-session  # pytest -k "session"

# run install + typecheck + lint + tests
./run_tests.sh all

Connecting to Claude Desktop

  1. Edit your Claude Desktop config file at ~/Library/Application Support/Claude/claude_desktop_config.json:
json
{
  "mcpServers": {
    "kali-mcp-server": {
      "transport": "sse",
      "url": "http://localhost:8000/sse",
      "command": "docker compose up -d"
    }
  }
}
  1. Restart Claude Desktop
  2. Test with: /run nmap -F localhost

Available MCP Tools (35)

Core Tools

ToolDescription
runExecute shell commands in the Kali Linux environment
fetchFetch and analyze web content from URLs
resourcesList available system resources and command examples

Reconnaissance & Scanning

ToolDescription
port_scanSmart nmap wrapper with scan presets (quick, full, stealth, udp, service, aggressive)
dns_enumComprehensive DNS enumeration with zone transfer attempts
network_discoveryMulti-stage network reconnaissance and discovery
subdomain_enumSubdomain enumeration using subfinder, amass, waybackurls
recon_autoAutomated multi-stage reconnaissance pipeline

Web Application Testing

ToolDescription
vulnerability_scanAutomated vulnerability assessment with multiple tools
web_enumerationWeb application discovery and enumeration
web_auditComprehensive web application security audit
spider_websiteWeb crawling and spidering using gospider
form_analysisDiscover and analyze web forms
header_analysisHTTP header security analysis
ssl_analysisSSL/TLS security assessment using testssl.sh

Credential & Brute-Force Attacks

ToolDescription
hydra_attackBrute-force credential testing via hydra (SSH, FTP, HTTP, SMB, MySQL, RDP, etc.)
credential_storeStore/retrieve discovered credentials tied to sessions

Payload & Exploit Tools

ToolDescription
payload_generateGenerate payloads using msfvenom (reverse shell, bind shell, meterpreter)
reverse_shellGenerate reverse shell one-liners for bash, python, php, perl, powershell, nc, ruby, java
exploit_searchSearch for exploits using searchsploit

Encoding & Hash Tools

ToolDescription
encode_decodeMulti-format encoding/decoding (base64, URL, hex, HTML, ROT13)
hash_identifyIdentify hash types with Hashcat mode and John format lookup

Share Enumeration

ToolDescription
enum_sharesSMB/NFS share enumeration (smbclient, enum4linux, showmount)

Output Parsing

ToolDescription
parse_nmapParse nmap text/XML output into structured JSON findings
parse_tool_outputParse output from nikto, gobuster, dirb, hydra, or sqlmap

Evidence & Reporting

ToolDescription
save_outputSave content to timestamped files for evidence collection
create_reportGenerate structured reports (markdown, text, JSON)
file_analysisAnalyze files (type detection, strings, hashes, metadata)
download_fileDownload files from URLs with hash verification

Session Management

ToolDescription
session_createCreate a new pentest session
session_listList all sessions with metadata
session_switchSwitch between sessions
session_statusShow current session status
session_deleteDelete a session and its evidence
session_historyShow command history for current session

Tool Details

port_scan - Smart Nmap Wrapper

Runs nmap with predefined scan presets, generating both text and XML output.

/port_scan target=192.168.1.1 scan_type=quick
/port_scan target=10.0.0.0/24 scan_type=aggressive ports=80,443,8080

Scan Presets:

PresetNmap Flags
quick-F -sV
full-sS -sV -p-
stealth-sS -T2 --max-retries 1
udp-sU --top-ports 100
service-sV --version-intensity 5 -sC
aggressive-A -T4

dns_enum - DNS Enumeration

Queries all DNS record types and attempts zone transfers.

/dns_enum domain=example.com
/dns_enum domain=target.com record_types=a,mx,ns,txt

recon_auto - Automated Recon Pipeline

Runs a multi-stage reconnaissance pipeline with configurable depth.

/recon_auto target=example.com depth=quick
/recon_auto target=10.0.0.1 depth=standard
/recon_auto target=target.com depth=deep

Depth Levels:

DepthPhases
quickDNS enumeration, quick port scan, header analysis
standard+ service scan, SSL analysis, exploit search
deep+ subdomain enumeration, web enumeration, vulnerability scan

hydra_attack - Brute-Force Testing

/hydra_attack target=192.168.1.1 service=ssh username=admin passlist=/usr/share/wordlists/rockyou.txt
/hydra_attack target=10.0.0.1 service=ftp userlist=users.txt passlist=passwords.txt threads=32

Supported Services: ssh, ftp, http-get, http-post-form, smb, mysql, rdp, telnet, vnc, pop3, imap, smtp

payload_generate - Msfvenom Payloads

/payload_generate payload_type=reverse_shell platform=linux lhost=10.0.0.1 lport=4444 format=elf
/payload_generate payload_type=meterpreter platform=windows lhost=10.0.0.1 format=exe

Payload Types: reverse_shell, bind_shell, meterpreter Platforms: linux, windows, osx, php, python Formats: elf, exe, raw, python, php, war

reverse_shell - Shell One-Liners

Generates ready-to-use reverse shell commands with listener hints.

/reverse_shell lhost=10.0.0.1 shell_type=bash lport=4444
/reverse_shell lhost=10.0.0.1 shell_type=python lport=9999

Shell Types: bash, python, php, perl, powershell, nc, ruby, java

encode_decode - Encoding Utility

/encode_decode data="hello world" operation=encode format=base64
/encode_decode data="aGVsbG8gd29ybGQ=" operation=decode format=base64
/encode_decode data="<script>alert(1)</script>" operation=encode format=html

Formats: base64, url, hex, html, rot13

hash_identify - Hash Identification

Identifies hash types by regex and returns Hashcat mode numbers and John format names.

/hash_identify hash_value=5d41402abc4b2a76b9719d911017c592
/hash_identify hash_value=$2y$10$abcdefghijklmnopqrstuuABCDEFGHIJKLMNOPQRSTUVWXYZ012345

Supported Types: MD5, SHA-1, SHA-256, SHA-512, bcrypt, SHA-512/256/MD5 Crypt, NTLM, Apache APR1, MySQL, Django

enum_shares - Share Enumeration

/enum_shares target=192.168.1.1 enum_type=all
/enum_shares target=10.0.0.1 enum_type=smb username=admin password=pass

Enum Types: smb (smbclient + enum4linux), nfs (showmount), all

credential_store - Credential Management

Stores discovered credentials as JSON tied to the active session.

/credential_store action=add username=admin password=pass123 service=ssh target=10.0.0.1
/credential_store action=list
/credential_store action=search username=admin

parse_nmap - Nmap Output Parser

Parses both text and XML nmap output into structured JSON with hosts, open ports, services, OS detection, and script output.

/parse_nmap filepath=port_scan_10_0_0_1_quick_20240101_120000.txt
/parse_nmap filepath=scan_results.xml

parse_tool_output - Generic Output Parser

Auto-detects and parses output from nikto, gobuster, dirb, hydra, or sqlmap.

/parse_tool_output filepath=nikto_results.txt
/parse_tool_output filepath=gobuster_output.txt tool_type=gobuster

vulnerability_scan

/vulnerability_scan target=127.0.0.1 scan_type=quick
/vulnerability_scan target=example.com scan_type=comprehensive

Scan Types: quick, comprehensive, web, network

web_enumeration

/web_enumeration target=http://example.com enumeration_type=full

Types: basic, full, aggressive

network_discovery

/network_discovery target=192.168.1.0/24 discovery_type=comprehensive

Types: quick, comprehensive, stealth


Pre-installed Tools

The Docker container includes the following tools, all enabled for use through the run command:

CategoryTools
Network Scanningnmap, masscan, netcat, tcpdump, tshark
Web Testingnikto, gobuster, dirb, sqlmap, wfuzz, ffuf, feroxbuster, whatweb, wafw00f
Exploitationmetasploit-framework (msfconsole, msfvenom), searchsploit
Credential Attackshydra, hashcat, john
Information Gatheringwhois, dig, nslookup, amass, subfinder, theharvester, recon-ng, fierce, dnsenum, dnsrecon
Web Crawlinggospider, waybackurls
Share Enumerationsmbclient, enum4linux, showmount (nfs-common)
SSL/TLStestssl.sh, openssl
HTTP Probinghttpx-toolkit, curl, wget
File Analysisfile, strings, binwalk, exiftool, xxd, hexdump
Utilitiespython3, perl, ruby, php, git, base64, jq

All commands are allowed by default inside the container. The container itself is the security boundary.

Security Considerations

  • Container isolation: The server runs inside an isolated Docker container. Root is used inside the container because many security tools (nmap SYN scans, tcpdump, etc.) require raw socket access
  • Input sanitization: Shell metacharacters (;, &, |) are stripped from all command input
  • No host access: The container has no access to the host filesystem or network stack (unless volumes are explicitly mounted)
  • Authorization required: Only use for legitimate security testing with proper authorization
  • Local only: The container should not be exposed to the internet

Requirements

  • Docker
  • Claude Desktop or other MCP client (SSE or stdio)
  • Port 8000 available on your host machine

Development

Setup

bash
git clone https://github.com/yourusername/kali-mcp-server.git
cd kali-mcp-server

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Running Checks

bash
# All checks
./run_tests.sh

# Individual
pyright                          # Type checking
ruff check .                     # Linting
ruff format .                    # Formatting
pytest                           # All tests
pytest tests/test_tools.py       # Single file
pytest -k "session"              # Pattern match

Architecture

Adding a new tool requires changes in three places:

  1. kali_mcp_server/tools.py - Implement the async function
  2. kali_mcp_server/server.py - Add dispatch in handle_tool_request() and schema in list_available_tools()
  3. tests/ - Add tests in both test_tools.py and test_server.py

Acknowledgements

  • Kali Linux for their security-focused distribution
  • Anthropic for Claude and the MCP protocol
  • The open-source security tools community

Kali MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Kali MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Kali MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Kali MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "kali-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてKali MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Kali MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Kali MCP Serverを使ってこのタスクを手伝ってもらえますか?
Kali MCP Server
はい、読みました。
Kali MCP Serverで調べた結果をお伝えします。

よくある質問

Kali MCP Server MCPサーバーは何に使いますか?

Kali MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでKali MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでKali MCP Serverを利用できます。

TypingMindでKali MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Kali MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Kali MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Kali MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでKali MCP Server MCPのどのようなツールを利用できますか?

Kali MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Kali MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Kali MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇