Metasploit MCP Server
About
It is an MCP server that provides a standardized interface for AI models to interact with the Metasploit Framework through Python. It enables module management, module execution, and session management via Metasploit's RPC (MSFRPC).
Details
- Author
- xcape-inc
- Downloads
- 306
- Categories
- Other
Jump to
- List, search, and get details on Metasploit modules
- Execute modules with custom options
- Get and set module options
- List and inspect active sessions
- Write data to and read data from sessions
- Run commands in sessions
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Metasploit MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install Python 3.12+, Metasploit with MSFRPC enabled, and uv. Clone the repository and run uv pip install -r requirements.txt. Create a .env file with RPC credentials and host/port settings. Start msfrpcd with the appropriate password, then launch the server using uv --directory <path> run python main.py --role viewer.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"metasploit mcp server": {
"chatsploit-mpc": {
"command": "uv",
"args": [
"pip",
"install",
"-r",
"requirements.txt"
]
}
}
}
}
McpServers
{
"chatsploit-mpc": {
"command": "uv",
"args": [
"pip",
"install",
"-r",
"requirements.txt"
]
}
}
Metasploit MCP Server
A Model Context Protocol (MCP) server for interacting with the Metasploit Framework through Python. This server provides a standardized interface for AI models to interact with Metasploit's functionality.
Features
- Module Management
- List available modules
- Get detailed module information
- Search for modules
- Module Execution
- Execute modules with custom options
- Get and set module options
- Session Management
- List active sessions
- Get session information
- Read/write to sessions
- Execute commands in sessions
Prerequisites
- Python 3.12 or higher
- Metasploit Framework with MSFRPC enabled
- MCP client library
- uv (Python package installer)
Installation
1. Clone this repository
2. Install dependencies:
uv pip install -r requirements.txt
Configuration
Create a .env file with the following settings:
MSF_RPC_USERNAME=your_username
MSF_RPC_PASSWORD=your_password
MSF_RPC_HOST=127.0.0.1
MSF_RPC_PORT=55553
MSF_RPC_SSL=false
Usage
1. Start the Metasploit RPC server:
msfrpcd -P your_password -S -a 127.0.0.1
2. Run the MCP server (this is also how your MCP client can run this server):
uv --directory <path you cloned to> run python main.py --role viewer
Available Tools
Module Management
-list_modules: List available Metasploit modules
- module_info: Get detailed information about a specific module
- search_modules: Search for modules matching a query
Module Execution
-execute_module: Execute a module with specified options
- get_options: Get available options for a module
- set_option: Set an option for a module
Session Management
-list_sessions: List all active sessions
- session_info: Get detailed information about a session
- session_write: Write data to a session
- session_read: Read data from a session
- run_command: Execute a command in a session
License
MIT License
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



