Comparison

MCP Guard vs Llama Guard

Llama Guard is Meta's LLM-based safety classifier for conversations: it labels prompts and responses as safe or unsafe against a taxonomy of content hazards. MCP Guard judges whether an agent's tool call should run. One moderates what is said; the other checks what is done.

2 min readLast updated

Checks run on our GPUs in Switzerland. Request payloads are not stored.Security

In 30 seconds

  • Llama Guard classifies prompts and responses against content-hazard categories (violence, self-harm and so on).
  • MCP Guard classifies proposed tool calls: safe, destructive, exfiltrating, injected, blast radius, grounded arguments.
  • Llama Guard is a larger generative model; MCP Guard is a 184M encoder answering nine questions in one pass.
  • A content-safe action can still delete production data. Use each for its own job.

Code and dense tables are folded away. Open any of them on demand.

At a glance: MCP Guard vs Llama Guard

MCP Guard compared with Llama Guard, feature by feature
 MCP GuardLlama Guard
What it classifiesAgent tool calls with contextPrompts and model responses
Policy basisNine fixed questions about the actionA hazard taxonomy (MLCommons-aligned in Llama Guard 3)
Typical catchdb.drop_table on production, emailing secrets outRequests for or outputs of harmful content
Model type184M encoder classifierGenerative LLM (8B-class; a 1B variant exists for Llama Guard 3)
OutputVerdict plus calibrated scoressafe / unsafe plus violated categories
Custom categoriesVia constraints and context fieldsVia the prompt template
DeploymentHosted API and MCP serverOpen weights, self-hosted or via providers

The verdict

Use Llama Guard to moderate conversational content and MCP Guard to decide whether agent actions should run; they cover different risks.

Content safety vs action safety

Llama Guard, introduced by Meta in "Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversations" (Inan et al., 2023), is a language model fine-tuned to classify a user prompt or a model response as safe or unsafe and to name the hazard categories involved. Llama Guard 3 aligns its categories with the MLCommons hazard taxonomy, and its model card lists categories such as violent crimes, privacy and, for tool-using setups, code interpreter abuse.

That is content moderation: is this text harmful to produce or to answer?

MCP Guard addresses action safety: given what the user asked, should this specific tool call run now? Most dangerous agent actions are content-neutral. terraform destroy in the wrong workspace, a DELETE without a WHERE, or forwarding a customer list to an address that appeared in a web page contain nothing a content taxonomy would flag.

What MCP Guard answers

For each proposed action, MCP Guard returns a verdict and nine scores in one pass: whether it is safe, the violation type (policy, scope, injection, goal drift, corrigibility), severity, whether it is destructive, whether it exfiltrates data, whether it was injected, the approval policy, the blast radius, and whether its arguments are grounded in the user's request.

It uses the same inputs a human reviewer would want: the action, the user's intent, what triggered it, constraints ("staging only") and recent conversation.

Size and serving

Llama Guard is a generative model: Llama Guard 3 comes in 8B and 1B sizes, and it produces its label as text. MCP Guard is a 184M-parameter DeBERTa-v3-base encoder that produces all nine scores in a single forward pass. We measured about 15 ms per full check on an RTX 4090 (p95 about 23 ms, batch 1), plus the network round trip for the hosted API. We have not benchmarked Llama Guard's latency and do not quote a figure for it; it depends heavily on hardware and serving setup.

Llama Guard is open weights, so you can self-host it. MCP Guard is offered as a hosted API and MCP server.

When to use which

  • A chat assistant without tools, or a public-facing bot where the main risk is harmful text: Llama Guard (or a similar content-safety model) is the right choice. An action guard has nothing to check.
  • An agent that writes, deletes, spends or sends: check each consequential tool call with an action guard. A content classifier will pass most harmful actions because nothing in them is offensive.
  • Both: many agents are also chat products. Moderate the conversation with a content model and gate the actions with MCP Guard. They do not overlap much, which is exactly why both are useful.

Neither guarantees safety. Keep least-privilege credentials and deterministic rules underneath.

Frequently asked questions

Can Llama Guard check tool calls?
You can prompt it with a tool call, and Llama Guard 3 includes a code interpreter abuse category. But its categories describe content hazards, not questions like blast radius, grounded arguments or whether an action was injected, which are what most agent incidents turn on.
Does MCP Guard moderate harmful content?
No. It judges actions. Use a content-safety model for prompts and responses.

Sources

Last updated . MCP Guard reduces the risk of harmful agent actions; it does not guarantee safety. Keep deterministic controls in place alongside it. Third-party names are used only to describe their products; we are not affiliated with them.