ch-legal-mcp
# Switzerland Legal Research MCP Server (`ch-legal-mcp`)
**[Deutsch](#lang-de) | [Français](#lang-fr) | [Italiano](#lang-it) | [English Documentation](#english-documentation)**
---
<a id="lang-de"></a>
## Rechts- und Rechtsprechungs-MCP-Server (`ch-legal-mcp`) — Deutsch
### Über dieses Repository
Dieses Repository stellt einen Model Context Protocol (MCP) Server bereit, der Ihre KI-Anwendung (Claude Desktop, Cursor, Windsurf, VS Code / Copilot, Cline, Continue.dev oder Antigravity) direkt mit den amtlichen Gesetzesportalen und den mehrstufigen Rechtsprechungsdatenbanken für **Switzerland** (1. Instanz, Berufungs-/Kantons-/Oberlandesgerichte sowie Höchst- und Verfassungsgerichte) verbindet.
### Installation (Auswahl Ihrer KI-Anwendung)
1. **Herunterladen:** Klicken Sie oben rechts auf **`<> Code` -> `Download ZIP`** und entpacken Sie das Archiv auf Ihrem Computer.
2. **Installationsassistent starten:** Doppelklicken Sie auf **`Click_Here_To_Install_Windows.bat`** (Windows) oder **`Click_Here_To_Install_Mac.command`** (macOS).
3. **KI-Programm auswählen:** Wählen Sie im Fenster die von Ihnen genutzten KI-Programme aus (Claude, Cursor, Windsurf, VS Code, Antigravity), klicken Sie auf Installieren und starten Sie Ihre KI-Anwendung neu.
**Sicherheitshinweis:** Das Installationsprogramm arbeitet vollständig im Nur-Lese-Modus (Read-Only) und greift auf keinerlei persönliche Dateien auf Ihrem System zu.
### Gerichtsinstanzen und amtliche Datenquellen
| Instanz | Abgedeckte Gerichte |
|:---|:---|
| **1. Instanz (Eingangsgerichte)** | Bezirksgerichte / Tribunaux de district / Preture & First-Instance Administrative Authorities across 26 Cantons |
| **2. Instanz (Kantons-, Ober- und Berufungsgerichte)** | 26 Cantonal Supreme & Appellate Courts (Obergerichte / Kantonsgerichte / Tribunaux cantonaux) & Federal Courts (BVGer, BStGer, BPatGer) |
| **3. Instanz (Höchst- und Verfassungsgerichte)** | Schweizerisches Bundesgericht / Tribunal fédéral / Tribunale federale (BGer / TF — bger.ch) |
- **Fedlex - Swiss Federal Legislation API (fedlex.admin.ch):** [https://www.fedlex.admin.ch](https://www.fedlex.admin.ch) (`fedlex.admin.ch`, `admin.ch`)
- **Entscheidsuche.ch Unified Federal & 26-Canton Case Law Aggregator + BGer Eurospider:** [https://entscheidsuche.ch](https://entscheidsuche.ch) (`bger.ch`, `entscheidsuche.ch`, `bvger.ch`, `bstger.ch`)
---
<a id="lang-fr"></a>
## Serveur MCP de Législation et Jurisprudence (`ch-legal-mcp`) — Français
### À propos de ce dépôt
Ce dépôt fournit un serveur Model Context Protocol (MCP) reliant directement votre application d'intelligence artificielle (Claude Desktop, Cursor, Windsurf, VS Code / Copilot, Cline, Continue.dev ou Antigravity) aux portails législatifs officiels et aux bases de jurisprudence multi-niveaux pour **Switzerland** (juridictions de première instance, tribunaux cantonaux / cours d'appel et juridictions suprêmes ou constitutionnelles).
### Installation rapide (Sélection de votre client IA)
1. **Téléchargement :** Cliquez sur **`<> Code` -> `Download ZIP`** en haut à droite et extrayez le dossier sur votre ordinateur.
2. **Lancement de l'assistant :** Double-cliquez sur **`Click_Here_To_Install_Windows.bat`** (Windows) ou **`Click_Here_To_Install_Mac.command`** (macOS).
3. **Choix de l'application IA :** Cochez les applications IA que vous utilisez (Claude, Cursor, Windsurf, VS Code, Antigravity), lancez l'installation automatique et redémarrez votre application IA.
**Note de sécurité :** L'utilitaire fonctionne exclusivement en lecture seule (read-only) et n'accède à aucun fichier personnel sur votre ordinateur.
### Hiérarchie juridictionnelle et sources officielles
| Degré de juridiction | Juridictions couvertes |
|:---|:---|
| **1er degré (Première instance)** | Bezirksgerichte / Tribunaux de district / Preture & First-Instance Administrative Authorities across 26 Cantons |
| **2nd degré (Juridictions cantonales, régionales et cours d'appel)** | 26 Cantonal Supreme & Appellate Courts (Obergerichte / Kantonsgerichte / Tribunaux cantonaux) & Federal Courts (BVGer, BStGer, BPatGer) |
| **Juridictions suprêmes et constitutionnelles** | Schweizerisches Bundesgericht / Tribunal fédéral / Tribunale federale (BGer / TF — bger.ch) |
- **Fedlex - Swiss Federal Legislation API (fedlex.admin.ch):** [https://www.fedlex.admin.ch](https://www.fedlex.admin.ch) (`fedlex.admin.ch`, `admin.ch`)
- **Entscheidsuche.ch Unified Federal & 26-Canton Case Law Aggregator + BGer Eurospider:** [https://entscheidsuche.ch](https://entscheidsuche.ch) (`bger.ch`, `entscheidsuche.ch`, `bvger.ch`, `bstger.ch`)
---
<a id="lang-it"></a>
## Server MCP di Legislazione e Giurisprudenza (`ch-legal-mcp`) — Italiano
### Informazioni su questo repository
Questo repository fornisce un server Model Context Protocol (MCP) che collega la vostra applicazione IA (Claude Desktop, Cursor, Windsurf, VS Code / Copilot, Cline, Continue.dev o Antigravity) direttamente ai portali legislativi ufficiali e alle banche dati giurisprudenziali per **Switzerland** (tribunali di primo grado, tribunali cantonali / corti d'appello e corti supreme o costituzionali).
### Installazione rapida (Selezione del client IA)
1. **Download:** Fare clic su **`<> Code` -> `Download ZIP`** ed estrarre la cartella sul computer.
2. **Avvio:** Fare doppio clic su **`Click_Here_To_Install_Windows.bat`** (Windows) o **`Click_Here_To_Install_Mac.command`** (macOS).
3. **Scelta dell'applicazione IA:** Selezionare i programmi IA utilizzati (Claude, Cursor, Windsurf, VS Code, Antigravity), avviare l'installazione e riavviare il client IA selezionato.
**Nota sulla sicurezza:** Lo strumento opera esclusivamente in sola lettura e non accede ai file personali presenti sul computer.
### Gradi di giudizio e fonti ufficiali
| Grado di giudizio | Organi giudiziari coperti |
|:---|:---|
| **Primo grado (Tribunali di prima istanza)** | Bezirksgerichte / Tribunaux de district / Preture & First-Instance Administrative Authorities across 26 Cantons |
| **Secondo grado (Tribunali cantonali / Corti d'Appello)** | 26 Cantonal Supreme & Appellate Courts (Obergerichte / Kantonsgerichte / Tribunaux cantonaux) & Federal Courts (BVGer, BStGer, BPatGer) |
| **Corti Supreme e Costituzionali** | Schweizerisches Bundesgericht / Tribunal fédéral / Tribunale federale (BGer / TF — bger.ch) |
- **Fedlex - Swiss Federal Legislation API (fedlex.admin.ch):** [https://www.fedlex.admin.ch](https://www.fedlex.admin.ch) (`fedlex.admin.ch`, `admin.ch`)
- **Entscheidsuche.ch Unified Federal & 26-Canton Case Law Aggregator + BGer Eurospider:** [https://entscheidsuche.ch](https://entscheidsuche.ch) (`bger.ch`, `entscheidsuche.ch`, `bvger.ch`, `bstger.ch`)
---
<a id="english-documentation"></a>
## English Documentation
Model Context Protocol (MCP) server providing live, read-only access to **Switzerland (CH)** legislation, official gazettes, multi-tier judicial decisions (First Instance, Regional/Cantonal/Appellate, and Supreme/Constitutional courts, including HTML and PDF full-text extraction), and statutory citation verification across all major AI clients (**ChatGPT Desktop, OpenAI Codex CLI, Claude Desktop, Claude Code CLI, Cursor, Windsurf, VS Code / GitHub Copilot / Cline / Roo Code, Google Antigravity / Gemini CLI, Perplexity, and Continue.dev**).
---
### Interactive Desktop Setup (Select Your AI Assistant)
This package includes a graphical installer for legal practitioners and non-technical users that lets you select which AI application(s) you use:
1. **Download:** Click **`<> Code`** at the top right of this repository, select **`Download ZIP`**, and extract the folder to your computer.
2. **Run the Setup Utility:**
- **Windows:** Double-click `Click_Here_To_Install_Windows.bat`
- **macOS:** Double-click `Click_Here_To_Install_Mac.command`
3. **Select Your AI Client(s) & Connect:** Check the box(es) for the AI assistant(s) installed on your computer (**ChatGPT Desktop & OpenAI Codex CLI**, **Claude Desktop & Claude Code CLI**, **Cursor**, **Windsurf**, **VS Code / GitHub Copilot / Cline / Roo Code**, **Google Antigravity / Gemini CLI**, or **Perplexity / Continue.dev**), click **Install to Selected AI Clients**, and restart your selected AI application.
**System Integrity Note:** The setup utility operates strictly in read-only mode with respect to your personal files and documents. It installs an isolated Python runtime inside the extracted folder and registers the server entry only in the AI client configuration files you select.
---
### Multi-Tier Judicial Hierarchy & Live Indexed National Archives
This server performs live queries across the full judicial hierarchy and official legal archives of **Switzerland**, extracting full text from both HTML pages and official court/gazette PDF judgments:
| Judicial Tier | Covered Courts & Tribunals |
|:---|:---|
| **Tier 1 — First Instance** | Bezirksgerichte / Tribunaux de district / Preture & First-Instance Administrative Authorities across 26 Cantons |
| **Tier 2 — Regional / Cantonal / Appellate** | 26 Cantonal Supreme & Appellate Courts (Obergerichte / Kantonsgerichte / Tribunaux cantonaux) & Federal Courts (BVGer, BStGer, BPatGer) |
| **Tier 3 — Supreme & Constitutional** | Schweizerisches Bundesgericht / Tribunal fédéral / Tribunale federale (BGer / TF — bger.ch) |
#### Official Portals & Live Indexed Domains
- **National Legislation & Official Gazette:** Fedlex - Swiss Federal Legislation API (fedlex.admin.ch) — [https://www.fedlex.admin.ch](https://www.fedlex.admin.ch)
- *Indexed Legislation Domains:* `fedlex.admin.ch`, `admin.ch`
- **Court Decisions & Jurisprudence Archives:** Entscheidsuche.ch Unified Federal & 26-Canton Case Law Aggregator + BGer Eurospider — [https://entscheidsuche.ch](https://entscheidsuche.ch)
- *Indexed Judicial & Open Case Law Domains:* `bger.ch`, `entscheidsuche.ch`, `bvger.ch`, `bstger.ch`
---
### Available MCP Tools
| Tool | Description |
|:---|:---|
| `search_legislation` | Searches enacted statutes, codes, decrees, and official gazette publications in Switzerland. |
| `search_case_law` | Searches national jurisprudence and open judicial archives for Switzerland. |
| `search_tiered_court_decisions` | Filters case law specifically by judicial instance (`first_instance`, `appellate_regional`, `supreme_constitutional`) or specific regional/cantonal/district court. |
| `list_court_hierarchy` | Returns the complete 3-tier court structure and supported regional court filters for Switzerland. |
| `get_legal_document_markdown` | Retrieves full statutory or judicial texts (both HTML and official `.pdf` court judgments) and converts them into clean Markdown. |
| `verify_citation` | Validates statutory and case law citations against official registries. |
---
<details>
<summary><b>Manual Configuration for Developers (Optional)</b></summary>
```json
{
"mcpServers": {
"ch-legal-mcp": {
"command": "uvx",
"args": [
"--from",
"https://github.com/jurisatlas/ch-legal-mcp/archive/refs/heads/main.zip",
"ch-legal-mcp"
]
}
}
}
```
</details>
TDQS
Scored across 6 tools
Two pairs overlap heavily: search_case_law (general Swiss court decisions via Entscheidsuche) and search_tiered_court_decisions (the same domain filtered by judicial tier) are hard to distinguish without reading carefully, and search_legislation vs get_legal_document_markdown both retrieve legislation content but differ by query vs identifier. verify_citation and list_court_hierarchy are clearly distinct.
All names are snake_case with a predictable verb_noun structure (get_, search_, verify_, list_). Minor deviation: search_case_law and search_tiered_court_decisions are both search-prefixed but name the same concept differently, though overall consistency is good.
Six tools is a reasonable, well-scoped set for a legal research server covering search, retrieval, verification, and hierarchy listing. It is slightly thin—no tools for listing recent decisions or date filtering—but each tool earns its place.
Core retrieval, search, and verification are covered, but there are notable gaps: no way to fetch a decision directly by ECLI/official identifier (only URL), no citation formatting/export, and no tool for browsing cantonal legislation subsites. Workable but missing lifecycle conveniences.