Metasploit MCP Server
Metasploit Framework module execution, session management, and payload generation tools.
Data last scanned today · Reviewed yesterday
Overview
The Metasploit MCP Server provides an interface for connecting large language models to the Metasploit Framework. It exposes tools for searching exploits and payloads, managing active sessions and listeners, and executing auxiliary or post-exploitation modules through the Metasploit RPC service.
Our verdict
This project carries a high risk level with a security score of 24/100. The primary security concern is the complete lack of an authentication method, meaning any entity with access to the configuration can control your Metasploit environment. Furthermore, the server lacks a read-only mode, granting full write and execution capabilities by default. This server is not recommended for production environments or systems handling sensitive data without robust external network segmentation.
- Supports both HTTP/SSE and STDIO transport methods
- Provides direct interface for payload generation and session management
- Zero direct code dependencies reduce supply-chain surface area
- Apache-2.0 open source license
- No authentication mechanism implemented
- Full write access enabled with no read-only option
- Community-maintained project not backed by official vendor
- Last code commit occurred over 160 days ago
Tools
| Tool | Description | Risk |
|---|---|---|
| list_exploits | Search and list available Metasploit exploit modules | low |
| list_payloads | Search and list available Metasploit payload modules with optional platform and architecture filtering | low |
| run_exploit | Configure and execute an exploit against a target with options to run checks first | high |
| run_auxiliary_module | Run any Metasploit auxiliary module with custom options | high |
| run_post_module | Execute post-exploitation modules against existing sessions | high |
| generate_payload | Generate payload files using Metasploit RPC (saves files locally) | medium |
| list_active_sessions | Show current Metasploit sessions with detailed information | low |
| send_session_command | Run a command in an active shell or Meterpreter session | high |
| terminate_session | Forcefully end an active session | medium |
| list_listeners | Show all active handlers and background jobs | low |
| start_listener | Create a new multi/handler to receive connections | medium |
| stop_job | Terminate any running job or handler | medium |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| ChatGPT | ||||
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf |
Frequently asked questions
›What are the core software requirements to run this server?
You must have the Metasploit Framework installed, the msfrpcd service running, and Python 3.10 or higher.
›Does this server support different connection methods?
Yes, it supports HTTP/SSE for general interoperability and STDIO for direct pipe connections used by clients like Claude Desktop.
›How do I configure the server to connect to my Metasploit RPC instance?
You can set environment variables including MSF_PASSWORD, MSF_SERVER, MSF_PORT, and MSF_SSL to define the connection parameters.
›Can I control where generated payloads are saved?
Yes, you can specify a local directory for payload files by setting the PAYLOAD_SAVE_DIR environment variable.
›Is it possible to run this server using a custom host or port?
Yes, when using HTTP mode, you can specify the host and port using the --host and --port flags.
Alternatives
Badge
Maintain this server? Add the live badge to your README.