A purple-team lab for the Model Context Protocol (MCP): build, attack, and defend MCP servers with local + cloud LLMs — with a native desktop GUI.
Connect any LLM — local Ollama or cloud Claude / GPT / Gemini — to MCP servers, break them with 23 real, runnable exploits, then harden them with a reusable guardrails library. All from a polished desktop console or the CLI.
purplemcp bench measures guardrail effectiveness (deterministic: attack vspurplemcp scan <path> --format sarif emits SARIF 2.1.0 for GitHub code scanning /purplemcp report stitches the taxonomy, a static scan of the lab's own code, and.github/workflows/ci.yml runs the test suite + benchmark onCITATION.cff and the full write-up in# 1. Install PurpleMCP (editable, so edits take effect immediately)
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[gui]" # include the desktop GUI; use `pip install -e .` for CLI-only
# 2. Configure keys (only the providers you want; Ollama needs none)
cp .env.example .env # then edit .env
# 3. Pull a TOOL-CAPABLE local model (skip if you only use cloud)
ollama pull qwen2.5 # the default; reliably does structured tool calls
# 4. Launch the desktop app — drive everything from here
purplemcp gui