CausalLayer MCP

io.github.smq9sn5jck-coderPublished by GitHub account smq9sn5jck-coderv0.4.0Updated Nov 2, 2026

Deterministic AI liability attribution with Bitcoin-anchored proof certificates.

VerifiedStreamable HTTPWeb executableFinanceSecurity & MonitoringAI & ML

Overview

AI-generated overview

FaultKey CausalLayer MCP issues signed, Bitcoin-anchored certificates allocating fault among parties in multi-party AI incidents, and verifies them.

What you can do
  • Submit incidents or OpenTelemetry traces and receive a signed CausalCertificate with per-agent liability shares, evidence-chain completeness and regulatory mapping
  • Verify certificates by signature, Merkle integrity and issuer status, or re-derive them byte-for-byte from canonical input
  • Simulate remediation counterfactuals and compute multi-jurisdiction overlay shares (AU, EU, US, UK, CA)
  • Gate a proposed agent action before delivery with an allow, require_revision or block verdict
  • Extract structured incident objects from unstructured text such as reports, filings or logs
  • Inspect the anchor-batch log and the trusted issuer registry
When to use it
Useful when you need a reproducible, third-party-verifiable allocation of fault or financial exposure after an AI system causes harm, or a pre-delivery check on a proposed agent action. Also fits teams preparing incident evidence for insurers, auditors or regulators.
Requirements
Either the remote streamable HTTP endpoint or the local npm package causallayer-mcp run via npx (Node.js). No authentication is declared for the public demo, which is rate-limited per IP. Paid use requires credits purchased through Stripe Checkout, and the upstream engine is available via API key; self-hosting needs a Cloudflare account and KV namespace.
Before you install
Submitting an incident costs 50 credits and verification 1 credit, so calls can spend money; the demo tier is capped per IP per day and returns watermarked responses. Incident payloads are sent to a third-party service and regex-scanned for PII, and are rejected unless pii_acknowledged is set, which is logged in the certificate. Certificates can be anchored to Bitcoin, and issuer trust depends on the registry.

Installation

In SourceWeft

  1. Open CausalLayer MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.smq9sn5jck-coder%2Fcausallayer/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "causallayer": {
      "type": "http",
      "url": "https://mcp.faultkey.com/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].

Source: README.md at commit e52536c

Tools

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.

Parameterstitlerequiredagentsrequiredeventsrequiredcategorycurrencyseveritydescriptionjurisdictionpii_acknowledgeddeterministic_onlyrequiredfinancial_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.

Parameterscertificaterequired

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.

ParameterscertificaterequiredcanonicalInputrequired

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).

Parametersotlprequiredtitlerequiredcategorycurrencyjurisdictionpii_acknowledgeddeterministic_onlyrequiredfinancial_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.

ParametersagentsrequiredverdictrequiredremediationsrequiredfourFactorScoringrequired

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.

ParametersflagsrequiredactorsrequiredattributablerequiredjurisdictionsprimaryJurisdiction

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.

Parametersactionrequiredoverrides

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.

Parametersversion

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.

Parametersissuer_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.

Parameterstextrequiredcontext_hintjurisdiction_hint

Version history

1
  1. v0.4.0LatestSep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts