Red-team-mcp
An MCP server for red teaming that enables AI agents to perform port scanning, vulnerability scanning, SSH operations, and Metasploit exploitation through a unified interface.
README
Red-team-mcp
An MCP (Model Context Protocol) server for AI agents to use during red teaming exercises.
Overview
This server provides resources and tools for AI agents to access during red teaming scenarios. It implements the Model Context Protocol to allow AI agents to retrieve information, access tools, and perform actions needed for security testing and evaluation.
Architecture
graph TD
Agent[AI Agent Client] <--> |MCP Protocol| Server[FastMCP Server]
subgraph "MCP Server Components"
Server --> PortScanner[Port Scanner Module]
Server --> VulnScanner[Vulnerability Scanner Module]
Server --> SSHTools[SSH Tools Module]
Server --> Metasploit[Metasploit Integration]
Server --> DomainDiscovery[Domain Discovery Module]
Server <--> Database[(MongoDB Database)]
end
subgraph "External Tools"
PortScanner --> Masscan[masscan]
VulnScanner --> Nuclei[nuclei]
SSHTools --> SSH[SSH Client]
Metasploit --> MSFRPC[Metasploit RPC]
DomainDiscovery --> Subfinder[subfinder]
end
Database --> Findings[Findings]
Components
1. Port Scanner
- Integrates with masscan for high-speed port scanning
- Allows AI agents to discover open ports and services on target networks
- Configurable scan parameters (IP ranges, port ranges, scan rate)
- Results parsing and formatting for agent consumption
2. Vulnerability Scanner
- Integrates with Nuclei for vulnerability detection
- Supports custom templates and severity filtering
- Stores results in MongoDB for fast searching
3. SSH Tools
- SSH command execution with credential authentication
- SSH brute force capabilities with username/password lists
- Results stored with host and port information
4. Metasploit Integration
- Exploit Database: Pre-populated MongoDB collection with all Metasploit exploits
- Fast Search: Search exploits by platform, CVE, rank, author, or keywords
- Exploit Execution: Execute exploits against targets with payload configuration
- Live Querying: Real-time exploit listing from Metasploit RPC server
Implementation Plan
- Set up basic MCP server structure
- Implement masscan integration with parameter validation
- Create result parsing and storage mechanisms
- Add additional components (forthcoming)
- Implement logging and monitoring
- Build permission and boundary systems
Todos
- [x] Add nuclei scanner
- [x] Add SSH scanner
- [x] Add Metasploit integration
- [x] Implement fully asynchronous FastMCP server
- [ ] Add tests
- [ ] Prompt for step by step hacking of a machine. (See agents/simple_agent.py)
Setup
installing 3rp party tools
The setup is depending on the following tools
- mongodb
- nuclei
Exploit Database Setup
To enable fast exploit searching, populate the Metasploit exploits database:
-
Prerequisites:
- Metasploit Framework installed
- MongoDB running on localhost:27017
- Metasploit RPC server running:
msfrpcd -P msf -a 127.0.0.1 - Python dependencies:
pip install pymetasploit3
-
Populate Database:
python scripts/setup_exploits_db.py -
Test Setup:
python scripts/test_exploits_db.py
This creates a searchable database of all Metasploit exploits with metadata including:
- CVE references
- Platform information
- Exploit rank and author
- Compatible payloads
- Required options
Usage
Exploit Search Examples
# Search Windows SMB exploits
search_exploits_fast(platform='windows', search_term='smb')
# Find EternalBlue exploit
search_exploits_fast(cve='CVE-2017-0144')
# Get high-quality exploits
search_exploits_fast(rank='excellent')
# Search by author
search_exploits_fast(author='hdm')
Development
Details on extending the server with new tools and resources will be added.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。