MythicMCP is an MCP server for the Mythic C2 framework. It gives MCP clients a practical tool surface for working with Mythic operations, callbacks, tasks, files, payloads, C2 profiles, and agent-specific commands.
- Core Mythic tools for:
- connection and operation context
- callbacks and task output
- uploaded/downloaded files
- payload creation and download
- C2 profile discovery and saved instances
- Generic callback command workflow for any loaded Mythic command:
core_list_callback_commandscore_get_callback_commandcore_execute_callback_command
- Bundled typed plugin toolsets for:
- Apollo
- Poseidon
- Arachne
- YAML-driven plugin system for adding more agents without writing Python handlers
- Python
3.10+ uv- Access to a Mythic server
- Mythic API token or username/password
Install from GitHub:
uv tool install git+https://github.com/blaisebits/mythicmcpUpgrade:
uv tool install --upgrade git+https://github.com/blaisebits/mythicmcpVerify:
mythicmcp --helpSet Mythic connection settings in your MCP client config or shell environment.
API token:
export MYTHIC_SERVER_URL="https://mythic.local:7443"
export MYTHIC_API_TOKEN="your-api-token"Username/password:
export MYTHIC_SERVER_URL="https://mythic.local:7443"
export MYTHIC_USERNAME="mythic_admin"
export MYTHIC_PASSWORD="your-password"Optional:
export MYTHIC_TIMEOUT=60
export MYTHIC_AGENTS=apollo,poseidon
export MYTHIC_HOTLOAD=1Environment reference:
| Variable | Required | Description |
|---|---|---|
MYTHIC_SERVER_URL |
Yes | Mythic server URL |
MYTHIC_API_TOKEN |
Conditional | API token auth |
MYTHIC_USERNAME |
Conditional | Username auth |
MYTHIC_PASSWORD |
Conditional | Password auth |
MYTHIC_TIMEOUT |
No | Query timeout in seconds |
MYTHIC_AGENTS |
No | Preload agent toolsets at startup |
MYTHIC_HOTLOAD |
No | Enable dynamic load/unload tools |
MYTHIC_DEV |
No | Enable development-only tools |
Add to the Claude Desktop MCP config:
{
"mcpServers": {
"mythic": {
"command": "mythicmcp",
"env": {
"MYTHIC_SERVER_URL": "https://mythic.local:7443",
"MYTHIC_API_TOKEN": "your-api-token"
}
}
}
}{
"mythic": {
"command": "mythicmcp",
"env": {
"MYTHIC_SERVER_URL": "https://mythic.local:7443",
"MYTHIC_API_TOKEN": "your-api-token"
}
}
}This repo includes .mcp.json.example for local testing.
High-value core tools:
- Connection and ops:
core_check_connectioncore_list_operationscore_set_operationcore_get_operation
- Callbacks and tasks:
core_list_callbackscore_get_callbackcore_list_callback_taskscore_get_task_outputcore_get_task_callback
- Generic command execution:
core_list_callback_commandscore_get_callback_commandcore_execute_callback_command
- Files and payloads:
core_upload_filecore_download_filecore_list_uploaded_filescore_list_payloadscore_create_payloadcore_download_payload
- C2 profiles:
core_list_c2_profilescore_get_c2_profile_parameterscore_create_c2_instancecore_list_c2_instances
Bundled agent-specific tools are also exposed for Apollo, Poseidon, and Arachne.
Plugin loading tools:
list_available_agentsshows discovered builtin and external agent plugins.load_agent_toolsdynamically exposes an agent's typed plugin tools whenMYTHIC_HOTLOADis enabled.unload_agent_toolsremoves an agent's typed plugin tools from the current MCP server.MYTHIC_AGENTS=apollo,poseidoncan preload selected agent toolsets at startup; useMYTHIC_AGENTS=allto preload every discovered agent.
Future dev note: dynamic plugin loading is a compatibility surface and may be deprecated in a future major release in favor of generic callback commands plus startup-configured toolsets.
- Use
callback_idas the canonical callback identifier for follow-on work. display_idis returned for UI correlation only.- For generic callback commands, prefer
argument_mode,execution_usage, andexample_argumentsoverusage. - In a fresh session, start with
core_check_connection, thencore_set_operationif needed.
Install dev deps:
uv sync --all-extrasRun unit tests:
uv run pytest tests/unit -qBuild packages:
uv buildThe repo includes a Docker harness for testing MythicMCP changes in a fresh Codex session.
Build:
powershell -ExecutionPolicy Bypass -File scripts\docker\build-codex-image.ps1Interactive session:
powershell -ExecutionPolicy Bypass -File scripts\docker\run-codex-manual.ps1One-shot prompt:
powershell -ExecutionPolicy Bypass -File scripts\docker\run-codex-manual.ps1 --prompt "Call core_check_connection and summarize the result."Integration tests in Docker:
powershell -ExecutionPolicy Bypass -File scripts\docker\run-integration-tests.ps1 --pipelineMissing server URL:
MYTHIC_SERVER_URL is required
Missing auth:
Either MYTHIC_API_TOKEN or both MYTHIC_USERNAME and MYTHIC_PASSWORD are required
MCP startup issues:
- verify
mythicmcp --helpworks - verify env vars are set in the MCP client config, not only your shell
- use
core_check_connectionfirst to confirm auth and current operation
BSD 3-Clause. See LICENSE.