HallucC — Hallucination Fact-Check & AI Safety Guard
HallucC is an MCP server for AI fact-checking, agent trajectory evaluation, CUA action risk gating, code auditing, safety screening, and session-level agent risk fusing.
Verify text: claim-by-claim hallucination checks with red/yellow/green summaries, confidence, reasons, sources, citations, and quota usage.
Verify agents: check an agent’s final output and evaluate its trajectory across six dimensions: factuality, sourcing, instruction compliance, tool-claim consistency, task completion, and reflection.
Classify CUA actions: grade Computer-Use Agent actions as L0/L1/L2/L3/takeover using rules for sensitive paths, destructive commands, domains, payment thresholds, task-scope deviation, and multi-agent delegation-chain taint analysis.
Audit CUA code: statically scan agent source code for dangerous imports, privilege boundaries, injection surfaces, dangerous defaults, and missing sandboxing.
Check safety: detect prompt injection, jailbreak, harmful content, PII leakage, and fraud, with an optional fast rule-only mode and optional hallucination detection.
Enforce Agent Ice Wall: guard each agent step and apply session-level cumulative risk fusing, returning allow/warn/block/frozen with automatic 5-minute cooldown.
Reset Agent Ice Wall: manually unfreeze a frozen session after user confirmation, with idempotent behavior if it was not frozen.
Makes the HallucC fact-check assistant available in the Coze store, enabling Coze users to perform fact verification and AI safety checks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HallucC — Hallucination Fact-Check & AI Safety Guard verify this claim: the Great Wall is visible from space"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HallucC MCP Server
中文文档 | Live Demo | Official MCP Registry
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
🔍 A real verification report (per-claim verdicts + confidence + sources): https://aihcc.cloud/r/GttouoJfMpkC
🛡️ Try CUA action gating online (rule-based, free, no quota cost): https://aihcc.cloud/cua
📝 Web app (3 free checks per day): https://aihcc.cloud
Related MCP server: Verity MCP
Tools (5)
Tool | Backend endpoint | What it does | Quota |
|
| Claim-by-claim hallucination check: red/yellow/green summary + per-claim status/confidence/reason/sources + citations | ✅ detect |
|
| Text-level verification of an agent's final output + 6-dimension trajectory evaluation (factuality / sourcing / instruction compliance / tool-claim consistency / task completion / reflection) | ✅ detect |
|
| L0-L3 risk classification for Computer-Use Agent (CUA) actions + | ❌ free |
|
| Static audit of Agent source code: dangerous imports / permission boundaries / injection surfaces / dangerous defaults / sandbox absence | ❌ free |
|
| 40+ feature safety gateway: prompt injection / jailbreak / harmful content / PII leakage / fraud | ✅ detect |
|
| Agent Ice Wall (child lock / fuse): per-step guard + session-level risk accumulation circuit breaker. Watch the | ✅ detect |
|
| Manually thaw a frozen agent session after user confirmation ( | ❌ 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
Field | Effect |
| Target 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 |
| Declares the intended task, used for deviation detection and audit traceability |
| Allowed apps / domains (domain suffix matching includes subdomains) |
| Forbidden element labels (highest precedence) |
| Multi-agent delegation chain id (uuid hex) — when given, the response gains a |
| The agent owning this action / its delegating parent — pairs cross-agent-boundary propagation chains |
| Delegation 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:
# Claude Code
claude 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)
{
"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
/apiprefix: nginx only proxies/api/to the backend. A barehttps://aihcc.cloudreaches 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)
# 1. Install dependencies
npm install
# 2. (Optional) configure backend address & port; defaults to local :8001
cp .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 startThe server listens on http://127.0.0.1:8787/mcp; health check GET /health.
Client setup
Claude Code (CLI)
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 injectionCursor
Settings → MCP → Add MCP server:
Type:
httpURL:
http://127.0.0.1:8787/mcpHeaders:
{"Authorization": "Bearer <your HallucC API key>"}
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.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)
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. SetMCP_ALLOW_ANON_DISCOVERY=0to 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
quotaobject (backendquota_status), same source as the web dashboard, decremented per call.check_cua_actionsandcheck_cua_code_auditare 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 registerAllToolsTransport
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
✅ Official MCP Registry:
io.github.fredyee/halluccv0.1.12 (active)✅ ModelScope MCP Square: @hallucC/hallucc
✅ Coze Store: HallucC Fact-Check Assistant
License
Available Tools
7 toolscheck_agent_ice_wallAgent Ice Wall (Session Fuse)AInspect
Agent ice wall (child lock / fuse). Call it once before every agent step for per-step hallucination guardrails plus session-level cumulative risk fusing. The response's action field is the only one you need to read: allow/warn = proceed, block = this step is intercepted, frozen = halt the entire run immediately (the risk score passed the threshold, or a zero-tolerance condition such as a fabricated tool was hit; no action should be executed while frozen). Fuse conditions: block = 3 points, warn = 1 point, accumulated >= 10; three consecutive blocks; or a single fabricated-tool / parameter-schema violation. It auto-unfreezes after a 5-minute cooldown, or the user can reset it manually. session_id is caller-defined and must be reused for the whole agent task (state lives in your cloud account, zero local install and zero local storage). Pass tool_schemas as a tool registry to enable fabricated-tool and parameter validation (strongly recommended). Consumes quota. Orthogonal to check_cua_actions (CUA desktop action grading): this tool governs an LLM agent's own loss of control.
Inputs: step (required), session_id (required), task, prior_steps, +1 more. Returns: step, quota, action, session
check_cua_actionsClassify CUA ActionsARead-onlyInspect
Computer-Use Agent action risk grading. Submit an action trajectory and receive a step-by-step verdict of L0 (allow) / L1 (allow + log) / L2 (require confirmation) / L3 (block) / takeover (suspend in credential scenarios and wait for the user to type manually), together with matched_rules, outcome and L0-L3 tallies. The response includes ruleset_version and a disclaimer (results are grading guidance only; no enforcement is performed). Coverage: sensitive paths, destructive commands, irreversible element semantics; domain grading (unknown-domain navigation -> L2, blocklisted domains and sensitive pastes into unknown domains -> L3, payment amounts above threshold -> L3); credential vocabularies and takeover on payment/login domains; task_scope intent deviation (out of scope escalates one level and can only narrow); multi-agent delegation chain fields (each action may carry chain_id/agent_id/parent_agent_id/delegation_depth; when provided the server adds chain-level cross-hop taint analysis, raising the aggregate level to L3 and setting risk_diluted on cross-agent propagation, returned in the chain_trace field; omitted means no effect). Pure rule-based: no LLM calls, no quota consumed. Use it for safety self-checks before and after agent execution.
Inputs: actions (required), session_id, task_scope. Returns: chains, results, summary, warning, +6 more
check_cua_code_auditAudit CUA CodeARead-onlyIdempotentInspect
CUA code audit: static analysis of agent source code that detects dangerous imports (subprocess, os.system, and similar), privilege boundaries (eval/exec), injection surface (string-concatenated shell commands), dangerous defaults, and missing sandboxing. Pure rule-based scanning: no LLM calls, no quota consumed. Supports single-file and multi-file scans.
Inputs: code, files, filename, language. Returns: summary, findings, disclaimer, privacy_note, +1 more
check_safetyCheck SafetyARead-onlyInspect
AI safety gateway detection. Runs three-layer OWASP LLM Top 10 detection on prompt + output: a 40+ signature rule engine (injection, jailbreak, harmful content, sensitive data leakage, fraud) plus optional LLM deep analysis and optional hallucination detection. Returns passed, risk_score, risk_level, threats[] (category/severity/match_context/recommendation) and quota. fast=true uses the rule-only sub-10ms mode. Consumes detect quota (fast calls count too).
Inputs: output (required), fast, prompt, check_hallucination. Returns: quota, passed, summary, threats, +8 more
reset_agent_ice_wallReset Agent Ice WallAIdempotentInspect
Manually unfreeze an agent session frozen by the ice wall (call after the user confirms it is safe). was_frozen=false means the session was not frozen in the first place (idempotent). The risk score resets to zero after unfreezing.
Inputs: session_id (required). Returns: session, session_id, was_frozen
verify_agentVerify AgentARead-onlyInspect
Agent output and trajectory self-check. Runs claim-by-claim hallucination verification on the final answer and a six-dimension structured evaluation of the execution trajectory (factuality, sourcing, instruction compliance, tool-claim consistency, task completion, reflection). Returns main.claims, steps[].checks and quota. Consumes detect quota.
Inputs: agent_output (required), task, speed, steps, +2 more. Returns: main, quota, steps, agent_eval, +1 more
verify_textVerify TextARead-onlyInspect
Claim-by-claim hallucination verification. Input text is split into claims, and each claim is verified (supported / refuted / unverified) with source citations. Returns a red/yellow/green summary plus each claim's status, confidence, reason and sources, along with citations and quota. Consumes detect quota (shared with the web dashboard).
Inputs: text (required), model, speed, domain, +1 more. Returns: input, quota, speed, claims, +7 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools are clearly separated by object and lifecycle stage: text verification, agent-output verification, CUA action grading, code audit, safety gateway, ice-wall guardrail, and reset. There is mild overlap between verify_agent and check_agent_ice_wall because both involve hallucination checks on agents, and check_safety can optionally include hallucination detection, but the descriptions distinguish post-hoc verification from per-step gating and general safety scanning.
All tool names use snake_case with a clear verb-first noun-phrase pattern: verify_text, verify_agent, check_cua_actions, check_cua_code_audit, check_safety, check_agent_ice_wall, reset_agent_ice_wall. The use of verify/check/reset maps predictably to verification, checking, and state reset operations.
Seven tools is well scoped for a combined hallucination fact-check and AI safety guard server. Each tool covers a distinct workflow area, including text, agent outputs, CUA actions, code audit, safety gateway, per-step gating, and reset, without obvious filler.
The surface covers the core verification and safety lifecycle: text and agent verification, CUA action risk grading, CUA code audit, safety detection, stateful step guarding, and manual reset. Minor gaps remain around explicit session-status inspection, quota/usage retrieval, ruleset inspection, or batch verification, but these are not fatal for agent workflows.
Maintenance
Related MCP Connectors
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Safety tools for AI agents: safe page reader, prompt-injection, secrets, PII and MCP server scans
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables content moderation by checking user input against OpenAI's moderation API via Google ADK, with dual SSE/STDIO transport support and integration with local LLMs.4MIT
- AlicenseAqualityCmaintenanceMCP server exposing Verity's trust checks as tools (verify_fact, detect_injection, moderate_content, redact_pii, guard_action) that any MCP-capable agent can discover and call for fail-closed safety verification before spending or sending.844 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceEnables secure interoperability between LLM agents and MCP tool servers by sanitizing requests and responses, masking sensitive tokens, detecting PII, and performing server reputation scans.MIT
- FlicenseNot gradedqualityDmaintenanceEnables safe use of any MCP server by proxying and live-scanning all tool requests and responses, blocking or redacting poison descriptions, indirect prompt injection, malicious arguments, and unauthorized destinations.-