{"id":50157503,"url":"https://github.com/smq9sn5jck-coder/causallayer-mcp","last_synced_at":"2026-06-03T16:00:48.198Z","repository":{"id":358287870,"uuid":"1240782494","full_name":"smq9sn5jck-coder/causallayer-mcp","owner":"smq9sn5jck-coder","description":"🔐 Deterministic AI liability attribution engine. MCP server that generates cryptographically-signed CausalCertificates for AI incident forensics. EU AI Act Art.12 compliant.","archived":false,"fork":false,"pushed_at":"2026-05-30T11:00:28.000Z","size":845,"stargazers_count":1,"open_issues_count":23,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-30T11:23:13.639Z","etag":null,"topics":["ai-audit","ai-governance","ai-liability","ai-risk","ai-safety","bitcoin","causal-attribution","cloudflare-workers","compliance","deterministic","ed25519","eu-ai-act","eu-ai-liability-directive","insurtech","legal-tech","mcp","model-context-protocol","responsible-ai"],"latest_commit_sha":null,"homepage":"https://faultkey.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smq9sn5jck-coder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://faultkey.pages.dev/sponsor"]}},"created_at":"2026-05-16T15:06:17.000Z","updated_at":"2026-05-30T10:11:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/smq9sn5jck-coder/causallayer-mcp","commit_stats":null,"previous_names":["smq9sn5jck-coder/causallayer-mcp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/smq9sn5jck-coder/causallayer-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smq9sn5jck-coder%2Fcausallayer-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smq9sn5jck-coder%2Fcausallayer-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smq9sn5jck-coder%2Fcausallayer-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smq9sn5jck-coder%2Fcausallayer-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smq9sn5jck-coder","download_url":"https://codeload.github.com/smq9sn5jck-coder/causallayer-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smq9sn5jck-coder%2Fcausallayer-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33872298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-audit","ai-governance","ai-liability","ai-risk","ai-safety","bitcoin","causal-attribution","cloudflare-workers","compliance","deterministic","ed25519","eu-ai-act","eu-ai-liability-directive","insurtech","legal-tech","mcp","model-context-protocol","responsible-ai"],"created_at":"2026-05-24T13:00:32.267Z","updated_at":"2026-06-03T16:00:48.191Z","avatar_url":"https://github.com/smq9sn5jck-coder.png","language":"TypeScript","funding_links":["https://faultkey.pages.dev/sponsor"],"categories":["🔒 Security","📦 Other"],"sub_categories":[],"readme":"# FaultKey · CausalLayer MCP Server\n\n[![CI](https://github.com/smq9sn5jck-coder/causallayer-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/smq9sn5jck-coder/causallayer-mcp/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/smq9sn5jck-coder/causallayer-mcp/actions/workflows/codeql.yml/badge.svg)](https://github.com/smq9sn5jck-coder/causallayer-mcp/actions/workflows/codeql.yml)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/smq9sn5jck-coder/causallayer-mcp/badge)](https://scorecard.dev/viewer/?uri=github.com/smq9sn5jck-coder/causallayer-mcp)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![npm version](https://img.shields.io/npm/v/causallayer-mcp.svg)](https://www.npmjs.com/package/causallayer-mcp)\n[![Cloudflare Workers](https://img.shields.io/badge/Cloudflare-Workers-F38020?logo=cloudflare\u0026logoColor=white)](https://workers.cloudflare.com/)\n[![Model Context Protocol](https://img.shields.io/badge/MCP-Ready-green)](https://modelcontextprotocol.io/)\n[![Live Demo](https://img.shields.io/badge/demo-live-success)](https://mcp.faultkey.com/try)\n[![GitHub Stars](https://img.shields.io/github/stars/smq9sn5jck-coder/causallayer-mcp?style=flat\u0026logo=github)](https://github.com/smq9sn5jck-coder/causallayer-mcp/stargazers)\n[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![OpenAPI](https://img.shields.io/badge/OpenAPI-3.1-85ea2d?logo=openapiinitiative\u0026logoColor=white)](./openapi.yaml)\n[![security: ed25519](https://img.shields.io/badge/signing-Ed25519-181717)](./SECURITY.md)\n[![anchored: Bitcoin](https://img.shields.io/badge/anchor-Bitcoin%20%2B%20OpenTimestamps-f7931a?logo=bitcoin\u0026logoColor=white)](https://opentimestamps.org)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./demo.svg\" alt=\"FaultKey CausalLayer MCP — terminal demo showing liability attribution\" width=\"820\" /\u003e\n\u003c/p\u003e\n\n\u003e **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.\n\nThis is the official [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) 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.\n\n\u003e **If this saves you time, [give it a star](https://github.com/smq9sn5jck-coder/causallayer-mcp/stargazers)** — it helps others find it and tells us people care.\n\n## Live demo\n\n\u003e **🎮 [Try the Interactive Demo](https://mcp.faultkey.com/try)** — No setup required. Pick a scenario, click \"Run Analysis\", see real-time liability attribution.\n\nThe 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):\n\n- **Endpoint:** `https://mcp.faultkey.com/mcp` (live, custom domain) \n- **Mirror:** `https://causallayer-mcp-demo.zykm9qkk7j.workers.dev/mcp`\n- **Healthcheck:** [`/healthz`](https://mcp.faultkey.com/try)\n- **Demand telemetry:** [`/stats`](https://mcp.faultkey.com/stats) (public, aggregated, no PII)\n\n## Quick start\n\n### Claude Desktop\n\nAdd this to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"faultkey\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"causallayer-mcp\"]\n    }\n  }\n}\n```\n\nRestart Claude. Type *\"List the FaultKey tools.\"*\n\n### Cursor\n\nSettings → MCP Servers → Add new:\n\n- **Name:** `faultkey`\n- **Command:** `npx -y causallayer-mcp`\n\n### Cline / Continue / Windsurf\n\n```json\n{\n  \"name\": \"faultkey\",\n  \"command\": \"npx\",\n  \"args\": [\"-y\", \"causallayer-mcp\"]\n}\n```\n\n### Direct HTTP (no CLI)\n\n```bash\ncurl -X POST https://causallayer-mcp-demo.zykm9qkk7j.workers.dev/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":0,\"method\":\"initialize\",\"params\":{\"protocolVersion\":\"2024-11-05\",\"capabilities\":{},\"clientInfo\":{\"name\":\"test\",\"version\":\"0\"}}}'\n```\n\nThe response includes a `Mcp-Session-Id` header that you reuse for subsequent calls.\n\n## Tools\n\n| Tool | Description | Demo limit | Paid cost |\n|---|---|---|---|\n| `submit_incident` | Submit 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 / day | 50 credits |\n| `verify_certificate` | Independently verify a certificate (signature, Merkle integrity, issuer status) without calling FaultKey. | 50 / IP / day | 1 credit |\n| `get_anchor_status` | Return the index of all Tessera anchor batches or one batch's full JSON (signed Merkle root, OpenTimestamps proof reference). | Unlimited | Free |\n| `query_issuer_registry` | List all trusted CausalLayer issuer public-key fingerprints, status, and validity windows. | Unlimited | Free |\n\n## Why deterministic?\n\nInsurers, 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.\n\nThe 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`](https://github.com/smq9sn5jck-coder/causallayer-verifier) tool — no network calls back to the vendor.\n\n## Guardrails (enforced at the Cloudflare edge)\n\n1. **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).\n2. **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.\n3. **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`.\n\n## Self-hosting\n\nYou 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:\n\n```bash\ngit clone https://github.com/smq9sn5jck-coder/causallayer-mcp.git\ncd causallayer-mcp\npnpm install\npnpm wrangler kv namespace create LEDGER\n# paste the returned id into wrangler.jsonc\npnpm wrangler deploy\n```\n\nThe 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.\n\n## Architecture\n\n```\n[Claude/Cursor/Cline]  ←→  [npx causallayer-mcp]  ←→  [Cloudflare Worker]  ←→  [CausalLayer engine]\n                              (mcp-remote proxy)         (this repo)            (Fly.io Sydney)\n                                                              ↓\n                                                    [KV: credit ledger]\n                                                    [DO: per-session state]\n                                                    [KV: telemetry buffer]\n```\n\n- **Transport:** Streamable HTTP (per the 2024-11-05 MCP spec — SSE is deprecated)\n- **Session state:** Cloudflare Durable Object (`CausalLayerMCP`), SQLite-backed\n- **Billing:** Cloudflare KV ledger, Stripe Checkout webhook, optional x402 USDC fallback\n- **Demo:** Per-IP daily counter in KV, deterministic fixture responses with `[DEMO]` watermark\n- **Latency:** p50 ≈ 60 ms (cold), 25 ms (warm) on Cloudflare's 300+ POPs\n\n## Pricing\n\n| Tier | Credits | $AUD | Notes |\n|---|---|---|---|\n| Demo | 5 incidents / IP / day | Free | Watermarked responses |\n| Starter | 1,000 | $99 | Stripe Checkout, no SLA |\n| Growth | 10,000 | $749 | + 50 verify, 99.5% SLA |\n| Enterprise | Unmetered | Contact | + dedicated namespace, 99.95% SLA, audit log access |\n\nFor enterprise tenants email **sales@faultkey.com** (or open a GitHub issue with subject \"enterprise inquiry\").\n\n## Interactive Tools\n\n\u003e **Score any AI incident in seconds** — [faultkey.com/score](https://faultkey.com/score) — describe what happened, get a deterministic liability split with dollar exposure, jurisdiction analysis, and a shareable verdict card.\n\u003e\n\u003e **Compare vendor liability profiles** — [faultkey.com/compare](https://faultkey.com/compare) — side-by-side comparison of AI vendors (OpenAI vs Anthropic vs Google etc.) across incident types.\n\u003e\n\u003e **Public accuracy ledger** — [faultkey.com/track-record](https://faultkey.com/track-record) — 7/7 direction match on backtested cases, 3 pending predictions on active litigation.\n\n## License\n\nApache 2.0. See [LICENSE](./LICENSE).\n\n## Support the Project\n\nIf FaultKey helped you understand AI liability, saved you research time, or you just think deterministic fault attribution should exist:\n\n- **⭐ Star this repo** — [github.com/smq9sn5jck-coder/causallayer-mcp](https://github.com/smq9sn5jck-coder/causallayer-mcp/stargazers) (takes 2 seconds, helps others find it)\n- **Share it** — post on LinkedIn, X, or your team Slack\n- **Score an incident** — [faultkey.com/score](https://faultkey.com/score)\n- **Compare vendors** — [faultkey.com/compare](https://faultkey.com/compare)\n- **Join the discussion** — [GitHub Discussions](https://github.com/smq9sn5jck-coder/causallayer-mcp/discussions)\n\n## Built in Brisbane\n\nFaultKey is built in Brisbane, Australia, with data residency in Sydney for APRA-regulated buyers. The team can be reached at hello@faultkey.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmq9sn5jck-coder%2Fcausallayer-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmq9sn5jck-coder%2Fcausallayer-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmq9sn5jck-coder%2Fcausallayer-mcp/lists"}