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 分