Kali Linux MCP Server

Kali Linux MCP Server

Provides access to Kali Linux security tools through a Docker container, enabling penetration testing and security assessments via MCP-compatible clients.

Category
访问服务器

README

Kali Linux MCP Server

A Model Context Protocol (MCP) server that provides access to Kali Linux security tools through a Docker container. This server allows you to run penetration testing and security assessment tools in a controlled, containerized environment.

Features

  • Containerized Security Tools: Access to popular Kali Linux tools through Docker
  • MCP Integration: Compatible with MCP clients like Claude Desktop
  • Safe Execution: Tools run in an isolated Docker container
  • Comprehensive Tool Set: Includes nmap, gobuster, sqlmap, hydra, nuclei, and more
  • Resource Management: Built-in container lifecycle management

Available Tools

Network Scanning

  • nmap_scan: Perform network scanning with various scan types
  • masscan: High-speed port scanning
  • nuclei_scan: Vulnerability scanning with Nuclei templates

Web Application Testing

  • gobuster_scan: Directory and file bruteforcing
  • sqlmap_scan: SQL injection vulnerability testing
  • nikto: Web server vulnerability scanning

Authentication Testing

  • hydra_bruteforce: Password bruteforcing for various services

General Purpose

  • execute_command: Execute any command in the Kali container

Prerequisites

  • Docker and Docker Compose installed
  • Node.js 18+ for development
  • MCP-compatible client (e.g., Claude Desktop)

Installation

  1. Clone or navigate to the project directory:

    cd "Virtual Machines.localized/docker/kali"
    
  2. Install Node.js dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Quick Start

Option 1: Using Docker Compose (Recommended)

  1. Start the Kali container:

    npm run docker:compose
    
  2. Run the MCP server:

    npm start
    

Option 2: Manual Docker Management

  1. Build the Docker image:

    npm run docker:build
    
  2. Start the container:

    npm run docker:run
    
  3. Run the MCP server:

    npm start
    

Usage Examples

Network Scanning with Nmap

{
  "name": "nmap_scan",
  "arguments": {
    "target": "192.168.1.1",
    "scan_type": "tcp",
    "ports": "80,443,22,21"
  }
}

Directory Bruteforcing with Gobuster

{
  "name": "gobuster_scan",
  "arguments": {
    "url": "http://example.com",
    "wordlist": "common",
    "extensions": "php,html,js",
    "threads": 20
  }
}

SQL Injection Testing with SQLMap

{
  "name": "sqlmap_scan",
  "arguments": {
    "url": "http://example.com/login.php",
    "data": "username=admin&password=test",
    "level": 3,
    "risk": 2
  }
}

Password Bruteforcing with Hydra

{
  "name": "hydra_bruteforce",
  "arguments": {
    "target": "192.168.1.100",
    "service": "ssh",
    "username": "admin",
    "password_list": "common",
    "threads": 4
  }
}

Vulnerability Scanning with Nuclei

{
  "name": "nuclei_scan",
  "arguments": {
    "target": "https://example.com",
    "templates": "cves",
    "severity": "high"
  }
}

Custom Command Execution

{
  "name": "execute_command",
  "arguments": {
    "command": "searchsploit apache",
    "working_dir": "/home/kali"
  }
}

Configuration for Claude Desktop

Add this to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "kali-linux": {
      "command": "node",
      "args": ["/path/to/kali-linux-mcp-server/build/index.js"],
      "cwd": "/path/to/kali-linux-mcp-server"
    }
  }
}

Available Resources

The server provides several resources for information gathering:

  • kali://wordlists: List available wordlists in the container
  • kali://tools: Show installed security tools and their status
  • kali://container-info: Display container information and status

Development

Running in Development Mode

npm run dev

Building the Project

npm run build

Managing Docker Containers

  • Start container: npm run docker:compose
  • Stop container: npm run docker:compose:down
  • Rebuild image: npm run docker:build

Security Considerations

⚠️ Important Security Notes:

  1. Ethical Use Only: This tool is intended for authorized security testing only
  2. Isolated Environment: All tools run in a containerized environment
  3. Network Isolation: Consider network isolation for sensitive environments
  4. Resource Limits: Container has resource limits to prevent abuse
  5. No Root Access: Tools run as non-root user within the container

Troubleshooting

Container Issues

  1. Container not starting:

    docker logs kali-mcp-container
    
  2. Image build failures:

    docker system prune
    npm run docker:build
    
  3. Permission errors:

    docker exec -it kali-mcp-container chown -R kali:kali /home/kali
    

MCP Server Issues

  1. Module not found errors: Ensure dependencies are installed with npm install
  2. TypeScript compilation errors: Run npm run build to compile
  3. Docker connection errors: Verify Docker is running and accessible

Tool-Specific Notes

Nmap

  • Requires appropriate permissions for certain scan types
  • SYN scans may require root privileges (handled automatically)
  • Large scan ranges may take significant time

SQLMap

  • Batch mode is enabled by default to prevent interactive prompts
  • Test responsibly and only on systems you own or have permission to test

Hydra

  • Rate limiting is important to avoid detection
  • Use appropriate thread counts for target systems

Nuclei

  • Templates are automatically updated during image build
  • Severity filtering helps focus on important findings

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Disclaimer

This tool is for educational and authorized security testing purposes only. Users are responsible for complying with all applicable laws and regulations. The authors are not responsible for any misuse of this software.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选