Garak-MCP
This server provides a Model Context Protocol (MCP) interface for running Garak LLM vulnerability scans against various AI models.
Key Capabilities:
Discover Available Models - List supported model types (Ollama, OpenAI, HuggingFace, GGML) and browse specific models within each platform
Browse Security Probes - View all available Garak attack probes and vulnerability tests
Run Vulnerability Scans - Execute security attacks against specified models using chosen probes to identify vulnerabilities
Retrieve Scan Reports - Access the file path to the latest scan results for review
Automated Testing - Integrate into development workflows through MCP-compatible tools like Claude Desktop and Cursor, with support for CLI operations and GitHub Actions for scheduled scanning
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Garak-MCP run an attack on llama2 using the encoding probe"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Server For Garak LLM Vulnerability Scanner
A lightweight MCP (Model Context Protocol) server for Garak.
Example:
https://github.com/user-attachments/assets/f6095d26-2b79-4ef7-a889-fd6be27bbbda
Tools Provided
Overview
Name | Description |
list_model_types | List all available model types (ollama, openai, huggingface, ggml) |
list_models | List all available models for a given model type |
list_garak_probes | List all available Garak attacks/probes |
get_report | Get the report of the last run |
run_attack | Run an attack with a given model and probe |
Detailed Description
list_model_types
List all available model types that can be used for attacks
Returns a list of supported model types (ollama, openai, huggingface, ggml)
list_models
List all available models for a given model type
Input parameters:
model_type(string, required): The type of model to list (ollama, openai, huggingface, ggml)
Returns a list of available models for the specified type
list_garak_probes
List all available Garak attacks/probes
Returns a list of available probes/attacks that can be run
get_report
Get the report of the last run
Returns the path to the report file
run_attack
Run an attack with the given model and probe
Input parameters:
model_type(string, required): The type of model to usemodel_name(string, required): The name of the model to useprobe_name(string, required): The name of the attack/probe to use
Returns a list of vulnerabilities found
Related MCP server: ai-scanner-mcp
Prerequisites
Python 3.11 or higher: This project requires Python 3.11 or newer.
# Check your Python version python --versionInstall uv: A fast Python package installer and resolver.
pip install uvOr use Homebrew:
brew install uvOptional: Ollama: If you want to run attacks on ollama models be sure that the ollama server is running.
ollama serveInstallation
Clone this repository:
git clone https://github.com/BIGdeadLock/Garak-MCP.gitConfigure your MCP Host (Claude Desktop ,Cursor, etc):
{
"mcpServers": {
"garak-mcp": {
"command": "uv",
"args": ["--directory", "path-to/Garak-MCP", "run", "garak-server"],
"env": {}
}
}
}
Tested on:
Cursor
Claude Desktop
Running Vulnerability Scans
You can run Garak vulnerability scans directly using the included CLI tool.
Prerequisites for Scanning
Ollama must be running:
ollama servePull a model to scan:
ollama pull llama2
Using the CLI Scanner
After installation, you can use the garak-scan command:
# List available Ollama models
uv run garak-scan --list-models
# Scan a specific model with all probes
uv run garak-scan --model llama2
# Scan with specific probes
uv run garak-scan --model llama2 --probes encoding
# Scan with custom output directory
uv run garak-scan --model llama2 --output-dir ./my_scans
# Run multiple parallel attempts
uv run garak-scan --model llama2 --parallel-attempts 4Scan Results
Scan results are saved in the output/ directory (or your specified directory) as JSONL files. Each scan creates a timestamped report file:
output/scan_llama2_20250125_143022.report.jsonlGitHub Actions Integration
This repository includes a GitHub Actions workflow that automatically runs vulnerability scans:
Triggers: Push to main/master, pull requests, weekly schedule (Mondays at 2am UTC)
Manual runs: Go to Actions → Garak LLM Vulnerability Scan → Run workflow
Custom options: Specify model and probes when running manually
Results: Scan results are uploaded as workflow artifacts
To enable automated scanning:
Ensure the workflow file exists at
.github/workflows/garak-scan.ymlPush to your repository
Check the Actions tab to view scan results
Future Steps
Add support for Smithery AI: Docker and config
Improve Reporting
Test and validate OpenAI models (GPT-3.5, GPT-4)
Test and validate HuggingFace models
Test and validate local GGML models
Available Tools
5 toolsget_reportC
Get the report of the last run.
Returns:
str: The path to the report file.
Inputs: no named parameters.
list_garak_probesB
List all available Garak attacks.
Returns:
list: A list of available probes / attacks.
Inputs: no named parameters.
list_modelsB
List all available models for a given model type.
Those models can be used for the attack and target models.
Args:
model_type (str): The type of model to list (ollama, openai, huggingface, ggml)
Returns:
list[str]: A list of available models.
Inputs: model_type (required).
list_model_typesB
List all available model types.
Returns:
list[str]: A list of available model types.
Inputs: no named parameters.
run_attackC
Run an attack with the given model and probe which is a Garak attack.
Args:
model_type (str): The type of model to use.
model_name (str): The name of the model to use.
probe_name (str): The name of the attack / probe to use.
Returns:
list: A list of vulnerabilities.
Inputs: model_name (required), model_type (required), probe_name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: get_report retrieves results, list_garak_probes lists attacks, list_models lists models by type, list_model_types lists types, and run_attack executes an attack. There is no overlap in functionality, making tool selection unambiguous.
All tool names follow a consistent verb_noun pattern (e.g., get_report, list_garak_probes, run_attack). The naming is uniform across all tools, with no deviations in style or convention.
With 5 tools, the set is well-scoped for a Garak MCP server focused on AI security testing. Each tool serves a specific role in the workflow, from setup (listing models/probes) to execution (run_attack) and review (get_report), without unnecessary redundancy.
The tool surface covers the core AI security testing workflow: listing resources (models, probes, types), running attacks, and retrieving reports. A minor gap exists in lacking tools for configuring attack parameters or managing attack history, but agents can still perform essential tasks effectively.
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
MEOK MCP Hardening MCP — automated security red-team for any MCP server. Maps OWASP LLM Top 10
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseAqualityCmaintenanceMISP (Malware Information Sharing Platform) MCP server with built-in prompt injection defense via prompt-defense-audit82MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for ai-scanner that enables AI agents to scan codebases for LLM usage, AI frameworks, and exposed secrets.66 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA Dockerized Kali Linux MCP server that enables LLMs to perform network security scans, penetration testing, and reconnaissance using tools like Nmap, Nikto, Hydra, and SQLMap.7 npm-

Tensorfireofficial
AlicenseNot gradedqualityDmaintenanceMCP server for security-testing AI models, exposing garak vulnerability scanning and URL/MCP-endpoint scanning as callable tools. It lets agents probe LLM endpoints for jailbreaks, prompt injection, and data leakage, and classify URLs or screen remote MCP endpoints for prompt-injection payloads.1GPL 3.0