ai-redteam-mcp (MCP server for LLM guardrail testing)


What It Does

Evaluates LLM guardrails. Given a target LLM endpoint, runs a corpus of prompt-injection payloads, applies mutation strategies (encoding, role-play, delimiter abuse, suffix-prefix wrapping), measures bypass rate.

Positioned at the OWASP LLM Top 10 category LLM01 (Prompt Injection) + LLM07 (Insecure Output Handling).

Tools

  • list_payload_categories โ€” enumerated attack categories
  • fetch_payload_corpus โ€” paginated corpus of base payloads
  • mutate_payload โ€” apply one or more mutation strategies to a payload
  • probe_target โ€” send a payload to a target LLM endpoint
  • score_response โ€” classifier output: refusal / bypass / partial-bypass
  • bypass_rate โ€” aggregate bypass rate for a payload set against a target
  • log_run โ€” persist run metadata for diff over time
  • health โ€” target endpoint reachability
  • report โ€” summary across categories + mutations

Design Decisions

  • Local corpus, not scraped-on-call โ€” reproducible, auditable, portable.
  • Mutation strategies as pure functions โ€” each is independently testable.
  • Scoring by regex + optional judge-LLM โ€” regex catches obvious refusals; a judge LLM handles ambiguous ones.
  • Dual use acknowledged โ€” the README is explicit: use only on LLM endpoints you own or have authorisation to test.

Stack

Python 3.11+ ยท FastMCP ยท httpx ยท Pydantic schemas ยท local JSON payload corpus.

โ† back