mythic-mcp
Exposes the Mythic C2 framework as an MCP server so LLMs can operate agents, issue tasks, and query platform data conversationally.
README
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 parsing - Built-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 sync
Running
Positional arguments
uv run main.py <username> <password> [host] [port]
uv run main.py mythic_admin mythic_admin_password localhost 7443
Environment variables
export MYTHIC_USERNAME=mythic_admin
export MYTHIC_PASSWORD=mythic_admin_password
export MYTHIC_HOST=localhost
export MYTHIC_PORT=7443
uv run main.py
Without TLS
uv run main.py mythic_admin password localhost 7443 --no-ssl
If 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 | ~/.config/Claude/claude_desktop_config.json |
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
Get the uv path first:
which uv
Add 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 |
|---|---|
get_all_agents() |
List all active callbacks with full detail (OS, arch, PID, IP, sleep, process, payload type, etc.) |
get_agent_details(agent_id) |
Full detail for a single agent by display ID |
kill_agent(agent_id) |
Mark an agent inactive in Mythic |
set_sleep(agent_id, interval, jitter) |
Change sleep interval (seconds) and jitter (%) |
Task execution
| Tool | Description |
|---|---|
run_shell_command(agent_id, command_line) |
Run a shell command via the agent's default interpreter |
read_file(agent_id, file_path) |
Read a file from the target (uses cat) |
download_file(agent_id, file_path) |
Download a file and return it as base64 |
upload_file(agent_id, file_name, remote_path, content_b64) |
Upload a base64-encoded file to the target |
run_as_user(agent_id, username, password) |
make_token — authenticate for network calls as another user |
execute_mimikatz(agent_id, mimikatz_arguments) |
Run mimikatz (e.g. sekurlsa::logonpasswords) |
execute_command(agent_id, command_name, parameters) |
Generic dispatcher — any Mythic command by name |
Platform data
| Tool | Description |
|---|---|
get_credentials() |
All credentials in the Mythic credential store |
get_artifacts(limit) |
Artifact log (files, registry keys, processes created) |
get_event_log(limit) |
Operation event log |
browse_files(agent_id, path) |
File browser entries for a directory on a target |
list_payloads() |
All non-deleted payloads with build status and C2 profile |
list_c2_profiles() |
All C2 profiles with running status |
Prompts
| Prompt | Description |
|---|---|
start_pentest(threat_actor, objective) |
Prime Claude to emulate a specific threat actor toward an objective |
start_recon() |
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 endpoint
All 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_USERNAME |
— | Mythic operator username (required) |
MYTHIC_PASSWORD |
— | Mythic operator password (required) |
MYTHIC_HOST |
localhost |
Mythic server hostname or IP |
MYTHIC_PORT |
7443 |
Mythic server port |
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。