mcpField
T
threat-rules

threat-rules

Local
github.com/GuardBeeSecurity1Updated 1d ago

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

  1. 01Evaluate text, files, and structured events
  2. 02Load ATR and GuardBee detection rules
  3. 03List rules and inspect category statistics
  4. 04Map findings to OWASP LLM Top 10 and MITRE ATLAS

Use cases

  1. 01Check prompts for injection indicators
  2. 02Score an ATR AgentEvent during runtime
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"guardbee-threat-rules": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-threat-rules"
]
}
}
}
Run commandnpx -y @guardbee/mcp-threat-rules

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@guardbee/mcp-threat-rules0.4.2

Tools

7

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
laneenumNoDetection lane (default: hunt)enforce | alert | hunt
typeenumNoATR event type (default: llm_input)llm_input | llm_output | tool_call | tool_response | agent_behavior | multi_agent_message | mcp_exchange
formatenumNotext | json | sarif
contentstringYesText to evaluate
scanContextenumNomcp | skill

Details

From the project README

@guardbee/mcp-threat-rules

🇬🇧 English | 🇹🇷 Türkçe | 🇨🇳 中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇧🇷 Português | 🇪🇸 Español | 🇩🇪 Deutsch

npm version npm downloads License: MIT

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=1 it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields like content, token or password are 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

ToolPurpose
evaluate_textScore free text against ATR + GuardBee rules
evaluate_fileScore a local file
evaluate_eventScore a structured ATR AgentEvent JSON
list_rulesList loaded rules (source=atr|guardbee)
rule_statsCounts by category/source
explain_bridgeHow ATR maps onto GuardBee scanners
framework_mapHow 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 categoryGuardBee 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

Markdown supported

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.