Home / MCP tooling

garak-mcp-probes

Run garak against your own MCP servers, with detectors for denied tool calls, leaked canaries and runaway step counts.

Python · MIT · latest v0.2.0

What it is

garak-mcp-probes puts garak's existing probes through an agent that uses your own MCP servers, records every tool call the agent makes, and scores that trace with detectors for deny-listed tools, leaked canary strings, tools outside an allow-list, runaway loops and failed calls.

For teams that run MCP servers behind their own agents and want to know whether garak's prompt catalogue can push that agent into misusing those tools. Use it only on servers and agents you own or are authorised to test. This repository contains no probes, no injection payloads and no jailbreak text: every prompt comes from the garak you have installed.

python3 -m venv .venv && . .venv/bin/activate
pip install "garak-mcp-probes @ git+https://github.com/basitalisandhu/garak-mcp-probes"
garak-mcp run --dry-run --probes test.Test --report-dir garak-mcp-report

The dry run needs no network and no keys (a fake model and a fake MCP server). The install is large, because garak brings PyTorch and Hugging Face libraries. The summary table from a real run (garak 0.17.1):

| Probe | Attempts | Tool calls | ArgumentContains | StepBudgetExceeded | ToolCalled | ToolError | UnexpectedTool |
|---|---|---|---|---|---|---|---|
| `test.Test` | 8 | 8 | 0 / 8 | 0 / 8 | 0 / 8 | 0 / 8 | 0 / 8 |
| **Total** | 8 | 8 | 0 / 8 | 0 / 8 | 0 / 8 | 0 / 8 | 0 / 8 |

Install

garak-mcp doctor --dry-run
garak-mcp run --dry-run --probes test.Test --report-dir garak-mcp-report

From the README; see the full README for every option.

Releases

More in MCP tooling

All tools

Topics: agent-security, ai-agents, ai-security, cli, detectors, docker, garak, hacktoberfest, llm-security, mcp, model-context-protocol, prompt-injection, python, red-team, sbom, security-testing, tool-use