Sponsored by Deepsite.site

Red-team-mcp

Created By
skjortan236 months ago
Content

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

  1. Set up basic MCP server structure
  2. Implement masscan integration with parameter validation
  3. Create result parsing and storage mechanisms
  4. Add additional components (forthcoming)
  5. Implement logging and monitoring
  6. Build permission and boundary systems

Todos

  • Add nuclei scanner
  • Add SSH scanner
  • Add Metasploit integration
  • 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:

  1. 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
  2. Populate Database:

    python scripts/setup_exploits_db.py
    
  3. 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.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
Tavily Mcp
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors