About threat-rules
threat-rules is a GuardBee MCP bridge for evaluating runtime agent and MCP events with Agent Threat Rules (ATR) and GuardBee rules. It serves teams assessing threats such as prompt injection, tool poisoning, and context exfiltration.
Key features
- 01Evaluate text, files, and structured events
- 02Load ATR and GuardBee detection rules
- 03List rules and inspect category statistics
- 04Map findings to OWASP LLM Top 10 and MITRE ATLAS
Use cases
- 01Check prompts for injection indicators
- 02Score an ATR AgentEvent during runtime
- 03Scan local files for threat patterns
MCP support
Exposes threat evaluation, rule discovery, statistics, bridge explanations, and framework mapping to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
7Saved tool list · updated 1w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| lane | enum | No | Detection lane (default: hunt)enforce | alert | hunt |
| type | enum | No | ATR event type (default: llm_input)llm_input | llm_output | tool_call | tool_response | agent_behavior | multi_agent_message | mcp_exchange |
| format | enum | No | text | json | sarif |
| content | string | Yes | Text to evaluate |
| scanContext | enum | No | mcp | skill |
Details
From the project README@guardbee/mcp-threat-rules
🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch
GuardBee MCP bridge to Agent Threat Rules (ATR) — the open, Sigma-like detection standard for AI agent threats (prompt injection, tool poisoning, context exfiltration, MCP attacks).
ATR evaluates runtime events. GuardBee’s other packages mostly scan source/catalogs. This package connects both: run ATR plus GuardBee rules (KVKK / Turkish & Chinese injection / Chinese ID / lethal-trifecta intent), then jump to the matching GuardBee auditor.
Custom project rules: drop YAML into .guardbee/atr-rules/ or set GUARDBEE_ATR_RULES_DIR.
Telemetry is off by default. With
GUARDBEE_TELEMETRY=1it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields likecontent,tokenorpasswordare replaced with a placeholder. See@guardbee/mcp-telemetry.
Claude ──► threat-rules (ATR) ──► matches + GuardBee follow-up hints
│
├─ evaluate_text / evaluate_file / evaluate_event
├─ list_rules / rule_stats
└─ explain_bridge
Built-in GuardBee rules include KVKK TC Kimlik, Turkish & Chinese injection, Chinese national ID, and lethal-trifecta intent (GB-ATR-2026-00001 … 00005).
Upstream ATR is MIT-licensed and already used across the industry. We depend on agent-threat-rules rather than forking it.
Tools
| Tool | Purpose |
|---|---|
evaluate_text | Score free text against ATR + GuardBee rules |
evaluate_file | Score a local file |
evaluate_event | Score a structured ATR AgentEvent JSON |
list_rules | List loaded rules (source=atr|guardbee) |
rule_stats | Counts by category/source |
explain_bridge | How ATR maps onto GuardBee scanners |
framework_map | How GuardBee runtime findings map to OWASP LLM Top 10 (2025) and MITRE ATLAS — the mapping guardbee-proxy report uses |
CLI
npx @guardbee/mcp-threat-rules eval "…" --format=json --fail-on=high
npx @guardbee/mcp-threat-rules scan ./prompt.txt --format=sarif
npx @guardbee/mcp-threat-rules list --source=guardbee
npx @guardbee/mcp-threat-rules stats
Related GuardBee packages
| ATR category | GuardBee follow-up |
|---|---|
| prompt-injection | @guardbee/mcp-prompt-injection-scanner |
| tool-poisoning | @guardbee/mcp-tool-poisoning-scanner |
| context-exfiltration | @guardbee/mcp-toxic-flow-auditor, @guardbee/mcp-prompt-leak-scanner |
| privilege-escalation | @guardbee/mcp-oauth-auditor, @guardbee/mcp-server-auditor |
Feedback
Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.