Kali Metasploit MCP Server

Kali Metasploit MCP Server

Enables interaction with Metasploit Framework for authorized security testing, including exploit searches, payload management, network scanning with nmap, and database operations for penetration testing workflows.

Category
访问服务器

README

Kali Metasploit MCP Server

License: MIT

MCP (Model Context Protocol) server for interacting with Metasploit Framework on Kali Linux and other security-focused distributions.

⚠️ Security Warning

This tool is for authorized security testing only. Use responsibly and legally.

  • Only use on systems you own or have explicit written permission to test
  • Unauthorized access to computer systems is illegal
  • The authors are not responsible for misuse of this software

Features

This MCP server provides the following tools:

  • Exploit Search: Search for exploits in the Metasploit database
  • Auxiliary Module Search: Search for auxiliary modules (scanners, fuzzers, etc.)
  • Exploit Information: Get detailed information about specific exploits
  • Payload Listing: List available payloads for exploits
  • Database Management:
    • Check database status
    • List workspaces
    • View hosts and services
  • Network Scanning: Run nmap scans and automatically import results into Metasploit database

Prerequisites

  • Kali Linux (or any Linux distribution with Metasploit Framework)
  • Node.js 18+ (or Node.js 20+ recommended)
  • Metasploit Framework installed and configured
  • nmap (optional, for network scanning features)

Installing Metasploit Framework

On Kali Linux:

sudo apt-get update
sudo apt-get install metasploit-framework

On other Debian-based systems:

curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb | sudo bash

Installing nmap (for scanning features)

sudo apt-get install nmap

Installation

  1. Clone or download this repository:
git clone https://github.com/andreransom58-coder/kali-metasploit-mcp.git
cd kali-metasploit-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage

Standalone Testing

Run the server directly:

npm start

Or in development mode:

npm run dev

Integration with MCP Clients

Claude Desktop

Add to your Claude Desktop configuration file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "kali-metasploit": {
      "command": "node",
      "args": ["/absolute/path/to/kali-metasploit-mcp/dist/index.js"]
    }
  }
}

Cursor IDE

Add to your Cursor settings (.cursor-settings or workspace settings):

{
  "mcp": {
    "servers": {
      "kali-metasploit": {
        "command": "node",
        "args": ["/absolute/path/to/kali-metasploit-mcp/dist/index.js"]
      }
    }
  }
}

Available Tools

search_exploits

Search for exploits in Metasploit database.

Parameters:

  • query (required): Search query (e.g., "windows smb", "apache", "CVE-2021-44228")
  • platform (optional): Filter by platform (windows, linux, etc.)

Example:

search_exploits({
  query: "windows smb",
  platform: "windows"
})

search_auxiliary

Search for auxiliary modules.

Parameters:

  • query (required): Search query
  • type (optional): Filter by type (scanner, admin, dos, fuzzers, gather)

get_exploit_info

Get detailed information about a specific exploit.

Parameters:

  • exploitPath (required): Full exploit path (e.g., "exploit/windows/smb/ms17_010_eternalblue")

get_payloads

List available payloads for an exploit.

Parameters:

  • exploitPath (required): Full exploit path

db_status

Check Metasploit database status.

db_workspaces

List all Metasploit workspaces.

db_hosts

List all hosts in the current workspace.

Parameters:

  • workspace (optional): Workspace name to query

db_services

List all services in the current workspace.

Parameters:

  • host (optional): Filter by host IP address

nmap_scan

Run an nmap scan and import results into Metasploit database.

Parameters:

  • target (required): Target IP address or CIDR range
  • ports (optional): Port range or specific ports (e.g., "80,443" or "1-1000")
  • scanType (optional): Type of scan (quick, stealth, full, udp)

Example:

nmap_scan({
  target: "192.168.1.0/24",
  ports: "80,443,8080",
  scanType: "stealth"
})

Development

Build

npm run build

Watch Mode

npm run watch

Development Mode

npm run dev

Troubleshooting

Metasploit not found

If you get an error that msfconsole is not found:

  1. Ensure Metasploit Framework is installed
  2. Check that msfconsole is in your PATH
  3. Try running which msfconsole (or where msfconsole on Windows) to verify

Database not initialized

If database operations fail:

  1. Initialize the database: msfdb init
  2. Start the database: msfdb start
  3. Verify: msfconsole -q -x "db_status; exit"

Permission errors

Some operations may require root privileges:

  • Network scanning may require elevated privileges
  • Ensure proper permissions for database access

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This software is provided for educational and authorized testing purposes only. The authors and contributors are not responsible for any misuse or damage caused by this software. Always ensure you have proper authorization before testing any systems.

Acknowledgments

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选