WM

wh0am123/mcp-kali-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

866 stars 178 forks 质量 61 趋势 23MIT

MCP 配置以连接 AI 代理到 Linux 机器。

概览

是一个轻量级的API桥接器,连接MCP客户端(例如:Claude Desktop或5ire)与允许在Linux终端上执行命令的API服务器。 该MCP能够运行终端命令,并通过以下方式与Web应用程序交互: - Dirb - enum4linux - gobuster - Hydra - 约翰开膛手 - Metasploit-Framework - Nikto - Nmap - sqlmap - WPScan - 同时还能执行原始命令。 因此,这能够实时执行和求解。 其目标是通过以下方式实现AI驱动的攻击性安全测试: - 让MCP与OpenAI、Claude、DeepSeek、Ollama或其他任何模型等AI端点交互。- 在Kali机器上提供执行命令的API。- 利用AI建议并运行终端命令,以解决夺旗挑战或自动化侦察/利用任务。- 允许MCP应用发送自定义请求(如curl、nmap、ffuf等)并接收结构化输出。 这里有一些示例(使用谷歌的AI Gemini 2.0闪存): https://github.

概述(AI 翻译)

MCP Kali 服务器(MKS) 是一个轻量级 API 桥接器,连接 MCP 客户端(例如 Claude Desktop 或 5ire)与允许在 Linux 终端上执行命令的 API 服务器。

该MCP能够运行终端命令,并通过以下方式与Web应用程序交互:

  • Dirb
  • enum4linux
  • gobuster
  • Hydra
  • John the Ripper
  • Metasploit-Framework
  • Nikto
  • Nmap
  • sqlmap
  • WPScan
  • 同时还能执行原始命令。

因此,它能够实时执行AI辅助渗透测试并解决CTF挑战。

使用此工具的文章

👉 MCP如何革新进攻安全


🔍 使用场景

其目标是通过以下方式实现AI驱动的攻击性安全测试:

  • 让MCP能够与OpenAI、Claude、DeepSeek、Ollama或其他任何模型等AI端点交互。
  • 在 Kali 机器上暴露 API 以执行命令。
  • 利用人工智能建议并运行终端命令,以解决夺旗挑战或自动化侦察/利用任务。
  • 允许MCP应用发送自定义请求(例如curl、nmap、[[T12]等)并接收结构化输出。

这里有一些例子(使用谷歌的AIgemini 2.0 flash):

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP Kali Server

MCP Kali Server (MKS) is a lightweight API bridge that connects MCP clients (e.g: Claude Desktop or 5ire) to the API server which allows executing commands on a Linux terminal.

This MCP is able to run terminal commands as well as interacting with web applications using:

  • Dirb
  • enum4linux
  • gobuster
  • Hydra
  • John the Ripper
  • Metasploit-Framework
  • Nikto
  • Nmap
  • sqlmap
  • WPScan
  • As well as being able to execute raw commands.

As a result, this is able to perform AI-assisted penetration testing and solving CTF challenges in real time.

Articles Using This Tool

👉 How MCP is Revolutionizing Offensive Security


🔍 Use Case

The goal is to enable AI-driven offensive security testing by:

  • Letting the MCP interact with AI endpoints like OpenAI, Claude, DeepSeek, Ollama or any other models.
  • Exposing an API to execute commands on a Kali machine.
  • Using AI to suggest and run terminal commands to solve CTF challenges or automate recon/exploitation tasks.
  • Allowing MCP apps to send custom requests (e.g. curl, nmap, ffuf, etc.) and receive structured outputs.

Here are some example (using Google’s AI gemini 2.0 flash):

Example solving a web CTF challenge from RamadanCTF

https://github.com/user-attachments/assets/dc93b71d-9a4a-4ad5-8079-2c26c04e5397

Trying to solve machine “code” from HTB

https://github.com/user-attachments/assets/3ec06ff8-0bdf-4ad5-be71-2ec490b7ee27


🚀 Features

  • 🧠 AI Endpoint Integration: Connect your Kali to any MCP of your liking such as Claude Desktop or 5ier.
  • 🖥️ Command Execution API: Exposes a controlled API to execute terminal commands on your Kali Linux machine.
  • 🕸️ Web Challenge Support: AI can interact with websites and APIs, capture flags via curl and any other tool AI the needs.
  • 🔐 Designed for Offensive Security Professionals: Ideal for red teamers, bug bounty hunters, or CTF players automating common tasks.

🛠️ Installation and Running

On your Kali Machine

sudo apt install mcp-kali-server
kali-server-mcp

Otherwise for bleeding edge:

git clone https://github.com/Wh0am123/MCP-Kali-Server.git
cd MCP-Kali-Server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →