Metasploit MCP Server

Metasploit Framework module execution, session management, and payload generation tools.

Data last scanned today · Reviewed yesterday

396 dangerous tools12 tools696PythonApache-2.0

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

ToolDescriptionRisk
list_exploitsSearch and list available Metasploit exploit moduleslow
list_payloadsSearch and list available Metasploit payload modules with optional platform and architecture filteringlow
run_exploitConfigure and execute an exploit against a target with options to run checks firsthigh
run_auxiliary_moduleRun any Metasploit auxiliary module with custom optionshigh
run_post_moduleExecute post-exploitation modules against existing sessionshigh
generate_payloadGenerate payload files using Metasploit RPC (saves files locally)medium
list_active_sessionsShow current Metasploit sessions with detailed informationlow
send_session_commandRun a command in an active shell or Meterpreter sessionhigh
terminate_sessionForcefully end an active sessionmedium
list_listenersShow all active handlers and background jobslow
start_listenerCreate a new multi/handler to receive connectionsmedium
stop_jobTerminate any running job or handlermedium

Compatibility

ClientLocalDockerRemoteRead-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

Metasploit MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.