ai-guardrails
Cloudflare Workers MCP server: ai-guardrails
我该使用它吗
质量与安全性
发现(5)
- HIGH
- MEDIUM在 redact_pii 中
- LOW在 redact_pii 中
- LOW在 check_hallucination 中
- INFO在 redact_pii 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"ai-guardrails": {
"url": "https://api.lazy-mac.com/ai-guardrails/mcp"
}
}
}远程端点
https://api.lazy-mac.com/ai-guardrails/mcpstreamable-http它能做什么
工具清单
工具(5)
⚪detect_pii(text)
Detect personally identifiable information (email, phone, SSN, credit card, IP, URL, API key) in a text string.
输入模式
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Text to scan for PII"
}
},
"required": [
"text"
]
}⚪redact_pii(text, mode)
Redact PII from text. mode=mask replaces with [REDACTED]; mode=tag uses typed placeholders like [EMAIL].
输入模式
{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"mask",
"tag"
],
"default": "mask"
}
},
"required": [
"text"
]
}🟢check_safety(text)
Check text for harmful content using weighted keyword detection. Returns a 0–1 score and verdict (safe/caution/unsafe).
输入模式
{
"type": "object",
"properties": {
"text": {
"type": "string"
}
},
"required": [
"text"
]
}🟢check_hallucination(text)
Heuristic scoring of LLM hedge phrases that correlate with hallucinated outputs. Returns score 0–1 and risk level.
输入模式
{
"type": "object",
"properties": {
"text": {
"type": "string"
}
},
"required": [
"text"
]
}🟢full_check(text, checks)
Run pii, safety, and/or hallucination checks in one call. Default: pii + safety. Specify checks=["pii","safety","hallucination"] to run all.
输入模式
{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"checks": {
"type": "array",
"items": {
"type": "string",
"enum": [
"pii",
"safety",
"hallucination"
]
},
"default": [
"pii",
"safety"
]
}
},
"required": [
"text"
]
}社区
证据