Swiss Case Law

956k Swiss court decisions: full-text search, citation graph, statute lookup (DE/FR/IT)

13MITdevtools

Install

Config snippet generator goes here (5 client tabs)

README

# Swiss Case Law Open Dataset

**962,724 published decisions from Swiss federal, cantonal, and regulatory bodies.**

Full text, structured metadata, and daily updates. The March 20, 2026 snapshot contains German, French, and Italian decisions; the export schema also reserves `rm` for Romansh.

[![CI](https://github.com/jonashertner/caselaw-repo-1/actions/workflows/ci.yml/badge.svg)](https://github.com/jonashertner/caselaw-repo-1/actions/workflows/ci.yml)
[![Dashboard](https://img.shields.io/badge/Dashboard-live-d1242f)](https://opencaselaw.ch)
[![HuggingFace](https://img.shields.io/badge/HuggingFace-dataset-blue)](https://huggingface.co/datasets/voilaj/swiss-caselaw)
[![Data License: CC0--1.0](https://img.shields.io/badge/Data_License-CC0--1.0-blue.svg)](https://creativecommons.org/publicdomain/zero/1.0/)
[![Code License: MIT](https://img.shields.io/badge/Code_License-MIT-green.svg)](LICENSE)

---

## What this is

A structured, searchable archive of Swiss court decisions — from the Federal Supreme Court (BGer) down to cantonal courts in all 26 cantons. Every decision includes the full decision text, docket number, date, language, legal area, judges, cited decisions, and 20+ additional metadata fields.

The dataset is built by direct scraping of official court websites and cantonal court portals. New decisions are scraped, deduplicated, and published every night.

There are seven ways to use it, depending on what you need:

| Method | For whom | What you get |
|--------|----------|-------------|
| [**Search with AI**](#1-search-with-ai) | Lawyers, researchers | Natural-language search in Claude, ChatGPT, or Gemini — instant access, no download |
| [**Citation Analysis**](#citation-graph-tools) | Legal scholars | Leading cases, citation networks, appeal chains, jurisprudence trends |
| [**Statute Lookup**](#statute-lookup-tools) | Legal professionals | Full article text from 40+ federal laws (OR, ZGB, StGB, BV, ...) |
| [**Legislation Search**](#legislation-tools) | Legal professionals | Search 33,000+ federal and cantonal legislative texts via LexFind.ch |
| [**Download**](#2-download-the-dataset) | Data scientists, NLP researchers | Bulk Parquet files with all 962K+ decisions |
| [**REST API**](#3-rest-api) | Developers | Programmatic row-level access, no setup |
| [**Web UI**](#4-web-ui) | Everyone | Chat interface — ask questions, get answers with cited decisions |

> **Not sure where to start?** Connect to the [remote MCP server](#option-a-remote-server-recommended) — works with Claude, ChatGPT, and Gemini CLI. Instant access to all 962K+ decisions, citation analysis, statute lookup, legislation search, and education tools, no download needed.

---

## 1. Search with AI

The dataset comes with an [MCP server](https://modelcontextprotocol.io) whose exact tool surface is deployment-dependent. Local deployments can expose up to 21 tools; remote mode omits local update tools, and legislation tools depend on LexFind-backed configuration. You ask a question in natural language; the tool runs a full-text search and returns matching decisions with snippets.

### Remote vs. local

|  | Remote | Local |
|---|---|---|
| **Setup** | 30 seconds | 30–60 minutes |
| **Disk** | None | ~65 GB |
| **Tools** | Deployment-dependent; no local update tools | Up to 21, including `update_database` and `check_update_status` |
| **Freshness** | Nightly (automatic) | Manual |
| **Offline** | No | Yes |
| **Requires** | Claude, ChatGPT, or Gemini CLI (see plans below) | Any MCP client |

> Start with the remote server. Switch to local only if you need offline access.

### Option A: Remote server (recommended)

Connect directly to the hosted MCP server — no data download, no local database, instant access to 962K+ decisions.

**Claude.ai / Claude Desktop** (easiest):

1. Open **Settings** → **Connectors**
2. Click **"Add custom connector"**
3. Paste `https://mcp.opencaselaw.ch`
4. Click **Add**

Same steps in the browser (claude.ai) and the desktop app. No Node.js, no config files, no downloads.

> Available on Pro, Max, Team, and Enterprise plans. For the free plan, use Claude Code or the [manual JSON config](#alternative-manual-json-config-if-custom-connectors-arent-available).

**Claude Code:**

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

<details>
<summary>Alternative: manual JSON config (if custom connectors aren't available)</summary>

Add to `claude_desktop_config.json` ([Node.js](https://nodejs.org) required):

```json
{
  "mcpServers": {
    "swiss-caselaw": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.opencaselaw.ch"]
    }
  }
}
```

Restart Claude Desktop after saving.

</details>

**ChatGPT:**

1. Open **Settings** → **Apps** → **Advanced settings** → enable **Developer mode**
2. Click **Create app** → name it `Swiss Caselaw`, paste `https://mcp.opencaselaw.ch/sse`, auth: None
3. In any chat: click **+** → **Developer mode** → select **Swiss Caselaw*