Metasploit MCP Server

Unofficial Metasploit MCP Server (not affiliated with or endorsed by Rapid7) - provides Metasploit Framework functionality via the Model Context

Local serverstdioPython

What is the Metasploit MCP Server?

Unofficial Metasploit MCP Server (not affiliated with or endorsed by Rapid7) - provides Metasploit Framework functionality via the Model Context Protocol. A fork of

Credentials and setup notes

  • Python 3.10+ (3.11+ recommended) - Poetry for dependency management (Installation Guide) - Metasploit Framework with RPC enabled

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_exploitsSearch exploit modules
run_exploitExecute exploits
generate_payloadCreate payloads
start_listenerStart handlers
list_active_sessionsShow sessions
send_session_commandExecute commands

How to install the Metasploit MCP Server

{
  "mcpServers": {
    "metasploit": {
      "command": "uvx",
      "args": ["metasploit-mcp"],
      "env": {
        "MSF_PASSWORD": "your-value",
        "MSF_SERVER": "your-value",
        "MSF_PORT": "your-value",
        "PAYLOAD_SAVE_DIR": "your-value",
        "MSF_RPC_PROTOCOL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.10+ (3.11+ recommended) - Poetry for dependency management (Installation Guide) - Metasploit Framework with RPC enabled
VariableDescriptionRequired
MSF_PASSWORDConfiguration value read at startup.Optional
MSF_SERVERConfiguration value read at startup.Optional
MSF_PORTConfiguration value read at startup.Optional
PAYLOAD_SAVE_DIRFilesystem location the server is allowed to use.Optional
MSF_RPC_PROTOCOLConfiguration value read at startup.Optional

Example prompts to try

  • “Use Metasploit to list exploits.”
  • “Use Metasploit to run exploit.”
  • “Use Metasploit to generate payload.”

Frequently asked questions

Unofficial Metasploit MCP Server (not affiliated with or endorsed by Rapid7) - provides Metasploit Framework functionality via the Model Context Protocol. A fork of Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.