Mcp Pymetasploit3

io.github.daedalusPublished by GitHub account daedalusv0.1.1Updated Oct 24, 2026

MCP server for Metasploit Framework via pymetasploit3

VerifiedSTDIODesktop onlyDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

A local MCP server that exposes Metasploit Framework over msfrpc, letting an assistant list, configure, run and manage modules, payloads, sessions and framework

What you can do
Connect to and disconnect from a Metasploit RPC server and check connection status and framework version, core state and global variables, jobs and plugins. Search, list, load and inspect modules, set options and targets, check missing required options and execute modules. Generate payloads and list compatible targets and payloads. List, inspect, interact with, run commands in and stop sessions. Create, write to, read and destroy consoles and run modules with output. Query the database for workspaces, hosts, services, notes, credentials and vulnerabilities.
When to use it
For authorized security testing, lab or CTF work where an assistant should drive an existing Metasploit Framework instance through its RPC interface instead of typing msfconsole commands by hand. Not for general development or non-security tasks.
Requirements
Runs locally as a Python package installed with pip, on desktop only. Needs a running Metasploit Framework RPC server (msfrpcd or msgrpc in msfconsole) reachable at a host and port, plus the RPC password supplied to the connect tool. No environment variables or headers are declared.
Before you install
This gives an assistant control of an offensive security framework: executing modules, generating payloads, running commands in sessions and changing framework state can affect real systems, so use only on systems you are authorized to test. The RPC password is passed to the connect tool and must be protected. Database tools can read stored credentials and vulnerability data. Loading plugins and executing modules can run arbitrary code on targets.

Installation

In SourceWeft

  1. Open Mcp Pymetasploit3 in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

mcp-pymetasploit3

MCP server for Metasploit Framework via pymetasploit3. This server exposes all pymetasploit3 functionality as MCP tools, allowing LLMs to interact with Metasploit Framework through the msfrpc protocol.

[PyPI] [Python]

Install

bash
pip install mcp-pymetasploit3

MCP Server Configuration

json
{  "mcpServers": {    "mcp-pymetasploit3": {      "command": "mcp-pymetasploit3",      "env": {}    }  }}

Usage

Starting Metasploit RPC Server

Before using the MCP server, you need to start the Metasploit RPC server:

Using msfrpcd:

bash
msfrpcd -P yourpassword -p 55553 -n

Using msfconsole:

bash
msfconsole -qmsf6 > load msgrpc Pass=yourpassword

MCP Tools

Once connected, the following tools are available:

Connection Management
  • connect - Connect to Metasploit RPC server
  • disconnect - Disconnect from RPC server
  • get_client_info - Get current connection status
Module Management
  • list_modules - List available modules by type
  • use_module - Load a specific module
  • get_module_info - Get module description and info
  • get_module_options - Get all module options
  • set_module_option - Set a module option
  • get_missing_required - Get required options not set
  • execute_module - Execute a module
  • get_module_targets - Get available targets
  • set_module_target - Set the target
  • get_target_payloads - Get compatible payloads
Payload Generation
  • generate_payload - Generate a payload
Session Management
  • list_sessions - List all active sessions
  • get_session_info - Get session information
  • interact_session - Write/read from session
  • session_run_command - Run command with output
  • stop_session - Stop a session
Console Management
  • create_console - Create a new console
  • destroy_console - Destroy a console
  • write_console - Write to console
  • read_console - Read console output
  • console_is_busy - Check if console is busy
  • run_module_output - Execute module and get output
Core/Framework
  • get_framework_version - Get framework version
  • core_save - Save core state
  • core_reload_modules - Reload modules
  • core_set_global - Set global variable
  • core_unset_global - Unset global variable
Database
  • get_db_status - Get database status
  • db_list_workspaces - List workspaces
  • db_set_workspace - Set current workspace
  • db_list_hosts - List hosts
  • db_list_services - List services
  • db_list_notes - List notes
  • db_list_creds - List credentials
  • db_list_vulns - List vulnerabilities
Jobs
  • list_jobs - List running jobs
  • stop_job - Stop a job
  • get_job_info - Get job information
Plugins
  • list_plugins - List loaded plugins
  • load_plugin - Load a plugin
  • unload_plugin - Unload a plugin
Search
  • search_modules - Search for modules
  • get_module_references - Get module references

Example

python
# Connect to Metasploitconnect(password="yourpassword", host="127.0.0.1", port=55553, ssl=False)
# List exploitsexploits = list_modules("exploit")
# Use an exploituse_module("exploit", "unix/ftp/vsftpd_234_backdoor")
# Set optionsset_module_option("exploit", "unix/ftp/vsftpd_234_backdoor", "RHOSTS", "192.168.1.100")
# Executeresult = execute_module("exploit", "unix/ftp/vsftpd_234_backdoor", payload="cmd/unix/interact")
# List sessionssessions = list_sessions()
# Interact with sessionoutput = interact_session("1", "whoami")
# Disconnectdisconnect()

Development

bash
git clone https://github.com/daedalus/mcp-pymetasploit3.gitcd mcp-pymetasploit3pip install -e ".[test]"
# run testspytest
# formatruff format src/ tests/
# lintruff check src/ tests/
# type checkmypy src/

mcp-name: io.github.daedalus/mcp-pymetasploit3

Source: README.md at commit 295f8aa

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts