This is an **MCP (Model Context Protocol) server** paired with a beaconing implant. The server queues commands from your AI agent, and the implant on the target network periodically checks in to pick up and execute them.
> **Optional:** Set an API key for authentication. On the server, export `MCP_API_KEY="your-key"` before starting. When installing the implant service, enter the same key when prompted.
This agentic C2 framework utilizes a local model, an MCP server, and an implant that beacons to the MCP. You should set system instructions for your agent so it knows what to do when you ask it to run commands. Here are the system instructions I use:
You have access to an MCP server (mcp-name) that relays commands to implants on target networks. The implant executes actual pentest tools and returns results via a beacon cycle (~30 second intervals).
The MCP does not have any tools installed; rather it defines tools that should be installed on the implant and looks for user input from the model to pass the commands onto the implant.
It is designed for the agent and MCP to be on the same network. **Port 8000** is for the agent to connect to the MCP and **port 8001** for the implant to beacon home, but can be configured however you like.
MCP and setup script are tested and working on Debian 13. The implant only needs python3 and the appropriate tools installed. The install script for the implant is to set the script up as a systemd service for autorun on startup.