MCP cover image
See in Github
2025-04-08

MCP配置将AI代理连接到Linux计算机。

1

Github Watches

2

Github Forks

9

Github Stars

MCP Kali Server

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

This allows the MCP to run terminal commands like nmap, nxc or any other tool, interact with web applications using tools like curl, wget, gobuster. And perform AI-assisted penetration testing, solving CTF web challenge in real time, helping in solving machines from HTB or THM.

My Medium Article on This Tool

How MCP is Revolutionizing Offensive Security

👉 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, 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 for my testing (I used google's AI gemini 2.0 flash)

Example solving my web CTF challenge in 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

On your Linux Machine (Will act as MCP Server)

git clone https://github.com/Wh0am123/MCP-Kali-Server.git
cd MCP-Kali-Server
python3 kali_server.py

On your MCP Client (You can run on Windows or Linux)

  • You will want to run python3 /absolute/path/to/mcp_server.py http://LINUX_IP:5000

Configuration for claude desktop:

edit (C:\Users\USERNAME\AppData\Roaming\Claude\claude_desktop_config.json)

{
    "mcpServers": {
        "kali_mcp": {
            "command": "python3",
            "args": [
                "/absolute/path/to/mcp_server.py",
                "http://LINUX_IP:5000/"
            ]
        }
    }
}

Configuration for 5ire Desktop Application:

  • Simply add an MCP with the command python3 /absolute/path/to/mcp_server.py http://LINUX_IP:5000 and it will automatically generate the needed configuration files.

🔮 Other Possibilities

There are more possibilites than described since the AI model can now execute commands on the terminal. Here are some example:

  • Memory forensics using Volatility

    • Automating memory analysis tasks such as process enumeration, DLL injection checks, and registry extraction from memory dumps.
  • Disk forensics with SleuthKit

    • Automating analysis from disk images, timeline generation, file carving, and hash comparisons.

⚠️ Disclaimer:

This project is intended solely for educational and ethical testing purposes. Any misuse of the information or tools provided — including unauthorized access, exploitation, or malicious activity — is strictly prohibited. The author assumes no responsibility for misuse.

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • modelcontextprotocol
  • 模型上下文协议服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • open-webui
  • 用户友好的AI接口(支持Ollama,OpenAi API,...)

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • metorial
  • 数百个MCP服务器的容器化版本📡📡

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

    Reviews

    3 (1)
    Avatar
    user_lglniNex
    2025-04-17

    MCP-Kali-Server by Wh0am123 is an outstanding tool for any cybersecurity enthusiast. The setup is seamless, and the comprehensive documentation is incredibly helpful. This server makes penetration testing and other cybersecurity tasks a breeze. Highly recommend checking it out via their GitHub link for an efficient and robust solution.