GH05TCREW/MetasploitMCP
MCP Server for Metasploit
afc792d9ee17Paths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 3 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- INFONo published risk: no tool declared to run commands, files, addresses or queries of the caller's choice, no known vulnerability in a production package, no advisory. Not every path through the code could be followed. Code findings appear here only after a person has verified them.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 12 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
generate_payloadNo tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files1 tool · generate_payload
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (12: 12 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
generate_payloadtool Generate a Metasploit payload using the RPC API (payload.generate).Filesoutside text
Generate a Metasploit payload using the RPC API (payload.generate).
Saves the generated payload to a file on the server if successful.
Args:
payload_type: Type of payload (e.g., windows/meterpreter/reverse_tcp).
format_type: Output format (raw, exe, python, etc.).
options: Dictionary of required payload options (e.g., {"LHOST": "1.2.3.4", "LPORT": 4444})
or string format "LHOST=1.2.3.4,LPORT=4444". Prefer dict format.
encoder: Optional encoder to use.
iterations: Optional number of encoding iterations.
bad_chars: Optional string of bad characters to avoid (e.g., '\\x00\\x0a\\x0d').
nop_sled_size: Optional size of NOP sled.
template_path: Optional path to an executable template.
keep_template: Keep the template working (requires template_path).
force_encode: Force encoding even if not needed by bad chars.
output_filename: Optional desired filename (without path). If None, a default name is generated.
Returns:
Dictionary containing status, message, payload size/info, and server-side save path.list_active_sessionstool List active Metasploit sessions with their details.
List active Metasploit sessions with their details.
list_exploitstool List available Metasploit exploits, optionally filtered by search term.
List available Metasploit exploits, optionally filtered by search term.
Args:
search_term: Optional term to filter exploits (case-insensitive).
Returns:
List of exploit names matching the term (max 200), or top 100 if no term.list_listenerstool List all active Metasploit jobs, categorizing exploit/multi/handler jobs.
List all active Metasploit jobs, categorizing exploit/multi/handler jobs.
list_payloadstool List available Metasploit payloads, optionally filtered by platform and/or architecture.
List available Metasploit payloads, optionally filtered by platform and/or architecture.
Args:
platform: Optional platform filter (e.g., 'windows', 'linux', 'python', 'php').
arch: Optional architecture filter (e.g., 'x86', 'x64', 'cmd', 'meterpreter').
Returns:
List of payload names matching filters (max 100).run_auxiliary_moduletool Run a Metasploit auxiliary module.
Run a Metasploit auxiliary module.
Args:
module_name: Name/path of the auxiliary module (e.g., 'scanner/ssh/ssh_login').
options: Dictionary of module options (e.g., {'RHOSTS': ..., 'USERNAME': ...}).
run_as_job: If False (default), run sync via console. If True, run async via RPC.
check_target: If True, run module's 'check' action first (if available).
timeout_seconds: Max time for synchronous run via console.
Returns:
Dictionary with execution results or error details.run_exploittool Run a Metasploit exploit module with specified options. Handles async (job)
Run a Metasploit exploit module with specified options. Handles async (job)
and sync (console) execution, and includes session polling for jobs.
Args:
module_name: Name/path of the exploit module (e.g., 'unix/ftp/vsftpd_234_backdoor').
options: Dictionary of exploit module options (e.g., {'RHOSTS': '192.168.1.1'}).
payload_name: Name of the payload (e.g., 'linux/x86/meterpreter/reverse_tcp').
payload_options: Dictionary of payload options (e.g., {'LHOST': '...', 'LPORT': ...})
or string format "LHOST=1.2.3.4,LPORT=4444". Prefer dict format.
run_as_job: If False (default), run sync via console. If True, run async via RPC.
check_vulnerability: If True, run module's 'check' action first (if available).
timeout_seconds: Max time for synchronous run via console.
Returns:
Dictionary with execution results (job_id, session_id, output) or error details.run_post_moduletool Run a Metasploit post-exploitation module against a session.
Run a Metasploit post-exploitation module against a session.
Args:
module_name: Name/path of the post module (e.g., 'windows/gather/enum_shares').
session_id: The ID of the target session.
options: Dictionary of module options. 'SESSION' will be added automatically.
run_as_job: If False (default), run sync via console. If True, run async via RPC.
timeout_seconds: Max time for synchronous run via console.
Returns:
Dictionary with execution results or error details.send_session_commandtool Send a command to an active Metasploit session (Meterpreter or Shell) and get output.
Send a command to an active Metasploit session (Meterpreter or Shell) and get output.
Uses session.run_with_output for Meterpreter, and a prompt-aware loop for shells.
The agent is responsible for parsing the raw output.
In Meterpreter mode, to run a shell command, run `shell` to enter the shell mode first.
To exit shell mode and return to Meterpreter, run `exit`.
Args:
session_id: ID of the target session.
command: Command string to execute in the session.
timeout_seconds: Maximum time to wait for the command to complete.
Returns:
Dictionary with status ('success', 'error', 'timeout') and raw command output.start_listenertool Start a new Metasploit handler (exploit/multi/handler) as a background job.
Start a new Metasploit handler (exploit/multi/handler) as a background job.
Args:
payload_type: The payload to handle (e.g., 'windows/meterpreter/reverse_tcp').
lhost: Listener host address.
lport: Listener port (1-65535).
additional_options: Optional dict of additional payload options (e.g., {"LURI": "/path"})
or string format "LURI=/path,HandlerSSLCert=cert.pem". Prefer dict format.
exit_on_session: If True, handler exits after first session. If False (default), it keeps running.
Returns:
Dictionary with handler status (job_id) or error details.stop_jobtool Stop a running Metasploit job (handler or other). Verifies disappearance.
Stop a running Metasploit job (handler or other). Verifies disappearance.
terminate_sessiontool Forcefully terminate a Metasploit session using the session.stop() method.
Forcefully terminate a Metasploit session using the session.stop() method.
Args:
session_id: ID of the session to terminate.
Returns:
Dictionary with status and result message.Text the model reads (12)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
list_exploits tool
List available Metasploit exploits, optionally filtered by search term.
Args:
search_term: Optional term to filter exploits (case-insensitive).
Returns:
List of exploit names matching the term (max 200), or top 100 if no term.list_payloads tool
List available Metasploit payloads, optionally filtered by platform and/or architecture.
Args:
platform: Optional platform filter (e.g., 'windows', 'linux', 'python', 'php').
arch: Optional architecture filter (e.g., 'x86', 'x64', 'cmd', 'meterpreter').
Returns:
List of payload names matching filters (max 100).generate_payload tool
Generate a Metasploit payload using the RPC API (payload.generate).
Saves the generated payload to a file on the server if successful.
Args:
payload_type: Type of payload (e.g., windows/meterpreter/reverse_tcp).
format_type: Output format (raw, exe, python, etc.).
options: Dictionary of required payload options (e.g., {"LHOST": "1.2.3.4", "LPORT": 4444})
or string format "LHOST=1.2.3.4,LPORT=4444". Prefer dict format.
encoder: Optional encoder to use.
iterations: Optional number of encoding iterations.
bad_chars: Optional string of bad characters to avoid (e.g., '\\\\x00\\\\x0a\\\\x0d').
nop_sled_size: Optional size of NOP sled.
template_path: Optional path to an executable template.
keep_template: Keep the template working (requires template_path).
force_encode: Force encoding even if not needed by bad chars.
output_filename: Optional desired filename (without path). If None, a default name is generated.
Returns:
Dictionary containing status, message, payload size/info, and server-side save path.run_exploit tool
Run a Metasploit exploit module with specified options. Handles async (job)
and sync (console) execution, and includes session polling for jobs.
Args:
module_name: Name/path of the exploit module (e.g., 'unix/ftp/vsftpd_234_backdoor').
options: Dictionary of exploit module options (e.g., {'RHOSTS': '192.168.1.1'}).
payload_name: Name of the payload (e.g., 'linux/x86/meterpreter/reverse_tcp').
payload_options: Dictionary of payload options (e.g., {'LHOST': '...', 'LPORT': ...})
or string format "LHOST=1.2.3.4,LPORT=4444". Prefer dict format.
run_as_job: If False (default), run sync via console. If True, run async via RPC.
check_vulnerability: If True, run module's 'check' action first (if available).
timeout_seconds: Max time for synchronous run via console.
Returns:
Dictionary with execution results (job_id, session_id, output) or error details.run_post_module tool
Run a Metasploit post-exploitation module against a session.
Args:
module_name: Name/path of the post module (e.g., 'windows/gather/enum_shares').
session_id: The ID of the target session.
options: Dictionary of module options. 'SESSION' will be added automatically.
run_as_job: If False (default), run sync via console. If True, run async via RPC.
timeout_seconds: Max time for synchronous run via console.
Returns:
Dictionary with execution results or error details.run_auxiliary_module tool
Run a Metasploit auxiliary module.
Args:
module_name: Name/path of the auxiliary module (e.g., 'scanner/ssh/ssh_login').
options: Dictionary of module options (e.g., {'RHOSTS': ..., 'USERNAME': ...}).
run_as_job: If False (default), run sync via console. If True, run async via RPC.
check_target: If True, run module's 'check' action first (if available).
timeout_seconds: Max time for synchronous run via console.
Returns:
Dictionary with execution results or error details.list_active_sessions tool
List active Metasploit sessions with their details.
send_session_command tool
Send a command to an active Metasploit session (Meterpreter or Shell) and get output.
Uses session.run_with_output for Meterpreter, and a prompt-aware loop for shells.
The agent is responsible for parsing the raw output.
In Meterpreter mode, to run a shell command, run `shell` to enter the shell mode first.
To exit shell mode and return to Meterpreter, run `exit`.
Args:
session_id: ID of the target session.
command: Command string to execute in the session.
timeout_seconds: Maximum time to wait for the command to complete.
Returns:
Dictionary with status ('success', 'error', 'timeout') and raw command output.list_listeners tool
List all active Metasploit jobs, categorizing exploit/multi/handler jobs.
start_listener tool
Start a new Metasploit handler (exploit/multi/handler) as a background job.
Args:
payload_type: The payload to handle (e.g., 'windows/meterpreter/reverse_tcp').
lhost: Listener host address.
lport: Listener port (1-65535).
additional_options: Optional dict of additional payload options (e.g., {"LURI": "/path"})
or string format "LURI=/path,HandlerSSLCert=cert.pem". Prefer dict format.
exit_on_session: If True, handler exits after first session. If False (default), it keeps running.
Returns:
Dictionary with handler status (job_id) or error details.stop_job tool
Stop a running Metasploit job (handler or other). Verifies disappearance.
terminate_session tool
Forcefully terminate a Metasploit session using the session.stop() method.
Args:
session_id: ID of the session to terminate.
Returns:
Dictionary with status and result message.What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 12 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 12 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file pathNo tool works on a file path the caller supplies without a root check — 12 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Requests any addressNo tool sends a request to an address the caller supplies — 12 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 12 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 12 capabilities; 12 more call code the scanner could not follow, where it may happen
- Tools that touch files1 of 12 capabilities touch files; 11 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 12 capabilities; 12 more call code the scanner could not follow, where it may happen
Where the code is: 12 handlers in 1 file at commit afc792d9ee17
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: requirements.txt
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 1 not resolved: requirements.txt: 5 dependency lines carry no exact version, so the installed version was not checked; pin them or add a lockfile
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionfastmcp >=2.10.3, mcp >=1.6.0
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 12 capabilities; 12 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | fastmcp >=2.10.3, mcp >=1.6.0 |
| Servers in the code | 1 (Metasploit Tools Enhanced (Streamlined)) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-02-05 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 5 catalogs (awesome_tensorblock, github_search, glama, mcp_toplist, mcpservers_org) |
|---|---|
| License | Apache-2.0 |
| Created | 2025-04-13 |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.