emanuelcelano/evide-mcp

GitHub: emanuelcelano/evide-mcp

将 AI agent 的关键决策和治理状态锚定到已验证人类身份、生成可独立验证取证记录的 MCP 治理与合规存证服务器。

Stars: 0 | Forks: 0

![MIT 许可证](https://img.shields.io/badge/license-MIT-purple) ![Node.js](https://img.shields.io/badge/node-%3E%3D18-blue) ![兼容 MCP](https://img.shields.io/badge/MCP-compatible-success) # EVIDE MCP Server v1.1.0 将 AI agent 连接到 [EVIDE 外部证据存证](https://app.certifywebcontent.com) API 的 MCP server。 EVIDE 将 AI agent 的决策、升级和治理状态固化为可独立验证的取证记录——锚定到经过验证的人类身份,在服务端以 UTC 记录时间戳,并在后果蔓延之前进行外部化存证。 ## 前置条件 —— 安装前必读 ### 1. DAPI —— 已验证的身份 EVIDE 不接受匿名存证。每一条记录都必须归属于经过验证的、不可否认的人类身份。 **DAPI**(个人身份数字证明,Digital Attestation of Personal Identity)是使每份存证在法律上具有归属权的身份层。DAPI 编号归属于负责 AI agent 的人类或组织——而不是 agent 本身。Agent 无法进行自我认证。 **如何获取 DAPI:**[dapi-certification.com](https://dapi-certification.com) DAPI 验证需要:1 份有效的身份证明文件、1 张面部照片、1 个包含语音的音频文件、1 段短视频。处理过程为人工操作。在规划集成之前请预留充足的时间。 ### 2. EVIDE API Key —— 有效订阅 访问 EVIDE 接入 API 需要有效的套餐和专用的 API key (`evd_...`)。 **套餐与定价:**[app.certifywebcontent.com/pricing](https://app.certifywebcontent.com/pricing) 可用套餐:Entry(10 次/月)、Starter(75 次/月)、Professional(200 次/月)、Enterprise(500 次/月)。对于每月超过 500 次接入的量,需要专门的基础设施——请在激活前与我们联系。 ## EVIDE 存证的内容 每条记录都会锚定: - 责任主体的身份(绑定 DAPI 的所有者) - agent 的执行身份(在架构上与所有者分离) - 结束时的分类状态和运行稳定性 - 边界就绪度和门控可见性层面 - 结束时声明的人工监督级别 - 在跨越时无法确认的未决信号 服务端计算的**证据档案**(profile_version: 1.1)包括: - **Dim 9 —— 取证交叉验证** —— 连续性推断(classification x runtime_visibility)—— 抗“合成连贯性”传感器 - **Dim 10 —— 决策波压缩 (DWC)** —— 监督吞吐量边界检测 - **Dim 11 —— 正式问责坍塌 (FAC)** —— 权力碎片化检测 ## 安装 ``` git clone https://github.com/emanuelcelano/evide-mcp cd evide-mcp npm install ``` **需要 Node.js >= 18。** ## 配置 将以下内容添加到您的 MCP 客户端配置(`claude_desktop_config.json` 或等效文件)中: ``` { "mcpServers": { "evide": { "command": "node", "args": ["/path/to/evide-mcp/index.js"], "env": { "EVIDE_API_KEY": "evd_your_key_here", "EVIDE_DAPI_NUMBER": "0123456789", "EVIDE_OWNER_ID": "your_owner_id", "EVIDE_OWNER_ROLE": "AI System Operator", "EVIDE_AGENT_SYSTEM": "MyAgentSystem", "EVIDE_AGENT_ID": "agent_xyz" } } } } ``` ### 环境变量 | 变量 | 必填 | 描述 | |---|---|---| | `EVIDE_API_KEY` | **是** | 您的 EVIDE API key (`evd_...`) | | `EVIDE_DAPI_NUMBER` | **是** | 您的 10 位 DAPI 编号 | | `EVIDE_OWNER_ID` | **是** | 您在源系统中的标识符 | | `EVIDE_OWNER_ROLE` | 否 | 角色描述。默认值:`AI System Operator` | | `EVIDE_AGENT_SYSTEM` | 否 | Agent 系统名称。默认值:`Unknown Agent System` | | `EVIDE_AGENT_ID` | 否 | Agent 实例标识符。默认值:`agent_unspecified` | ## 工具 ### `evide_intake` 将最终确定的 AI 决策作为证据记录进行存证。 ``` { "source_reference": "CDR-2026-00421", "decision_type": "candidate_evaluation", "decision_summary": "Candidate approved for second round interview.", "classification_status": "stable", "threshold_status": "met", "boundary_status": "candidate", "human_oversight_level": "L2" } ``` **可选的外部制品** (`evidence_references`): ``` { "source_reference": "CDR-2026-00423", "decision_type": "claim_assessment", "decision_summary": "Claim rejected: documentation inconsistent with policy terms.", "evidence_references": [ { "artifact_type": "document", "pointer": "s3://evidence-store/claim-8812/policy.pdf", "declared_origin": "policy_management_system", "declared_relationship": "supporting_document", "declared_retention_status": "persistent_storage", "hash_algorithm": "sha256", "hash_value": "9f2c7a1b4e6d...", "hash_scope": "full_file", "hashed_by": "policy_management_system" } ] } ``` EVIDE 锚定的是某个制品**存在**的声明——文件本身永远不会被上传,并且 EVIDE 永远不会计算或验证其 hash。这就是为什么只要声明了 hash,`hashed_by` 就是必填项:一个没有声明来源的锚定摘要是毫无价值的。客户端会在请求发出之前对此进行验证,因此如果缺少该字段,会产生一条明确指出该字段名称的提示信息,而不是笼统的服务器拒绝。没有任何推断:`hashed_by` 绝对不会被自动填充为 agent 的身份,因为声称 agent 计算了一个它仅仅是转发过的摘要,将会是一个虚假的来源声明。 声明该数组会自动设置 `extensions: ["evidence_references"]`。该注册表在两个方向上都是选择性的——存在但未声明的块会被拒绝,没有内容的声明也会被拒绝——因此客户端在构建时就保持两者的一致。 **可选的链参数**(证据连续性): ``` { "source_reference": "CDR-2026-00422", "decision_type": "candidate_evaluation", "decision_summary": "Escalation resolved: candidate approved after compliance review.", "parent_evide_id": "aed9e966-6f25-4358-b784-b06eff939e91", "chain_type": "escalation_resolution", "matter_reference": "MATTER-2026-4471" } ``` 自然的用法是将之前 `evide_escalate` 返回的 `evide_id` 作为 `parent_evide_id` 传递给解决该问题的存证记录——从而产生一条从“agent 在此停止”到“这是它如何被关闭”的声明谱系。 链验证是严格的,没有静默回退。如果父记录不存在、属于其他证据域、处于不可链接状态,或者声明了不同的 `matter_reference`,整个存证将被拒绝,而不是静默地开启一条新链。拒绝代码包括 `chain_parent_not_found` (422)、`chain_parent_not_owned` (**403** —— 这是一个授权决定,而不是 payload 错误)、`chain_parent_invalid_status` (422) 和 `chain_matter_mismatch` (422)。 返回:`evide_id`、`intake_hash`、`intake_timestamp_utc`、`profile_version`、取证交叉验证状态、存在时的 DWC 和 FAC 状态,以及——当记录源自其他记录时——返回 `chain_position`、`chain_type` 和 `chain_root_evide_id`。 ### `evide_escalate` 在继续进行高风险或存在争议的边界操作**之前**,固化 agent 的状态。 ``` { "source_reference": "ESC-2026-00089", "agent_state_summary": "Transaction exceeds regulatory threshold. Human review required.", "escalation_trigger": "regulatory_threshold", "escalation_reason": "Amount exceeds €50,000 -- requires compliance officer approval.", "boundary_status": "verified_partial", "unresolved_signals": ["compliance_officer_availability", "aml_flag_status"] } ``` `evide_escalate` 接受与 `evide_intake` 相同的可选链和 `evidence_references` 参数,适用于一次升级延续自另一次升级的情况。 可用触发器:`high_stakes_decision` · `contestable_state` · `legal_ambiguity` · `regulatory_threshold` · `governance_uncertainty` · `semantic_instability` · `human_review_required` · `authority_incoherence` ### `evide_owner_info` 返回配置好的所有者和 agent 身份。不会暴露完整的 API key。 ### `evide_check` 返回之前存证记录的验证指南。 ## 认知稳定缓冲区 另外三个工具允许 agent 驱动完整的 ESB 生命周期: | 工具 | 作用 | |---|---| | `evide_intake_esb` | 存证结束记录**并**在其上方开启一个缓冲区。返回 `buffer_id`。 | | `evide_buffer_observe` | 在缓冲区开启期间记录中间观察结果。可多次调用。 | | `evide_buffer_close` | 以判决关闭缓冲区。 | 结束状态会像使用 `evide_intake` 一样被立即锚定:缓冲区是**伴随**它开启的,它不会延迟或替代它。缓冲区增加的是轨迹——即条件在真实的时间窗口内是如何稳定的,而不仅仅是它们在跨越点时的状态。 **需要真实的观察窗口。**服务器会拒绝在开启后不到两秒内发生的关闭,因为瞬间关闭的缓冲区什么也没观察到。测量出的窗口将作为 `window_seconds` 返回。`test_mode: true` 会绕过此限制,之所以公开它是因为服务器接受它:在测试模式下关闭的缓冲区并没有观察到一个真实的窗口,记录也不会假装它观察到了。 **`stabilization_score` 是声明的,绝不是计算的。**EVIDE 和此客户端都不会计算它。超出范围的值会被拒绝,而不是被截断,因为截断会掩盖客户端错误。如果您没有评分的依据,请省略它——客户端不会替您提供。同样的原则已经应用于 `hashed_by` 和 `readiness_gate`。 **阶段字段在客户端强制执行。**`buffer/update` 和 `buffer/close` 接受不同的键集。将 `stabilization_score` 发送给观察操作,或将 `stability_trend` 发送给关闭操作,都会被拒绝,并提示该字段属于哪个工具——而不是像 API 本身在 2026 年 7 月之前所做的那样被静默丢弃。 ``` evide_intake_esb → closure anchored, buffer_id returned, buffer OPEN ↓ evide_buffer_observe → stability_trend, continuity_state, ↓ causal_persistence_signal, stabilization_source evide_buffer_close → verdict + window_seconds "crossing-sufficient, NOT absolute epistemic truth" ``` ## 边界就绪度与独立门控 由 agent 发起的接入默认为 `boundary_readiness: candidate`。在缺乏独立声明的就绪门控的情况下,FCC、DWC 和 FAC 可能会保持 `unknown` 状态。**这是一个证据结果,而不是处理失败。** `boundary_readiness` 声明是否有*独立*的门控评估了边界。发起存证的 agent 并不是该门控:它不能在边界证明自己的就绪状态,就像系统不能自我认证一样。因此,客户端永远不会伪造门控——`readiness_gate_id` 和 `readiness_gate_scope` 必须来自调用者,如果没有它们,除了 `candidate` 之外的任何状态都会被拒绝。 这同样适用于 `unresolved_signals`,它携带的是**门控**在评估期间无法解析的标识符。在 `candidate` 状态下,该数组根据定义就是空的,而不是受限制所致:没有进行评估,因此不可能留下未决事项。*agent* 无法决定的事情是另一回事,它们存在于 `escalation_reason` 和 `agent_state_summary` 中。 这是预期的生命周期,并且独立集成已经在生产环境中这样使用该 schema 了: ``` agent ↓ evide_escalate / evide_intake → boundary_readiness: candidate ↓ FCC / DWC / FAC: unknown independent gate (human supervisor, orchestrator, external governance component) ↓ assessment → boundary_readiness: verified_partial with its own readiness_gate ``` Agent 永远不需要冒充门控。同样的原则已经应用于 `hashed_by`:客户端不会编造属于其他人的声明。 ## 当前抽象的范围 当前的 MCP 抽象有意只公开已实现工具所需的干预类型(用于 `evide_intake` 的 `approval`,用于 `evide_escalate` 的 `escalation`)。只有当具体的 agent 工作流需要时,才会引入额外的干预语义——例如 `override` 或 `rejection`——而不是推测未来的用例。 同样的推论适用于 `human_oversight.is_declared`,它始终为 `true`。这不是捷径:没有 DAPI 编号服务器就无法启动,因此通过它进行的每一次存证在构建上都属于已声明的、有责任归属的人类。不存在可留下的匿名路径。监督*级别*仍然是调用者的选择(`L1` / `L2` / `L3`);只有已声明权威的存在是固定的,因为传输层本身就保证了这一点。 ## 架构原则 ``` authority = accountable human / organization (DAPI-bound) execution_identity = the agent that produced the closure escalation_context = why crystallization was requested ``` 责任始终汇聚于经过 DAPI 验证的所有者。Agent 无法进行自我认证。 ## 实时验证 首次 agent 实时证据固化:**2026 年 5 月**,通过 Claude Desktop + MCP 实现。 ``` continuity.state: degraded boundary_readiness: verified_partial unresolved_signals: 8 FCC: DEGRADED ``` 该记录保留了降级的治理状态,而没有将不稳定性掩盖为虚假的确定性。 [LinkedIn —— 首次 Agent 实时证据固化](https://www.linkedin.com/feed/update/urn:li:activity:7463539504990212096/) ## 文档 - [EVIDE JSON Schema](https://app.certifywebcontent.com/json) - [API 文档](https://app.certifywebcontent.com/docs/evide-intake-schema/) - [Payload 规范化](https://app.certifywebcontent.com/docs/payload-canonicalization/) - [结束层](https://app.certifywebcontent.com/docs/evide-closure-layer/) - [EVIDE 与执行认证](https://app.certifywebcontent.com/docs/evide-vs-execution-certification/) - [定价与服务条款](https://app.certifywebcontent.com/pricing) ## 作者 **Dott. Emanuel Celano** -- Informatica in Azienda [info@informaticainazienda.it](mailto:info@informaticainazienda.it) 意大利博洛尼亚 ## 许可证 MIT
标签:AI代理, GNU通用公共许可证, MCP协议, MITM代理, Node.js, 合规治理, 审计日志, 自定义脚本