Skip to main content
Glama

AI-Powered Red Teaming with Claude, C2 & MCP

A project exploring the integration of Claude, Model Context Protocol (MCP), and Command & Control (C2) Mythic to build an AI-powered copilot for Red Team operations.

The project aims to enable Claude to interact with C2 capabilities through MCP, understand the context and results of an ongoing operation, and provide context-aware recommendations, attack paths, and next-step actions based on the information gathered during the engagement.

Integration Diagram

alt text

Related MCP server: PentestMCP

Requirements

  1. uv

  2. python3

  3. Claude Desktop

  4. Mythic C2 (Use docker to run the service)

  5. A Windows victim machine in VMware

Preliminary steps

  1. Install and run the Mythic C2 server. You need to use the official repository and run it in Docker. Repository link: Mythic Repository

  2. Install the agents (Apollo, Apfell, Poseidon) and the profiles (HTTP, WebSocket).

  3. Use some of the payloads to generate a payload to send to the victim machine.

  4. On the victim machine, execute the payload to obtain a session on the Mythic C2 server.

Usage with Claude Desktop

To deploy an MCP server with Claude Desktop, we need to use the Developer Options. You will need to edit the claude_desktop_config.json file to configure the MCP server. The configuration format is as follows:

{
    "mcpServers": {
        "mythic_mcp": {
            "command": "/snap/bin/uv",
            "args": [
                "--directory",
                "/path/to/mythic_mcp/",
                "run",
                "main.py",
                "mythic_admin",
                "mythic_admin_password",
                "localhost",
                "7443"
            ]
        }
    }
}

To find the mythic_admin and mythic_admin_password credentials after deploying the Mythic server, you can use the following commands:

sudo ./mythic-cli config get admin_user
sudo ./mythic-cli config get admin_password

How to Use

Once you have an active session in C2 and have uploaded the configuration file to Claude, you can use any prompt. However, we recommend running a few verification prompts first to ensure that the connection between C2, Claude, and the MCP server is working correctly.

Verify the available sessions

How many sessions are currently available?

Verify the available commands

Which commands are available?

Available Tools

12 tools
ad_reconC

Run AD reconnaissance commands and collate results.

Inputs: agent_id (required).

enum_domain_usersB

Attempt to enumerate domain users. Uses AD cmdlets if available, falls back to net user /domain.

Inputs: agent_id (required).

execute_mimikatzC

Runs mimikatz with the provided arguments, returning the output.

Inputs: agent_id (required), mimikatz_arguments (required).

execute_powershellB

Execute a PowerShell script on the target agent. The script is sent raw and encoded to UTF-16LE for -EncodedCommand.

Inputs: script (required), agent_id (required).

get_all_agentsA

Returns a list of active agents

Inputs: no named parameters.

privilege_escalation_peasB
Run linPEAS or winPEAS on the target agent for privilege escalation discovery.

Args:
    agent_id: Mythic agent ID
    os_type: 'linux' or 'windows'
    peas_base64: Base64 encoded linpeas.sh or winPEAS.exe
    mode: 'quiet' or 'full'

Inputs: os_type (required), agent_id (required), peas_base64 (required), mode.

read_fileA

Reads a file using the ReadFile win32 API call. Returns the contents of that file.

Args:
    agent_id: ID of agent to read file from
    file_path: Path to the file to read on the target server

Inputs: agent_id (required), file_path (required).

run_as_userC

Attempt to authenticate as another user (network calls only) for the current session.

Args:
    username: Username of network account to use
    password: Password of network account to use

Inputs: agent_id (required), password (required), username (required).

run_kerberoastB

Upload and run Rubeus (Kerberoasting).

Inputs: agent_id (required), rubeus_base64 (required), args.

run_sharphoundA
Run SharpHound (BloodHound collector) on a Windows agent.
SharpHound.exe must already exist on the target system.

Args:
    agent_id: ID of the Mythic agent
    collection: SharpHound collection methods (Default: All)
    output_dir: Directory to store SharpHound output ZIP
    stealth: Use stealth collection (recommended)

Inputs: agent_id (required), stealth, collection, output_dir.

run_shell_commandB

Execute a shell script command line against a running agent. This script is executed using the default command line interpreter.

Args:
    agent_id: ID of agent to execute command on
    command_line: A command to be executed

Inputs: agent_id (required), command_line (required).

upload_fileA

Upload a file to the Mythic server, and then upload the file to the remote target

Args:
    agent_id: ID of the agent to execute command on
    file_name: Name to give the file when uploading to Mythic server
    remote_path: Full path to where the file will be uploaded
    content: Base64 encoded contents of the file

Inputs: content (required), agent_id (required), file_name (required), remote_path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools target distinct actions (file read vs. upload, shell vs. PowerShell, mimikatz vs. Rubeus), but ad_recon and enum_domain_users overlap in purpose, as enum_domain_users is a specific subset of AD reconnaissance. This is a minor ambiguity rather than a major one.

    Naming Consistency4/5

    The majority follow a verb_noun pattern (read_file, run_shell_command, execute_powershell, upload_file), but ad_recon and privilege_escalation_peas deviate by using nouns or abbreviations without a clear verb. The inconsistency is noticeable but not chaotic.

    Tool Count5/5

    With 12 tools, the set is well-scoped for a post-exploitation/Mythic C2 server. Each tool serves a clear function in the red-team workflow, and the count fits comfortably within the ideal range without feeling bloated or sparse.

    Completeness4/5

    The set covers core post-exploitation activities: execution, file operations, credential theft, privilege escalation, and AD reconnaissance. Missing features like process listing or lateral movement are notable but not critical for the primary purpose, and agents can often work around these gaps.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables LLMs to perform Active Directory penetration testing using tools like NetExec, Bloodhound, Nmap, Certipy, and John the Ripper. Automates vulnerability discovery, attack path analysis, and documentation generation for security assessments.
      26
      7
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables LLM agents to automate red teaming operations with the AdaptixC2 framework via MCP protocol, supporting post-exploitation tasks and BOF integration.
      -