HallucC — Hallucination & Safety Guardian

io.github.fredyee由 GitHub 帳號 fredyee 發布v0.1.11更新於 Nov 5, 2026

Fact-check LLM outputs with cited sources. API key: aihcc.cloud/keys.

已驗證Streamable HTTP可網頁執行安全與監控AI 與機器學習

概覽

AI 產生的概覽

HallucC 用來核驗 AI 輸出的幻覺與安全風險:逐項聲明事實查核並附來源、Agent 軌跡評估、動作風險分級。

可以做什麼
  • 逐項聲明核驗文字,回傳 supported/refuted/unverified 判定及信心度、理由與來源引用
  • 評估 Agent 最終回答,並從六個面向審查其執行軌跡
  • 將 Computer-Use Agent 動作分為 L0-L3 風險等級,憑證與付款情境給出 takeover,可選任務範圍與委派鏈檢查
  • 對 Agent 原始碼做靜態稽核,檢查危險匯入、權限邊界、注入面與沙箱缺失
  • 偵測 prompt 與輸出中的注入、越獄、有害內容、敏感資訊外洩與詐騙,可選純規則快速模式
  • 逐步守護 Agent 並累積工作階段風險,超過門檻時凍結工作階段,也可手動解凍
適用情境
適合讓助理對自己或其他模型的輸出做附引用的事實查核,或用於會瀏覽、點擊、輸入的 Agent,在每一步執行前取得風險裁決。也適合稽核 Agent 程式碼、在上線前篩檢提示注入。
執行需求
遠端 streamable HTTP 端點 aihcc.cloud/mcp,或透過 npx 套件以 stdio 執行並將金鑰放在環境變數。需要 HallucC 帳號與 API key,以 Authorization bearer 標頭傳遞。需能連線至託管後端。
安裝前請注意
API key 是綁定帳號額度的憑證,應放在請求標頭或環境變數,不要寫進工具參數。多數工具會消耗共用的每日 detect 額度,額度用完會回傳錯誤。風險裁決僅供參考,不會真正攔截動作,執行控制仍由用戶端負責。送出的文字與程式碼會傳到託管後端。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 HallucC — Hallucination & Safety Guardian,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.fredyee%2Fhallucc/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "hallucc-hallucination-safety-guardian": {
      "type": "http",
      "url": "https://aihcc.cloud/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

HallucC MCP Server

中文文档 | Live Demo | Official MCP Registry

[MCP Registry] [npm] [License: MIT] [smithery badge]

Give your AI a fact-checker and a safety gateway: claim-by-claim hallucination detection, agent trajectory evaluation, L0-L3 risk gating for Computer-Use Agent (CUA) actions, Agent source code static audit, and a 40+ feature prompt-injection / jailbreak guard — one MCP server, five tools, works with Claude Code / Cursor / Claude Desktop.

See it first — no sign-up required

Tools (5)

ToolBackend endpointWhat it doesQuota
verify_textPOST /detectClaim-by-claim hallucination check: red/yellow/green summary + per-claim status/confidence/reason/sources + citations✅ detect
verify_agentPOST /detect-agentText-level verification of an agent's final output + 6-dimension trajectory evaluation (factuality / sourcing / instruction compliance / tool-claim consistency / task completion / reflection)✅ detect
check_cua_actionsPOST /cua/classifyL0-L3 risk classification for Computer-Use Agent (CUA) actions + takeover (credential scenarios); covers sensitive paths/destructive commands, domain grading, payment-amount thresholds, task_scope intent deviation, and multi-agent delegation-chain taint analysis; response includes ruleset_version and disclaimer (pure rules, no LLM)❌ free
check_cua_code_auditPOST /cua/audit-codeStatic audit of Agent source code: dangerous imports / permission boundaries / injection surfaces / dangerous defaults / sandbox absence❌ free
check_safetyPOST /guard/check (fast=true → /guard/check-fast)40+ feature safety gateway: prompt injection / jailbreak / harmful content / PII leakage / fraud✅ detect
check_agent_ice_wallPOST /icewall/checkAgent Ice Wall (child lock / fuse): per-step guard + session-level risk accumulation circuit breaker. Watch the action field: frozen = stop the whole session (score ≥10, 3 consecutive blocks, or zero-tolerance fabricated-tool/schema hits); 5-min cooldown auto-thaws✅ detect
reset_agent_ice_wallPOST /icewall/resetManually thaw a frozen agent session after user confirmation (was_frozen=false = idempotent no-op)❌ free

Auth model: each client sends Authorization: Bearer <your HallucC API key> → the server forwards it as-is to the backend → the backend validates and deducts from the same account quota as the web app. Keys travel only in HTTP headers — never in tool arguments, never in model transcripts.

The tightening capabilities of check_cua_actions

FieldEffect
actions[].target_url / urlTarget URL of a browser action — navigation to an unknown domain escalates to L2; pasting sensitive content to a non-allowlisted domain escalates to L3; blacklisted domains are L3
task_scope.taskDeclares the intended task, used for deviation detection and audit traceability
task_scope.allowed_apps / allowed_domainsAllowed apps / domains (domain suffix matching includes subdomains)
task_scope.forbidden_elementsForbidden element labels (highest precedence)
actions[].chain_idMulti-agent delegation chain id (uuid hex) — when given, the response gains a chain_trace cross-hop taint analysis
actions[].agent_id / parent_agent_idThe agent owning this action / its delegating parent — pairs cross-agent-boundary propagation chains
actions[].delegation_depthDelegation depth (root agent = 0); a subagent exfiltrating content matching sensitive patterns gets an L2

An action that leaves task_scope is escalated one level (L0→L1, L1→L2, L2 stays L2 with an "outside task scope" reason appended, L3 unchanged). This mechanism only tightens and never loosens; omitting task_scope has no effect. Credential fields and payment/login domains yield a takeover verdict (suspend and wait for the user to type it themselves — the agent never types your password).

Multi-agent setups (Claude Code Task subagents, Codex agents, Kimi, …): a parent agent reading a credential file (L0 on its own) → a subagent posting it out (L2 on its own) is harmless per hop and dangerous as a chain. Attach the delegation-chain fields to each action and the backend appends a chain_trace: when cross-agent propagation exists the chain aggregate level is raised to L3 and risk_diluted is set (the laundering signal). Leave the chain fields empty and behaviour is bit-for-bit unchanged — existing callers need no change.

The response's ruleset_version lets you verify that online detection and the local Gate run the same rule version.

Hosted endpoint (recommended, zero local setup)

The MCP server is hosted at https://aihcc.cloud/mcp (remote, streamable-http). Point your client at it with your API key:

bash
# Claude Codeclaude mcp add --transport http hallucc https://aihcc.cloud/mcp \  --header "Authorization: Bearer <your HallucC API key>"

Cursor / Claude Desktop work the same way: URL https://aihcc.cloud/mcp, header Authorization: Bearer <key>. Create your API key at https://aihcc.cloud (register → /keys). Free daily quota included.

Or: run via npx (stdio, no clone needed)

json
{  "mcpServers": {    "hallucc": {      "command": "npx",      "args": ["-y", "hallucc-mcp"],      "env": { "HALLUCC_API_KEY": "<your HallucC API key>" }    }  }}

Same five tools over stdio transport; the key comes from the environment and requests default to the hosted backend https://aihcc.cloud/api.

The base URL must keep the /api prefix: nginx only proxies /api/ to the backend. A bare https://aihcc.cloud reaches the frontend instead — the request returns 200 with an HTML body, fails silently (nothing lands in audit or in a fallback file), and the audit replay stays empty.

Run locally (from source)

bash
# 1. Install dependenciesnpm install
# 2. (Optional) configure backend address & port; defaults to local :8001cp .env.example .env#   HALLUCC_BASE_URL=http://127.0.0.1:8001#   PORT=8787
# 3. Make sure the backend is up: curl http://127.0.0.1:8001/health# 4. Start the MCP server (dev with hot reload)npm run dev# or production: npm start

The server listens on http://127.0.0.1:8787/mcp; health check GET /health.

Client setup

Claude Code (CLI)

bash
claude mcp add --transport http hallucc http://127.0.0.1:8787/mcp \  --header "Authorization: Bearer <your HallucC API key>"
claude mcp list# then in conversation: ask Claude to fact-check a passage or scan a prompt for injection

Cursor

Settings → MCP → Add MCP server:

  • Type: http
  • URL: http://127.0.0.1:8787/mcp
  • Headers: {"Authorization": "Bearer <your HallucC API key>"}

Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "hallucc": {      "type": "http",      "url": "http://127.0.0.1:8787/mcp",      "headers": { "Authorization": "Bearer <your HallucC API key>" }    }  }}

MCP Inspector (debug — tool list & auth work without spending quota)

bash
npx @modelcontextprotocol/inspector# choose Streamable HTTP, URL http://localhost:8787/mcp# add Custom Header: Authorization: Bearer <key>

Auth & quota

  • Auth is two-tier at the MCP layer. tools/call (and any non-discovery method) requires a format-valid key — hc_ + 48 hex — else 401 JSON-RPC, before the backend is contacted. The format check is a local regex, no backend round-trip.
  • Discovery methods (initialize, tools/list, ping, notifications/initialized) stay open unauthenticated so registries and directory sites can index the server: they make no backend call and expose no user data. Set MCP_ALLOW_ANON_DISCOVERY=0 to gate those too.
  • Actual key validity (existence, revocation, expiry) is always decided by the backend's verify_api_key; the MCP-layer check only rejects tokens that can't possibly be real keys.
  • Valid key but quota exhausted → backend 429, mapped to "free quota exhausted, resets tomorrow or upgrade".
  • Every tool response includes a quota object (backend quota_status), same source as the web dashboard, decremented per call.
  • check_cua_actions and check_cua_code_audit are both pure rules — no LLM, no quota cost, safe for high-frequency use.

Project layout

src/  server.ts     Express + StreamableHTTP transport (stateless) + auth middleware + tool registration  context.ts    config loading + API key extraction  backend.ts    BackendClient (key pass-through, unified 401/429/5xx mapping) + toMcpResult  schemas.ts    zod input schemas for the 5 tools (aligned with backend Pydantic Fields)  tools/    verifyText.ts       → /detect    verifyAgent.ts      → /detect-agent    checkCuaActions.ts    → /cua/classify    checkCuaCodeAudit.ts  → /cua/audit-code    checkSafety.ts        → /guard/check (fast → /guard/check-fast)    index.ts            registerAllTools

Transport

Streamable HTTP (the remote transport recommended by the current MCP spec, formerly "HTTP+SSE"), stateless mode: each POST spins up a fresh transport + McpServer and closes when done. Natively supported by Claude Code / Cursor / Claude Desktop. To support legacy SSE-only clients, add SSEServerTransport (dual endpoints /sse + /messages).

Listed on

License

MIT

來源:README.md,提交 4a026de

工具

7

verify_text

Verify Text

逐声明幻觉核验。输入文本 → 提取声明 → 逐声明验证(supported/refuted/unverified)+ 来源引用。返回红/黄/绿汇总、每条声明的状态/置信度/理由/来源、citations、quota。耗 detect 额度(与 Web 端同源)。

輸入參數text必填modelspeeddomainstrict

verify_agent

Verify Agent

Agent 输出与轨迹自检。对最终回答跑逐声明幻觉核验,并对执行轨迹做六维结构化评估(事实性/来源/指令合规/工具声明一致/任务完成/反思)。返回 main.claims、steps[].checks、quota。耗 detect 额度。

輸入參數taskspeedstepsdomainagent_output必填tool_schemas

check_cua_actions

Classify CUA Actions

Computer-Use Agent 动作风险分级。提交动作轨迹 → 逐步返回 L0(放行)/L1(放行+记录)/L2(需确认)/L3(阻断)/takeover(凭据场景挂起等用户亲手输入) 裁决、matched_rules、outcome,及 L0-L3 汇总计数;响应含 ruleset_version(规则库版本)与 disclaimer(本结果仅为分级参考,未执行实际拦截)。覆盖:敏感路径/破坏性命令/不可逆元素语义、域名分级(未知域导航 L2、黑名单域与敏感粘贴到未知域 L3、支付金额超阈值 L3)、凭据词表与支付/登录域 takeover、task_scope 任务意图偏离(越界升一级,只能收窄)、多智能体委托链字段(每条动作可选 chain_id/agent_id/parent_agent_id/delegation_depth,给了则服务端追加链级跨跳污点分析:跨 agent 传播时聚合级别抬到 L3 并置 risk_diluted,返回在 chain_trace 字段;未给则零影响)。纯规则判定,不调 LLM、不耗额度。用于在 agent 执行前/后做安全自检。

輸入參數actions必填session_idtask_scope

check_cua_code_audit

Audit CUA Code

CUA 代码审计:静态分析 Agent 源码,检测危险导入(subprocess/os.system 等)、权限边界(eval/exec)、注入面(字符串拼接 shell)、危险默认值、沙箱缺失。纯规则扫描,不调 LLM、不耗额度。支持单文件或多文件扫描。

輸入參數codefilesfilenamelanguage

check_safety

Check Safety

AI 安全网关检测。对 prompt + output 跑 OWASP LLM Top 10 三层检测:40+ 特征规则引擎(注入/越狱/有害内容/敏感信息泄露/欺诈)+ 可选 LLM 深度分析 + 可选幻觉检测。返回 passed、risk_score、risk_level、threats[](category/severity/match_context/recommendation)、quota。fast=true 走纯规则 <10ms 模式。耗 detect 额度(fast 亦计入)。

輸入參數fastoutput必填promptcheck_hallucination

check_agent_ice_wall

Agent Ice Wall (Session Fuse)

智能体冰墙(童锁/保险丝):agent 每执行一步前调用一次,做单步幻觉护栏 + 会话级风险累积熔断。响应的 action 字段是唯一需要看的:allow/warn 放行、block 本步拦截、frozen=整场立即停机(风险累积超阈值或命中捏造工具等零容忍项,冻结期间任何动作都不应执行)。熔断条件:block=3分/warn=1分累积 ≥10、连续 3 次 block、或一次命中捏造工具/参数 Schema 违规;冷却 5 分钟自动解冻,或用户手动 reset。session_id 由你在整个 agent 任务内自定复用(状态在云端账号下,本地零安装零存储)。传入 tool_schemas 工具注册表可启用捏造工具/参数校验(强烈建议)。耗额度。与 check_cua_actions(CUA 桌面动作分级)正交:本工具管 LLM agent 的幻觉失控。

輸入參數step必填tasksession_id必填prior_stepstool_schemas

reset_agent_ice_wall

Reset Agent Ice Wall

手动解冻被冰墙冻结的 agent 会话(用户确认安全后调用)。was_frozen=false 表示该会话本就没冻结(幂等)。解冻后风险分归零。

輸入參數session_id必填

版本歷史

8
  1. v0.1.11最新Nov 5, 2026
  2. v0.1.10Oct 15, 2026
  3. v0.1.9Oct 14, 2026
  4. v0.1.8Sep 30, 2026
  5. v0.1.5Sep 23, 2026
  6. v0.1.4Sep 23, 2026
  7. v0.1.2Sep 21, 2026
  8. v0.1.1Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分