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 "Install 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-MCPrun 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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return value (path to report file) but lacks details on permissions, error handling, or whether it's read-only or destructive. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded with the main purpose, followed by a clear return statement. It avoids unnecessary details, making it efficient, though it could be slightly more structured by explicitly stating context or prerequisites.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but incomplete. It explains the return value but misses behavioral context like how the report is generated or dependencies on other tools, which could help in a server with siblings like 'run_attack.'
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description appropriately does not discuss parameters, focusing instead on the return value, which aligns well with the schema's completeness.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool 'Get the report of the last run,' which clearly indicates its function as retrieving a report. However, it lacks specificity about what type of report (e.g., attack results, system logs) and does not differentiate from siblings like 'run_attack' or 'list_garak_probes,' making it somewhat vague.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is provided on when to use this tool versus alternatives. The description implies it retrieves a report from a previous run, but it doesn't specify prerequisites (e.g., must have run an attack first) or compare to siblings like 'run_attack' for generating new reports, leaving usage unclear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_garak_probesB
List all available Garak attacks.
Returns:
list: A list of available probes / attacks.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists attacks and returns a list, but lacks details on permissions, rate limits, error handling, or whether the list is static or dynamic. For a tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with the core purpose stated first and return details following. Both sentences earn their place by providing essential information without redundancy. Minor improvements could include structuring the return statement more clearly, but overall it's efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (0 parameters, no output schema), the description is minimally adequate. It covers the basic purpose and return type, but lacks context on usage, behavioral traits, or how it relates to sibling tools. Without annotations, it should provide more guidance to be fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds value by clarifying the return type ('list: A list of available probes / attacks'), which compensates for the lack of an output schema. This justifies a score above the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'List all available Garak attacks.' It specifies the verb ('List') and resource ('Garak attacks'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_models' or 'list_model_types', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_report' or 'run_attack', nor does it specify prerequisites or contexts for usage. The only implied usage is to retrieve attack information, but no explicit guidelines are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| model_type | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool returns a list of strings and hints at a use case (for attack/target models), but fails to mention critical behavioral traits such as whether this is a read-only operation, if there are rate limits, authentication needs, or error conditions. For a tool with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with the core purpose stated first, followed by parameter and return details. Every sentence adds value, but the second sentence could be more integrated or omitted for tighter structure without losing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is somewhat complete but lacks depth. It covers the basic purpose and parameter semantics but omits behavioral transparency aspects like safety or performance, which are important even for simple tools. With no output schema, it does explain the return type, which helps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate, which it does by explaining the single parameter 'model_type' with examples (ollama, openai, huggingface, ggml). This adds meaningful context beyond the schema's basic type definition, though it doesn't detail format constraints or validation rules.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'List all available models for a given model type.' It specifies the verb ('list') and resource ('models'), and distinguishes it from siblings like 'list_model_types' by focusing on models within a type rather than types themselves. However, it doesn't fully differentiate from 'get_report' or 'run_attack', which are unrelated but still siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by stating 'Those models can be used for the attack and target models,' linking it to 'run_attack' and suggesting when this tool might be preparatory. However, it lacks explicit guidance on when to use this versus alternatives like 'list_model_types' or prerequisites for invoking it, leaving some ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_model_typesB
List all available model types.
Returns:
list[str]: A list of available model types.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the return type ('list[str]') and that it lists 'all available' types, which adds some context beyond the basic action. However, it doesn't cover aspects like rate limits, permissions, or error handling, which are important for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose in the first sentence, followed by a clear return specification. Every sentence adds value without redundancy, making it efficient and well-structured for quick comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but has gaps. It explains the return value, but without annotations or output schema, it could benefit from more behavioral context (e.g., is this a read-only operation, any side effects?). It meets the minimum viable standard for this low-complexity tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and the schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately omits parameter information, earning a high baseline score for not adding unnecessary content.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('List') and resource ('all available model types'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_models', which might be similar in scope, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'list_models' or other siblings. It lacks context about prerequisites, timing, or exclusions, leaving the agent to infer usage based on the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| model_name | Yes | ||
| model_type | Yes | ||
| probe_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool runs an attack and returns vulnerabilities, but lacks critical details: whether this is a destructive/mutative operation, authentication requirements, rate limits, or what 'vulnerabilities' entail (e.g., format, severity). The description covers basic behavior but misses key operational traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose followed by Args and Returns sections. Each sentence serves a clear function, with no redundant information. However, the 'Args' and 'Returns' labels are slightly verbose for a short description, but overall it's efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (running an attack with 3 parameters), no annotations, and no output schema, the description is incomplete. It doesn't explain the attack process, potential side effects, error handling, or the structure of the returned vulnerabilities list. For a tool with significant operational implications, this leaves too many unknowns.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It lists the three parameters with brief explanations (e.g., 'model_type (str): The type of model to use'), but these add minimal semantic value beyond the schema's titles. No examples, constraints, or relationships between parameters (e.g., valid model_type values) are provided, leaving significant gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool 'Run[s] an attack with the given model and probe which is a Garak attack', which provides a basic verb+resource (run attack with model/probe). However, it's vague about what 'attack' means in this context (e.g., security testing, adversarial prompting) and doesn't distinguish it from sibling tools like 'get_report' or 'list_garak_probes'. The purpose is understandable but lacks specificity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing to list models/probes first), when not to use it, or how it relates to sibling tools like 'get_report' for results. The description implies usage through parameters but offers no contextual advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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
- AlicenseAqualityDmaintenanceMISP (Malware Information Sharing Platform) MCP server with built-in prompt injection defense via prompt-defense-audit82MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for ai-scanner that enables AI agents to scan codebases for LLM usage, AI frameworks, and exposed secrets.701MIT
- 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.18

Tensorfireofficial
AlicenseNot gradedqualityBmaintenanceMCP 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/EdenYavin/Garak-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server