MetasploitMCP MCP Server

A Model Context Protocol (MCP) server for Metasploit Framework integration.

Local serverstdioPython

What is the MetasploitMCP MCP server?

A Model Context Protocol (MCP) server for Metasploit Framework integration. That is what the metasploitmcp mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

This MCP server provides a bridge between large language models like Claude and the Metasploit Framework penetration testing platform. It allows AI assistants to dynamically access and control Metasploit functionality through standardized tools, enabling a natural language interface to complex security testing workflows.

What it needs from you

Configuration is passed through the environment: MSF_PASSWORD, RHOSTS, LHOST, PAYLOAD_SAVE_DIR. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Metasploit Framework installed and msfrpcd running - Python 3.10 or higher - Required Python packages (see requirements.txt)

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. It is maintained by GH05TCREW; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How to install the MetasploitMCP MCP server

{
    "mcpServers": {
        "metasploit": {
            "command": "uv",
            "args": [
                "--directory",
                "C:\\path\\to\\MetasploitMCP",
                "run",
                "MetasploitMCP.py",
                "--transport",
                "stdio"
            ],
            "env": {
                "MSF_PASSWORD": "yourpassword"
            }
        }
    }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Metasploit Framework installed and msfrpcd running - Python 3.10 or higher - Required Python packages (see requirements.txt)
VariableDescriptionRequired
MSF_PASSWORDConfiguration value read at startup.Optional
RHOSTSEndpoint or connection string the server talks to.Optional
LHOSTEndpoint or connection string the server talks to.Optional
PAYLOAD_SAVE_DIRFilesystem location the server is allowed to use.Optional

Frequently asked questions

It connects MetasploitMCP to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with MetasploitMCP directly.