opencaselaw.ch
971’067 published Swiss court decisions

Every published Swiss court decision, every federal article, every cited authority — accessible to AI in one URL.

mcp.opencaselaw.ch · works in Claude, ChatGPT, Cursor, Gemini and Copilot Studio · also via REST and bulk download.

As of · +0 since yesterday

Corpus snapshot

As of · +0 since yesterday

Legislation

+0 24h
laws locally indexed
Federal (Fedlex mirror)
Cantonal (19 portals + LexFind, 26 cantons)
Articles indexed
  • Fedlex SPARQL · 19 cantonal portals · LexFind fallback · FTS5 local

Graph & doctrine

+0 24h
resolved case-citation edges
Statute links
Scholarly commentaries
Languages DE · FR · IT
  • OnlineKommentar.ch
New since yesterday

Verification — eliminating AI hallucination of case references

Large language models hallucinate. Peer-reviewed measurement (Dahl, Magesh, Suzgun & Ho, Large Legal Fictions, Stanford RegLab, 2024 — Journal of Legal Analysis) found that 58–82 % of legal queries to general-purpose LLMs produced at least one fabricated authority. A follow-up study of commercial legal-RAG tools (Magesh et al., Hallucination-Free?, Stanford RegLab, 2024) measured 17–33 % — better, but still routine. In Swiss legal practice, citing an authority that does not exist or does not say what is claimed exposes a lawyer to professional discipline and a client to a wrong outcome. Comprehension of what the AI is providing and what the source is is therefore not a nicety — it is the precondition for any responsible use of AI in legal work.

OpenCaseLaw treats this as the central problem to solve. The MCP server below the user-facing search is built around a six-layer architecture whose only purpose is to make every case reference an AI writes verifiable in one click — by the user, in real time, against the original source.

L0

Corpus integrity

971,067 verified Swiss decisions, every decision_id a deterministic hash of court + normalised docket. There is no canonical reference outside this database. A citation either resolves to a real entry or it does not — no fuzzy fallback, no inference.

L1

Server-built citations

Every search result, detail view and lookup carries pre-baked citation_string_de / fr / it + canonical_url built by a single server function that encodes per-court Swiss conventions. The LLM is never given the choice of formatting a citation itself — it copies the canonical string verbatim or it does not cite.

L2

Operating contract (R1–R7)

Seven non-negotiable rules embedded in the MCP server's instructions, sent to every connecting client (Claude, ChatGPT, Cursor, Gemini). Forbid hand-built citations, hand-quoted text, statute claims from memory, speculation about legislative intent, and bare references without a clickable link to the source.

L3

Independent reasoning judge

check_claim_support sends the verbatim Erwägung text and the user's claim to a different model family (Sonnet) than the one running retrieval (Haiku) — so retrieval errors are not re-introduced in verification. Returns supports / contradicts / partial with a reasoned excerpt. This is the defence against the hardest hallucination class: real citation, wrong proposition.

L4

Closing audit (mandatory)

attest_response runs up to five audits over the LLM's draft before it leaves the server: (1) every BGE / BGer / BVGer / BStGer / BPatGer / MKGE reference exists in the corpus and any pinpoint resolves; (2) every Art. X LAW reference resolves in the Fedlex mirror; (3) every "…"-quoted substring appears verbatim in a cited source; (4) any vom DD.MM.YYYY matches the stored decision date; (5) opt-in grounding rail — for each verified citation, the preceding claim sentence is sent to an independent Sonnet judge alongside the cited Erwägung, which decides whether the source supports the proposition. Closes the "reasoning error" class identified by Butler & Butler, Legal RAG Bench (Isaacus, Mar 2026): citation real, source retrieved, proposition unsupported. Returns each citation marked ✓ or ⚠ plus a linked_text ready to send verbatim.

L5

Click-through verification

Every reference must be a Markdown link to mcp.opencaselaw.ch/entscheid/<id>. The user can verify any citation in one click — no need to search a database, no need to trust the AI, no need to take the source on faith. The Word add-in inserts citations as Word hyperlinks directly into the document so the document itself remains verifiable after handoff.

Our objective

To become the gold standard — open source, open access — for verification of AI output in Swiss case-law research. The architecture above is published under MIT, the corpus under CC0; every layer is inspectable, reproducible and auditable. We invite courts, bar associations, academic researchers and AI providers to verify the mechanism, contribute improvements, and adopt the verification surface in their own tools.

Source: mcp_server.py · Repository · Institutional collaboration

Connect

Pick your AI client. Paste the URL. Done.

  1. Open Claude.ai or Claude Desktop → SettingsConnectorsAdd custom connector.
  2. Paste this URL:
https://mcp.opencaselaw.ch
  1. Click Add. The 31 tools appear immediately.

Then ask: "Find Federal Supreme Court decisions on Art. 41 OR with the keyword Schadenersatz."

Pro / Max / Team / Enterprise plan needed for the Connectors UI. Free Claude users: see the Claude Code tab.

  1. SettingsAppsAdvanced settings → enable Developer mode.
  2. Click Create app, name it "Swiss Caselaw", paste this URL (auth: None):
https://mcp.opencaselaw.ch/sse
  1. In any chat: +Developer mode → select Swiss Caselaw.

Plus / Pro / Team / Enterprise / Edu plans. Best with GPT-5.3 (5.4 currently does not invoke MCP tools).

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "swiss-caselaw": { "url": "https://mcp.opencaselaw.ch" }
  }
}

Restart Cursor. The 31 tools appear under swiss-caselaw.

Add to ~/.gemini/settings.json:

{
  "mcpServers": {
    "swiss-caselaw": { "url": "https://mcp.opencaselaw.ch" }
  }
}

Restart Gemini CLI. Free — no plan required.

Single CLI command (works on the Claude Code free tier):

claude mcp add swiss-caselaw --transport sse https://mcp.opencaselaw.ch

No restart needed. The 31 tools are immediately invocable.

  1. Open Microsoft Copilot Studio → your agent → ToolsAdd a toolNew toolCustom connector.
  2. In Power Apps "New custom connector" → Import an OpenAPI from URL, paste:
https://mcp.opencaselaw.ch/api/openapi.json
  1. Authentication: No authentication. Save → Update connector.
  2. Back in Copilot Studio: Add tool → pick the new Swiss Case Law connector. The 30 REST routes (search, decisions, legislation, citations, doctrine, …) are now callable from your agent.

Spec is OpenAPI 3.0.3, WADL-converter clean (validated 2026-04-25 with LALIVE). M365 Copilot agents and Power Platform flows can both use the same connector.

30-route REST API. OpenAPI 3.0.3 spec at:

https://mcp.opencaselaw.ch/api/openapi.json

Interactive Swagger UI →

Or call directly:

curl -X POST https://mcp.opencaselaw.ch/api/search_decisions \
  -H "Content-Type: application/json" \
  -d '{"query":"Art. 41 OR Schadenersatz","limit":5}'

Practitioner toolkit

Beyond the AI clients above: every decision is exportable as Word, BibTeX, or RIS. Every court has an Atom feed. The whole corpus is on Hugging Face. Everything CC0.

For international counsel

Swiss law touches every cross-border matter that involves a Swiss party, asset, employment relationship, or contract clause. OpenCaseLaw makes the published case-law of every Swiss federal and cantonal court available to the AI tools your team already uses — without procurement, without seat licences, without non-Swiss jurisdiction concerns.

Multilingual coverage

Decisions in DE, FR and IT, with official Regeste head-notes. The leading case on a topic may be in any of the three languages — search returns all of them ranked by relevance, regardless of query language.

Comparable scope

971,067 decisions across 108 courts, 1875 to today. Comparable to the Swiss case-law coverage of Westlaw, Swisslex and Weblaw. Free, CC0 licensed.

Strasbourg jurisprudence

Swiss-respondent ECtHR judgments from HUDOC, plus general Grand Chamber, Chamber and Committee decisions. Indispensable for human-rights and Convention-grounded practice.

Procurement-free integration

MCP endpoint, OpenAPI 3.0.3 REST, or Hugging Face bulk download. Works with Claude, ChatGPT, Cursor, Gemini, Copilot Studio. No vendor onboarding, no per-seat licensing, no minimum commitment.

Contact for institutional collaboration → team@jonashertner.com

Latest

Recent Federal Supreme Court decisions

View all →

    Upcoming federal statute revisions

    View all →

      Notable

      Six facts intrinsic to the published Swiss legal corpus — independent of when we scraped them.

      Most-cited decision

      Most-cited statute article

      Oldest decision in the corpus

      Three-language coverage

      Citation graph size

      Head-note coverage

      Live from the corpus

      Concrete examples of what your AI agent sees when it hits the MCP server.

      Tool call
      get_doctrine(
        query="Art. 41 OR"
      )
      Response

      Art. 41 OR — Ausservertragliche Haftung

      Statute text (DE/FR/IT) plus 12 authority-ranked BGEs spanning 1957–2024 and a doctrinal timeline.

      Commentary excerpt:
      „Die Tatbestandsvoraussetzungen der ausservertraglichen Haftung umfassen Schaden, Kausalität, Widerrechtlichkeit und Verschulden…“

      Source: OnlineKommentar.ch · CC-BY-4.0

      About

      OpenCaseLaw collects, deduplicates and publishes every published Swiss court decision, the current text of every relevant federal statute, and the cantonal legislation of all 26 cantons. The dataset is refreshed daily and released under CC0 (data) and MIT (code).

      The same infrastructure powers a public Model Context Protocol server that exposes 24 specialised tools for Swiss legal research — full-text search, citation graph, appeal-chain resolution, statute lookup, doctrinal timelines, scholarly commentary, legislative materials. Open access, no API keys.

      Built and maintained by Jonas Hertner, on the public infrastructure of the Federal Supreme Court, entscheidsuche.ch, Fedlex, LexFind, OnlineKommentar.ch and OpenLegalCommentary.ch. Contributors and institutional collaboration: CONTRIBUTORS.md · team@jonashertner.com.

      Contributors