Kali Metasploit MCP Server
Integrates with Kali Linux security tools through Metasploit Framework, enabling penetration testing operations like exploit searches, network scanning, and vulnerability assessment management.
Provides tools for interacting with Metasploit Framework, including searching exploits and auxiliary modules, retrieving exploit details and payloads, managing database workspaces, viewing hosts and services, and running nmap scans with automatic result import.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kali Metasploit MCP Server search for exploits related to windows smb"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kali Metasploit MCP Server
MCP (Model Context Protocol) server for interacting with Metasploit Framework on Kali Linux and other security-focused distributions.
⚠️ Security Warning
This tool is for authorized security testing only. Use responsibly and legally.
Only use on systems you own or have explicit written permission to test
Unauthorized access to computer systems is illegal
The authors are not responsible for misuse of this software
Related MCP server: MSFConsole MCP Server
Features
This MCP server provides the following tools:
Exploit Search: Search for exploits in the Metasploit database
Auxiliary Module Search: Search for auxiliary modules (scanners, fuzzers, etc.)
Exploit Information: Get detailed information about specific exploits
Payload Listing: List available payloads for exploits
Database Management:
Check database status
List workspaces
View hosts and services
Network Scanning: Run nmap scans and automatically import results into Metasploit database
Prerequisites
Kali Linux (or any Linux distribution with Metasploit Framework)
Node.js 18+ (or Node.js 20+ recommended)
Metasploit Framework installed and configured
nmap (optional, for network scanning features)
Installing Metasploit Framework
On Kali Linux:
sudo apt-get update
sudo apt-get install metasploit-frameworkOn other Debian-based systems:
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb | sudo bashInstalling nmap (for scanning features)
sudo apt-get install nmapInstallation
Clone or download this repository:
git clone https://github.com/andreransom58-coder/kali-metasploit-mcp.git
cd kali-metasploit-mcpInstall dependencies:
npm installBuild the project:
npm run buildUsage
Standalone Testing
Run the server directly:
npm startOr in development mode:
npm run devIntegration with MCP Clients
Claude Desktop
Add to your Claude Desktop configuration file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"kali-metasploit": {
"command": "node",
"args": ["/absolute/path/to/kali-metasploit-mcp/dist/index.js"]
}
}
}Cursor IDE
Add to your Cursor settings (.cursor-settings or workspace settings):
{
"mcp": {
"servers": {
"kali-metasploit": {
"command": "node",
"args": ["/absolute/path/to/kali-metasploit-mcp/dist/index.js"]
}
}
}
}Available Tools
search_exploits
Search for exploits in Metasploit database.
Parameters:
query(required): Search query (e.g., "windows smb", "apache", "CVE-2021-44228")platform(optional): Filter by platform (windows, linux, etc.)
Example:
search_exploits({
query: "windows smb",
platform: "windows"
})search_auxiliary
Search for auxiliary modules.
Parameters:
query(required): Search querytype(optional): Filter by type (scanner, admin, dos, fuzzers, gather)
get_exploit_info
Get detailed information about a specific exploit.
Parameters:
exploitPath(required): Full exploit path (e.g., "exploit/windows/smb/ms17_010_eternalblue")
get_payloads
List available payloads for an exploit.
Parameters:
exploitPath(required): Full exploit path
db_status
Check Metasploit database status.
db_workspaces
List all Metasploit workspaces.
db_hosts
List all hosts in the current workspace.
Parameters:
workspace(optional): Workspace name to query
db_services
List all services in the current workspace.
Parameters:
host(optional): Filter by host IP address
nmap_scan
Run an nmap scan and import results into Metasploit database.
Parameters:
target(required): Target IP address or CIDR rangeports(optional): Port range or specific ports (e.g., "80,443" or "1-1000")scanType(optional): Type of scan (quick, stealth, full, udp)
Example:
nmap_scan({
target: "192.168.1.0/24",
ports: "80,443,8080",
scanType: "stealth"
})Development
Build
npm run buildWatch Mode
npm run watchDevelopment Mode
npm run devTroubleshooting
Metasploit not found
If you get an error that msfconsole is not found:
Ensure Metasploit Framework is installed
Check that
msfconsoleis in your PATHTry running
which msfconsole(orwhere msfconsoleon Windows) to verify
Database not initialized
If database operations fail:
Initialize the database:
msfdb initStart the database:
msfdb startVerify:
msfconsole -q -x "db_status; exit"
Permission errors
Some operations may require root privileges:
Network scanning may require elevated privileges
Ensure proper permissions for database access
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This software is provided for educational and authorized testing purposes only. The authors and contributors are not responsible for any misuse or damage caused by this software. Always ensure you have proper authorization before testing any systems.
Acknowledgments
Metasploit Framework by Rapid7
Model Context Protocol by Anthropic
Kali Linux community
Available Tools
9 toolsdb_hostsB
List all hosts in the current workspace
Inputs: workspace.
db_servicesB
List all services in the current workspace
Inputs: host.
db_statusB
Check Metasploit database status
Inputs: no named parameters.
db_workspacesB
List all Metasploit workspaces
Inputs: no named parameters.
get_exploit_infoC
Get detailed information about a specific exploit
Inputs: exploitPath (required).
get_payloadsC
List available payloads for a specific exploit
Inputs: exploitPath (required).
nmap_scanC
Run an nmap scan and import results into Metasploit database
Inputs: target (required), ports, scanType.
search_auxiliaryC
Search for auxiliary modules in Metasploit
Inputs: query (required), type.
search_exploitsC
Search for exploits in Metasploit database
Inputs: query (required), platform.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose targeting specific Metasploit functions: database queries (db_hosts, db_services, db_status, db_workspaces), module information retrieval (get_exploit_info, get_payloads), scanning (nmap_scan), and searching (search_auxiliary, search_exploits). No overlap exists that would cause confusion.
The naming shows mixed conventions: db_* tools follow a consistent pattern, but others use different styles like get_*, nmap_*, and search_*. While readable, the lack of a unified pattern across all tools reduces consistency.
With 9 tools, the count is well-scoped for a Metasploit server, covering core database management, scanning, and module exploration. Each tool earns its place without feeling excessive or insufficient.
The toolset provides strong coverage for Metasploit's key workflows: database status/query, scanning, and module search/info. Minor gaps exist, such as lacking tools for executing exploits or managing sessions, but agents can still perform essential reconnaissance and planning tasks.
Maintenance
Related MCP Connectors
Offline methodology engine for authorized penetration testing, CTF, and security research.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
MEOK MCP Hardening MCP — automated security red-team for any MCP server. Maps OWASP LLM Top 10
AI pentesting: run scans, triage vulnerabilities, review PRs, manage schedules and assets.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables secure integration with Metasploit Framework for AI assistants, providing comprehensive access to penetration testing tools, module management, payload generation, and database operations. Designed for authorized security testing and defensive analysis with 28 specialized tools covering complete MSF functionality.8MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with Metasploit Framework through 28 comprehensive tools for penetration testing and security analysis. Provides secure, structured access to MSF modules, database operations, session management, and payload generation capabilities.2-
- AlicenseNot gradedqualityDmaintenanceBridges large language models with the Metasploit Framework to enable natural language control over penetration testing workflows. It provides tools for searching modules, executing exploits, generating payloads, and managing active sessions.1Apache 2.0
- AlicenseBqualityDmaintenanceProvides AI assistants with secure access to Metasploit Framework functionality through a standardized interface, enabling commands, exploit search, module info, and scanning.72MIT