FaultKey · CausalLayer

io.github.smq9sn5jck-cloud由 GitHub 账号 smq9sn5jck-cloud 发布v0.2.0更新于 Oct 27, 2026

Deterministic AI-liability attribution: signed, Bitcoin-anchored vendor/deployer/user fault split.

已验证Streamable HTTP可网页运行安全与监控数据与分析AI 与机器学习

概览

AI 生成的概览

FaultKey CausalLayer 为多方 AI 事故出具带签名的确定性责任分配证书,并提供验证、补救模拟与司法辖区叠加计算。

可以做什么
  • 提交事故或 OpenTelemetry 追踪,获得含各参与方责任份额与证据链完整度的签名 CausalCertificate
  • 按签名、Merkle 完整性与签发方状态验证证书,或从规范输入逐字节重算比对
  • 模拟补救措施,并计算 AU、EU、US、UK、CA 各辖区叠加后的责任份额
  • 在智能体交付回复前评估拟议动作,给出允许、需修改或阻止的结论
  • 从报告、诉讼文件、日志等非结构化文本中抽取结构化事故对象
  • 查询公开的锚定批次索引与签发方公钥注册表
适用场景
当助手需要判断 AI 系统造成损害时供应商、部署方与用户之间的责任归属,或需要可复现、可由第三方验证的责任划分而非大模型主观判断时适用。也适合在智能体交付回复前做合规闸门检查。
运行要求
远程 Streamable HTTP 端点;未声明认证方式或环境变量。公开演示按 IP 每日限流,返回带水印的确定性响应。付费档位通过 Stripe Checkout 购买积分,另有 USDC 备选。README 还说明了 npx 代理与在 Cloudflare 上自托管的方式。
安装前请注意
每次提交事故消耗 50 积分、验证消耗 1 积分,付费使用会产生费用。提交内容会被扫描 PII,未设置 pii_acknowledged 将被拒绝,而该确认会记录在证书中;事故文本与追踪数据会发送至厂商上游引擎。请求须设置 deterministic_only 并至少包含一个参与方与带时间戳的事件。证书属于责任计算参考,不构成法律意见。

安装

在 SourceWeft 中

  1. 打开 控制台中的 FaultKey · CausalLayer,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.smq9sn5jck-cloud%2Fcausallayer-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "faultkey-causallayer": {
      "type": "http",
      "url": "https://causallayer-mcp-demo.zykm9qkk7j.workers.dev/mcp"
    }
  }
}

README

FaultKey · CausalLayer MCP Server

[CI] [CodeQL] [OpenSSF Scorecard] [License] [npm version] [Cloudflare Workers] [Model Context Protocol] [Live Demo] [GitHub Stars] [TypeScript] [OpenAPI] [security: ed25519] [anchored: Bitcoin]

[FaultKey CausalLayer MCP — terminal demo showing liability attribution]

Deterministic fault math for multi-party AI incidents. When an AI causes harm and three parties argue over who pays, FaultKey returns a signed, Bitcoin-anchored certificate of fault allocation in under 200 ms — no LLM, no probabilistic scoring, no vendor cooperation needed for a third party to verify.

This is the official Model Context Protocol (MCP) server for the CausalLayer engine, packaged as a Cloudflare Worker. It lets AI agents (Claude Desktop, Cursor, Cline, Continue, Windsurf) call the four core liability-attribution tools without writing a single line of integration code.

If this saves you time, give it a star — it helps others find it and tells us people care.

Live demo

🎮 Try the Interactive Demo — No setup required. Pick a scenario, click "Run Analysis", see real-time liability attribution.

The public Worker is deployed on Cloudflare's global edge network and is fully functional in standalone demo mode (deterministic responses, watermarked, rate-limited 5 calls / IP / day):

  • Endpoint: https://mcp.faultkey.com/mcp (live, custom domain)
  • Mirror: https://causallayer-mcp-demo.zykm9qkk7j.workers.dev/mcp
  • Healthcheck: /healthz
  • Demand telemetry: /stats (public, aggregated, no PII)

Quick start

Claude Desktop

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "faultkey": {      "command": "npx",      "args": ["-y", "causallayer-mcp"]    }  }}

Restart Claude. Type "List the FaultKey tools."

Cursor

Settings → MCP Servers → Add new:

  • Name: faultkey
  • Command: npx -y causallayer-mcp

Cline / Continue / Windsurf

json
{  "name": "faultkey",  "command": "npx",  "args": ["-y", "causallayer-mcp"]}

Direct HTTP (no CLI)

bash
curl -X POST https://causallayer-mcp-demo.zykm9qkk7j.workers.dev/mcp \  -H "Content-Type: application/json" \  -H "Accept: application/json, text/event-stream" \  -d '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}'

The response includes a Mcp-Session-Id header that you reuse for subsequent calls.

Tools

ToolDescriptionDemo limitPaid cost
submit_incidentSubmit an AI incident for deterministic liability attribution. Returns a signed CausalCertificateV1 with per-agent fault allocation, evidence-chain completeness, and Bitcoin-anchored proof.5 / IP / day50 credits
verify_certificateIndependently verify a certificate (signature, Merkle integrity, issuer status) without calling FaultKey.50 / IP / day1 credit
get_anchor_statusReturn the index of all Tessera anchor batches or one batch's full JSON (signed Merkle root, OpenTimestamps proof reference).UnlimitedFree
query_issuer_registryList all trusted CausalLayer issuer public-key fingerprints, status, and validity windows.UnlimitedFree

Why deterministic?

Insurers, banks, and APRA-regulated entities cannot accept LLM-based fault attribution because the same prompt produces different answers on different days. FaultKey uses a closed-form causal scoring algorithm (graph-theoretic, version-pinned, byte-identical reproducible across runs) so two adversarial parties get the same number — that's the whole point.

The math is published as an Australian Standards-aligned paper. The signed certificate, issuer registry, and Merkle anchor log are all independently verifiable by a third party using only Node's built-in crypto and the causallayer-verifier tool — no network calls back to the vendor.

Guardrails (enforced at the Cloudflare edge)

  1. NO-PII — Payloads are regex-scanned for emails, Tax File Numbers, Medicare numbers, SSNs, and credit cards. Rejected unless the caller sets pii_acknowledged: true (which is logged in the certificate as a compliance acknowledgement).
  2. DETERMINISTIC-ONLY — The engine rejects any request lacking deterministic_only: true. This is the agent's binding acknowledgement that FaultKey output is closed-form, not probabilistic.
  3. EVIDENCE-REQ — At least one identified agent and one timestamped event with description must be supplied or the request is rejected with 400 evidence_insufficient.

Self-hosting

You can deploy your own copy to your own Cloudflare account if you want to enforce a corporate firewall, custom rate limits, or bring your own KV namespace:

bash
git clone https://github.com/smq9sn5jck-coder/causallayer-mcp.gitcd causallayer-mcppnpm installpnpm wrangler kv namespace create LEDGER# paste the returned id into wrangler.jsoncpnpm wrangler deploy

The CausalLayer engine itself (the closed-form fault math) runs upstream and is available via API key. For self-hosted demos without an upstream, set STANDALONE_DEMO=true in wrangler.jsonc to short-circuit upstream calls and return deterministic, watermarked responses.

Architecture

[Claude/Cursor/Cline]  ←→  [npx causallayer-mcp]  ←→  [Cloudflare Worker]  ←→  [CausalLayer engine]                              (mcp-remote proxy)         (this repo)            (Fly.io Sydney)                                                              ↓                                                    [KV: credit ledger]                                                    [DO: per-session state]                                                    [KV: telemetry buffer]
  • Transport: Streamable HTTP (per the 2024-11-05 MCP spec — SSE is deprecated)
  • Session state: Cloudflare Durable Object (CausalLayerMCP), SQLite-backed
  • Billing: Cloudflare KV ledger, Stripe Checkout webhook, optional x402 USDC fallback
  • Demo: Per-IP daily counter in KV, deterministic fixture responses with [DEMO] watermark
  • Latency: p50 ≈ 60 ms (cold), 25 ms (warm) on Cloudflare's 300+ POPs

Pricing

TierCredits$AUDNotes
Demo5 incidents / IP / dayFreeWatermarked responses
Starter1,000$99Stripe Checkout, no SLA
Growth10,000$749+ 50 verify, 99.5% SLA
EnterpriseUnmeteredContact+ dedicated namespace, 99.95% SLA, audit log access

For enterprise tenants email [email protected] (or open a GitHub issue with subject "enterprise inquiry").

Interactive Tools

Score any AI incident in seconds — faultkey.com/score — describe what happened, get a deterministic liability split with dollar exposure, jurisdiction analysis, and a shareable verdict card.

Compare vendor liability profiles — faultkey.com/compare — side-by-side comparison of AI vendors (OpenAI vs Anthropic vs Google etc.) across incident types.

Public accuracy ledger — faultkey.com/track-record — 7/7 direction match on backtested cases, 3 pending predictions on active litigation.

License

Apache 2.0. See LICENSE.

Support the Project

If FaultKey helped you understand AI liability, saved you research time, or you just think deterministic fault attribution should exist:

Built in Brisbane

FaultKey is built in Brisbane, Australia, with data residency in Sydney for APRA-regulated buyers. The team can be reached at [email protected].

来源:README.md,提交 e52536c

工具

10

submit_incident

Submit an AI incident for deterministic causal liability attribution. Returns a signed CausalCertificate, per-agent liability allocation, evidence-chain completeness, regulatory mapping, and (where keys are configured) a Bitcoin-anchored proof. Cost: 50 credits. Three guardrails apply: PII scan, deterministic-only acknowledgement, and minimum evidence.

输入参数title必填agents必填events必填categorycurrencyseveritydescriptionjurisdictionpii_acknowledgeddeterministic_only必填financial_impact_cents

verify_certificate

Independently verify a CausalCertificate end-to-end (signature, Merkle integrity, issuer status against the registry). Cost: 1 credit. In production env, certificates from non-active issuers are rejected.

输入参数certificate必填

verify_certificate_recompute

Independently re-derive a CausalCertificate from its canonical input and compare byte-for-byte against the claimed certificate. This is the strongest verification path: it requires no trust in the issuer or signing key. Cost: 1 credit (same price as verify_certificate). Returns PASS only if every checked field (certificateId, request_hash, merkleRoot, verdict, causalGraph, fourFactorScoring, deviationTaxonomy, euRuleOverlay, cascadeAttenuation, damages, underwriting) matches identically.

输入参数certificate必填canonicalInput必填

submit_otel_trace

Convert an OpenTelemetry OTLP JSON trace into a FaultKey incident and return the same deterministic CausalCertificate as submit_incident. Each span becomes an event; service.name groups spans into agents; W3C trace_id and span_id propagate as evidence pointers on the causal graph edges. Cost: 50 credits (same as submit_incident). Three guardrails apply: PII scan, deterministic-only acknowledgement, and minimum evidence (auto-satisfied when the trace has at least 1 span).

输入参数otlp必填title必填categorycurrencyjurisdictionpii_acknowledgeddeterministic_only必填financial_impact_cents

simulate_remediation

Counterfactual remediation simulator. Given a certificate's verdict + fourFactorScoring + agents and a list of remediation IDs from the FK-METHOD-2026-003 catalog, return the apportioned shares each remediation would have produced (in isolation) and the composite shares if they all stack. Every remediation cites a specific statute or standard. GET /api/v2/remediation/catalog for the list of IDs. Cost: 1 credit (same price as verify_certificate). Pure deterministic; same inputs produce a byte-identical result.

输入参数agents必填verdict必填remediations必填fourFactorScoring必填

query_jurisdiction_overlay

Multi-jurisdiction overlay (FK-METHOD-2026-004). Given a canonical attributable apportionment (party-id -> share), the union of all jurisdiction role tags on each actor, and the union of jurisdiction-specific flags, return side-by-side post-overlay shares for AU, EU, US, UK, CA (or a chosen subset) with the specific rules that fired in each, citation URLs, and a parties × jurisdictions matrix. v1 ships full implementations for AU and EU; US/UK/CA are research stubs marked `is_stub: true`. Use GET /api/v2/jurisdiction/catalog to discover support and stub status. Cost: 1 credit. Pure deterministic.

输入参数flags必填actors必填attributable必填jurisdictionsprimaryJurisdiction

evaluate_prospective_response

Deterministic prospective-evaluation gate (FK-METHOD-2026-006). Pass a ProposedAction BEFORE the agent delivers a response; receive one of three verdicts: 'allow', 'require_revision' (with specific factor-keyed directives), or 'block'. Uses the same four-factor engine that issues post-hoc certificates, so a single incident chains: prospective_pre_image -> response -> certificate -> anchor. This is a policy gate on structured action metadata, NOT a content safety classifier on raw prose. Thresholds are per-jurisdiction (EU strictest, US most permissive); read via GET /api/v2/gate/thresholds. Overrides are allowed but REQUIRE a governance rationale so the audit trail is complete. Cost: 1 credit. Pure deterministic.

输入参数action必填overrides

get_anchor_status

Return the index of all CausalLayer Tessera anchor batches, or one batch's full JSON (signed Merkle root, leaves, OpenTimestamps proof reference). FREE.

输入参数version

query_issuer_registry

Return the CausalLayer issuer registry, or one issuer record. The registry lists all trusted public-key fingerprints, key algorithms, validity windows, and the anchor-log repo for each active issuer. FREE — no API key required.

输入参数issuer_id

extract_incident

Claude-powered structured extractor. Parses unstructured text (news articles, court filings, emails, PDFs, incident reports, logs) into the typed JSON schema required by submit_incident. Returns a ready-to-submit incident object with extracted agents, events, severity, jurisdiction, and financial impact. NOTE: This is a pre-processing convenience tool — the deterministic scoring engine itself remains LLM-free. Cost: 10 credits.

输入参数text必填context_hintjurisdiction_hint

版本历史

1
  1. v0.2.0最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分