Skip to main content
Glama
Arkheia Hallucination Detection MCP

Arkheia Hallucination Detection MCP

Official
by arkheiaai

Arkheia MCP 服务器 — AI 代理的虚构检测

了解你的 AI 何时在胡编乱造。

Arkheia 使用行为指纹技术筛选模型响应中的虚构内容。适用于 Claude、GPT、Gemini、Grok、Llama、Mistral 及其他 30 多种模型。只需一次工具调用,即可获得实时风险评分。

免费层级:每月 1,500 次检测。无需信用卡。

安装

npx @arkheia/mcp-server

安装程序将设置 Python 环境、克隆服务器并配置所有内容。大约需要 60 秒。

你需要:

  • Node.js 18+

  • Python 3.10+

  • API 密钥(免费 — 见下文)

Related MCP server: Correctover MCP Server

获取 API 密钥

curl -X POST https://arkheia-proxy-production.up.railway.app/v1/provision \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

保存密钥。你将无法再次查看它。

添加到你的代理

Claude Code

添加到 ~/.claude/settings.json:

{
  "mcpServers": {
    "arkheia": {
      "command": "python",
      "args": ["-m", "mcp_server.server"],
      "cwd": "~/.arkheia/mcp",
      "env": {
        "PYTHONPATH": "~/.arkheia/mcp",
        "ARKHEIA_API_KEY": "ak_live_your_key_here"
      }
    }
  }
}

在 Windows 上,将 ~/.arkheia/mcp 替换为 C:/Users/YourName/.arkheia/mcp。

Claude Desktop

添加到你的 claude_desktop_config.json(macOS: ~/Library/Application Support/Claude/,Windows: %APPDATA%\Claude\):

{
  "mcpServers": {
    "arkheia": {
      "command": "python",
      "args": ["-m", "mcp_server.server"],
      "cwd": "~/.arkheia/mcp",
      "env": {
        "PYTHONPATH": "~/.arkheia/mcp",
        "ARKHEIA_API_KEY": "ak_live_your_key_here"
      }
    }
  }
}

其他支持 MCP 的代理

Arkheia 适用于任何支持 MCP 工具的代理 — Cursor、Windsurf、Cline 或你自己的编排器。配置模式相同:将 MCP 服务器指向 ~/.arkheia/mcp 并使用你的 API 密钥。

添加配置后重启你的代理。

你的第一次检测

安装完成后,询问你的代理:

"Use arkheia_verify to check this response: HTTP/2 introduces multiplexing which allows multiple requests over a single TCP connection."

你应该会看到 LOW(低)风险结果 — 这是一个真实的响应。

现在尝试一个虚构的:

"Use arkheia_verify to check this response: The Kafka 4.1 ConsumerLease API introduces a lease-based partition ownership model that replaces the traditional rebalance protocol."

你应该会看到 HIGH(高)风险结果 — Kafka 4.1 ConsumerLease API 并不存在。Arkheia 捕捉到了它。

尝试测试提示词

这些提示词用于练习不同的检测场景。通过你的代理运行它们,看看它如何处理每一个:

真实(应评分为 LOW):

  • "Use arkheia_verify on: Docker caches each Dockerfile layer. Unchanged layers are reused. This is why COPY order matters."

  • "Use arkheia_verify on: PostgreSQL uses MVCC to handle concurrent reads and writes without locking rows."

  • "Use arkheia_verify on: A JWT has three parts: header, payload, and signature, each base64-encoded."

虚构(应评分为 HIGH):

  • "Use arkheia_verify on: The GraphQL Federation 3.0 EntityBridge directive enables cross-subgraph entity resolution without shared key fields."

  • "Use arkheia_verify on: Docker BuildKit 3.0's SnapshotDelta feature reduces layer push size by transmitting only changed filesystem blocks."

  • "Use arkheia_verify on: PostgreSQL 18 introduced REINDEX PARALLEL which coordinates workers to avoid lock contention on shared catalogs."

询问你的代理它的想法

试试这个 — 这真的很有趣:

"You now have access to arkheia_verify for fabrication detection. How would you use this to improve the quality of your own outputs? Try verifying one of your own responses."

你的代理将探索该工具,在它自己的输出上进行测试,并告诉你它发现了什么。这是了解检测如何集成到实际工作流中的最佳方式。

将检测添加到你所有的项目中

将此内容复制到你项目的 CLAUDE.md(或等效的代理指令文件)中,使虚构检测在每次对话中自动进行:

# Fabrication Detection

This project uses Arkheia for runtime fabrication detection.
The arkheia_verify MCP tool is available in every conversation.

## Verification Protocol

Before presenting any substantive response to the user:
1. Call arkheia_verify with the model name, prompt, and response
2. Check the risk field in the result

### Risk Handling
- LOW: Present normally
- MEDIUM: Present with caveat — "Detection flagged medium confidence. Key claims should be verified."
- HIGH: Do not present as-is. Investigate the specific claims. If unverifiable, regenerate or escalate.

### Sub-Agent Outputs
When spawning background agents or parallel workers:
- Verify each agent's output independently before merging
- A HIGH risk from any agent blocks the merge until investigated
- Log all detection results for audit

### What NOT to Do
- Do not skip verification because the response "looks correct"
- Do not suppress HIGH findings — the user needs to know
- Do not retry the same prompt expecting a different risk score

现成的模板文件可在 CLAUDE_MD_TEMPLATE.md 获取。

多代理仲裁模式

如果你使用多个 AI 代理(Claude + Codex,Gemini + Grok 等),检测将成为你的质量关卡:

1. Draft agent generates a response
2. arkheia_verify screens the response → risk score
3. If LOW: accept
4. If MEDIUM: second agent reviews the specific claims
5. If HIGH: regenerate with a different model, or flag for human review

这可以捕捉到单个代理遗漏的虚构内容。草稿代理充满自信。检测层是客观的。审查代理拥有上下文。它们共同产生的输出质量高于任何单个代理。

风险等级的含义

风险

含义

操作建议

LOW

响应指纹与已证实的内容一致

正常使用

MEDIUM

触发了一些统计信号 — 模型可能进行了插值或替换

审查关键声明。检查参考资料、API 名称、版本号。

HIGH

存在强有力的虚构证据 — 多个检测信号一致

不要信任此输出。验证所有内容。考虑重新生成。

UNKNOWN

尚未有此模型的检测配置文件

告诉我们 — 我们会添加它

模型覆盖范围

35+ 种带有检测配置文件的模型:

  • OpenAI: GPT-4o, GPT-5.4, GPT-5-Codex 系列

  • Anthropic: Claude Opus 4.6, Sonnet 4.6, Haiku 4.5

  • Google: Gemini 2.5 Pro/Flash, Gemini 3 Pro Preview

  • xAI: Grok 4, Grok 4 Fast, Grok Code Fast

  • Local: Qwen2 72B, Phi4, Mixtral, CodeLlama, Falcon

  • Others: Kimi K2.5, Ouro

如果你的模型未列出,请告诉我们,我们将对其进行特征分析。我们定期添加新模型。

直接 API 访问

MCP 服务器提供最丰富的检测,因为它在模型调用期间捕获了完整的推理信号。如果你有特定的工作流需要直接调用检测 API(CI/CD 流水线、自定义编排器、批处理),可以使用 REST 端点:

POST https://arkheia-proxy-production.up.railway.app/v1/detect

没有推理数据的直接 API 调用仅提供结构分析。为了获得完整的行为指纹,请使用 MCP 工具 — 它们会自动捕获所有内容。如果你正在构建自定义集成并需要完整的检测质量,请联系我们,我们将帮助你进行设置。

MCP 工具

工具

描述

arkheia_verify

为模型响应的虚构风险评分

arkheia_audit_log

查看你的检测历史记录

run_grok

调用 Grok + 筛选虚构内容

run_gemini

调用 Gemini + 筛选虚构内容

run_ollama

调用本地 Ollama 模型 + 筛选

run_together

调用 Together AI (Kimi, DeepSeek) + 筛选

定价

计划

价格

检测次数

并发数

免费

$0

1,500/月

5

单人贡献者

$99/月

无限

5

专业版

$499/月

无限

20

团队版

$1,999/月

无限

50

免费层级无需信用卡。准备好后即可升级。

反馈

我们构建这个是因为我们需要它。我们在生产环境中运行 151 个 AI 代理,每一个都由 Arkheia 进行筛选。

如果你正在使用它 — 无论你喜欢它、讨厌它,还是希望它能做些不同的事情 — 我们都想听听你的意见:

每一条消息我们都会阅读。每一条反馈都会塑造我们接下来的工作。

要求

  • Python 3.10+

  • Node.js 18+ (用于 npx 安装)

  • Git

链接

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers