PurpleMCP
Python

Build, attack and defend an MCP server.

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.

PythonPython4 stars

About

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.

What it does

Getting started

# 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
Scope. | 08 | Excessive permissions | Over-broad scopes turn a small bug into a big breach |

More from this catalogue