msf-mcp-routing

msf-mcp-routing is a cursor rule for Cursor from Suzu-Testing/metasploit-cursor-harness. It costs 1,406 tokens per session, scanned A, original, MIT.

A rule for choosing Metasploit MCP tools—the available tool interface for Metasploit—instead of typing Metasploit commands directly in a shell. It covers searching modules, checking options, running modules, and reading stored results.

In plain words
What is it for?
Use it when searching modules, viewing module details and settings, listing or running modules, checking hosts and services, reading vulnerabilities and credentials, and checking Metasploit status.
Why use it?
It gives agents one consistent route for Metasploit work and reduces the chance of using the wrong command or losing track of scan and exploit results.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/suzu-testing/metasploit-cursor-harness/msf-mcp-routing
Clone the repo
git clone --depth 1 https://github.com/Suzu-Testing/metasploit-cursor-harness

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for msf-mcp-routing

README.md
[![agentmods](https://agentmods.dev/badge/rules/suzu-testing/metasploit-cursor-harness/msf-mcp-routing.svg)](https://agentmods.dev/rules/suzu-testing/metasploit-cursor-harness/msf-mcp-routing)
Your own site
<a href="https://agentmods.dev/rules/suzu-testing/metasploit-cursor-harness/msf-mcp-routing"><img src="https://agentmods.dev/badge/rules/suzu-testing/metasploit-cursor-harness/msf-mcp-routing.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,406 This file is loaded in full into every session.
When invoked 1,406 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01406 $0.01406
Opus 5 $0.00703 $0.00703
Sonnet 5 $0.00281 $0.00281
Haiku 4.5 $0.00141 $0.00141

Measured 5d ago against content hash 0ddfb61f3e42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

msf-mcp-routing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/msf-mcp-routing.mdc · 83 lines

How it starts

The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Routing

Always prefer the msf-harness MCP tools over raw msfconsole shell commands.

When to Use MCP

Operation MCP Tool NOT shell
Search modules msf_search_modules msfconsole -x "search ..."
Module details msf_module_info msfconsole -x "info ..."
Module options msf_module_options msfconsole -x "show options"
List by type msf_list_modules msfconsole -x "show exploits"
Running stats msf_running_stats N/A
Async job results msf_module_results N/A
Query hosts msf_host_info msfconsole -x "hosts"
Query services msf_service_info msfconsole -x "services"
Query vulns msf_vulnerability_info msfconsole -x "vulns"
Query notes msf_note_info msfconsole -x "notes"
Query creds msf_credential_info msfconsole -x "creds"
Query loot msf_loot_info msfconsole -x "loot"
DB status msf_db_status msfconsole -x "db_status"
RPC status msf_status msfconsole -x "version"
Run exploit msf_run_exploit msfconsole -x "use ...; exploit"
Run auxiliary msf_run_auxiliary_module msfconsole -x "use auxiliary/...; run"
Run post module msf_run_post_module msfconsole -x "use post/...; run"
Check vuln msf_module_check msfconsole -x "use ...; check"
Session commands msf_send_session_command msfconsole -x "sessions -i ..."
Session info msf_session_info msfconsole -x "sessions -i X"
Session script msf_session_run_script sessions -i X then run <script>
List sessions msf_list_active_sessions msfconsole -x "sessions"
Start handler msf_start_listener msfconsole -x "use multi/handler; ..."
List handlers msf_list_listeners msfconsole -x "jobs"
Job details msf_job_info msfconsole -x "jobs -v"
Stop job msf_stop_job msfconsole -x "jobs -k ..."
Kill session msf_terminate_session msfconsole -x "sessions -k ..."
Wait for session msf_wait_for_session polling in shell
List payloads msf_list_payloads msfconsole -x "show payloads"
Generate payload msf_generate_payload msfvenom -p ...
Compatible payloads msf_compatible_payloads msfconsole -x "show payloads" after use
Lab network info msf_get_lab_network manual YAML reading
Upgrade session msf_session_upgrade sessions -u <id>
List workspaces msf_list_workspaces msfconsole -x "workspace"
Create workspace msf_create_workspace msfconsole -x "workspace -a ..."
Switch workspace msf_set_workspace msfconsole -x "workspace ..."
Delete workspace msf_delete_workspace msfconsole -x "workspace -d ..."
Import scan data msf_db_import msfconsole -x "db_import ..."
Run nmap + import msf_db_nmap msfconsole -x "db_nmap ..."
Clean up jobs msf_cleanup_jobs msfconsole -x "jobs -K"
Console command msf_console_execute msfconsole -x "..."
List consoles msf_console_list N/A
Session sysinfo msf_session_sysinfo sessions -i X then sysinfo
Session getuid msf_session_getuid sessions -i X then getuid
Session processes msf_session_ps sessions -i X then ps
Download file msf_session_download sessions -i X then download
Upload file msf_session_upload sessions -i X then upload
List routes msf_route_list msfconsole -x "route print"
Add route msf_route_add msfconsole -x "route add ..."
Remove route msf_route_delete msfconsole -x "route remove ..."
Autoroute msf_autoroute run post/multi/manage/autoroute
Report host msf_report_host msfconsole -x "hosts -a ..."
Store credential msf_credential_add msfconsole -x "creds -a ..."
Add note msf_db_add_note msfconsole -x "notes -a ..."

Read the full file on GitHub · 83 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 83 lines · 1,406 tokens per session scan A 0ddfb61f3e42

Subscribe to this mod's changes

msf-mcp-routing is a cursor rule published in the GitHub repository Suzu-Testing/metasploit-cursor-harness (3 stars, last pushed 12d ago), licensed MIT. It adds 1,406 tokens to every session, about $0.0070 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.