MetasploitSAFE
MCP Server for Metasploit
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A Model Context Protocol (MCP) server for Metasploit Framework integration.
https://github.com/user-attachments/assets/39b19fb5-8397-4ccd-b896-d1797ec185e1
Description
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.
Features
Module Information
- list_exploits: Search and list available Metasploit exploit modules
- list_payloads: Search and list available Metasploit payload modules with optional platform and architecture filtering
Exploitation Workflow
- run_exploit: Configure and execute an exploit against a target with options to run checks first
- run_auxiliary_module: Run any Metasploit auxiliary module with custom options
- run_post_module: Execute post-exploitation modules against existing sessions
Payload Generation
- generate_payload: Generate payload files using Metasploit RPC (saves files locally)
Session Management
- list_active_sessions: Show current Metasploit sessions with detailed information
- send_session_command: Run a command in an active shell or Meterpreter session
- terminate_session: Forcefully end an active session
Handler Management
- list_listeners: Show all active handlers and background jobs
- start_listener: Create a new multi/handler to receive connections
- stop_job: Terminate any running job or handler
Prerequisites
- Metasploit Framework installed and msfrpcd running
- Python 3.10 or higher
- Required Python packages (see requirements.txt)
Installation
- Clone this repository
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables (optional):
MSF_PASSWORD=yourpassword MSF_SERV
58dcae53f10bOBSERVED · 2026-09-28Exposed tools (12)
5 read · 6 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
generate_payload | read | |
list_active_sessions | read | List active Metasploit sessions with their details. |
list_exploits | read | |
list_listeners | read | List all active Metasploit jobs, categorizing exploit/multi/handler jobs. |
list_payloads | read | |
run_auxiliary_module | write | |
run_exploit | write | |
run_post_module | write | |
send_session_command | write | |
start_listener | write | |
stop_job | write | |
terminate_session | destructive |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
terminate_session
fastapi, uvicorn, pymetasploit3, mcp, fastmcp
Gates applied: no_behavioural_pass.
58dcae53f10bfull audit observations/trust-audit/mcp-server/gh05tcrew__metasploit.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-09-28 | 58dcae53f10b | SAFE | B | 89 | first audit |
Questions
What is the Metasploit MCP server?
MCP Server for Metasploit
What tools does Metasploit expose?
12 in total: 5 read-only, 6 that write, and 1 that can delete or overwrite (terminate_session). Every one is listed on this page with its risk.
Is Metasploit safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Metasploit need?
It reads MSF_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Metasploit run?
It speaks stdio, so it runs as a local process your client starts.
How current is this page?
The grade is for one exact copy of the source (58dcae53f10b), read on 2026-09-28. The repository is watched and re-audited when it changes.