mythic-mcp
mythic-mcp
Exposes the Mythic C2 framework as an MCP server so LLMs (Claude, etc.) can operate agents, issue tasks, and query platform data conversationally.
Features
Agent management — list active callbacks with full detail, inspect individual agents, kill agents, change sleep timers
Task execution — shell commands, file read/download/upload, mimikatz, make_token, and a generic dispatcher for any Mythic command
Platform data — credentials store, artifact log, event log, file browser, payload list, C2 profile status
Structured responses — every tool returns
{"status":"ok","data":...}or{"status":"error","message":...}for reliable LLM parsingBuilt-in prompts —
start_pentestandstart_reconprompt templates
Requirements
Python 3.10+
uv package manager
A running Mythic server (v3.x+)
Installation
git clone <this-repo>
cd mythic-mcp
uv syncRunning
Positional arguments
uv run main.py <username> <password> [host] [port]uv run main.py mythic_admin mythic_admin_password localhost 7443Environment variables
export MYTHIC_USERNAME=mythic_admin
export MYTHIC_PASSWORD=mythic_admin_password
export MYTHIC_HOST=localhost
export MYTHIC_PORT=7443
uv run main.pyWithout TLS
uv run main.py mythic_admin password localhost 7443 --no-sslIf the server starts silently with no output, it is working — it waits on stdio for MCP messages.
Connecting to Claude Desktop
Find the config file:
OS | Path |
Linux |
|
macOS |
|
Get the uv path first:
which uvAdd an entry under mcpServers:
{
"mcpServers": {
"mythic_mcp": {
"command": "/home/user/.local/bin/uv",
"args": [
"--directory",
"/path/to/mythic-mcp",
"run",
"main.py"
],
"env": {
"MYTHIC_USERNAME": "mythic_admin",
"MYTHIC_PASSWORD": "mythic_admin_password",
"MYTHIC_HOST": "localhost",
"MYTHIC_PORT": "7443"
}
}
}
}Fully quit and relaunch Claude Desktop. The tools icon in the chat UI will list all registered tools once the server connects.
Tools
Agent / Callback management
Tool | Description |
| List all active callbacks with full detail (OS, arch, PID, IP, sleep, process, payload type, etc.) |
| Full detail for a single agent by display ID |
| Mark an agent inactive in Mythic |
| Change sleep interval (seconds) and jitter (%) |
Task execution
Tool | Description |
| Run a shell command via the agent's default interpreter |
| Read a file from the target (uses |
| Download a file and return it as base64 |
| Upload a base64-encoded file to the target |
|
|
| Run mimikatz (e.g. |
| Generic dispatcher — any Mythic command by name |
Platform data
Tool | Description |
| All credentials in the Mythic credential store |
| Artifact log (files, registry keys, processes created) |
| Operation event log |
| File browser entries for a directory on a target |
| All non-deleted payloads with build status and C2 profile |
| All C2 profiles with running status |
Prompts
Prompt | Description |
| Prime Claude to emulate a specific threat actor toward an objective |
| Prime Claude to perform initial recon across all active agents |
Example usage in Claude
Use the start_recon prompt.List all active agents, then run whoami on agent 1.Download /etc/passwd from agent 2 and show me its contents.Run mimikatz sekurlsa::logonpasswords on agent 3.Use execute_command to run 'ps' on agent 1 with parameters {"host": "."}.Architecture
Claude Desktop
│ MCP stdio
▼
main.py (FastMCP tools + prompts)
│
▼
lib/mythic_api.py (MythicAPI class)
├─ mythic Python library → Mythic GraphQL/REST API
└─ httpx (raw GraphQL) → Mythic GraphQL endpointAll task calls use asyncio.wait_for with a 60-second timeout. GraphQL requests skip TLS verification (verify=False) to handle Mythic's self-signed certificate.
Environment variables reference
Variable | Default | Description |
| — | Mythic operator username (required) |
| — | Mythic operator password (required) |
|
| Mythic server hostname or IP |
|
| Mythic server port |