Metadata-Version: 2.4
Name: swiss-courts-mcp
Version: 0.1.0
Summary: MCP Server for Swiss court decisions via entscheidsuche.ch — BGer, BVGer, BStGer + 26 cantonal courts
Project-URL: Homepage, https://github.com/malkreide/swiss-courts-mcp
Project-URL: Repository, https://github.com/malkreide/swiss-courts-mcp
Project-URL: Issues, https://github.com/malkreide/swiss-courts-mcp/issues
Project-URL: Data Source, https://entscheidsuche.ch
Author: Schulamt Stadt Zürich
License: MIT License
        
        Copyright (c) 2025 Malkreide
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: bundesgericht,claude,court-decisions,entscheidsuche,jurisprudence,llm,mcp,model-context-protocol,rechtsprechung,swiss-law,swiss-open-data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: General
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp[cli]>=1.3.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# swiss-courts-mcp

MCP-Server für Schweizer Gerichtsentscheide via [entscheidsuche.ch](https://entscheidsuche.ch).

Aggregiert Urteile des **Bundesgerichts (BGer)**, **Bundesverwaltungsgerichts (BVGer)**, **Bundesstrafgerichts (BStGer)** und **kantonaler Gerichte** aller 26 Kantone.

## Synergie mit fedlex-mcp

Kombiniert mit [fedlex-mcp](https://github.com/malkreide/fedlex-mcp) ergibt sich eine vollständige Rechtsrecherche:

| Server | Funktion | Beispiel |
|--------|----------|----------|
| **fedlex-mcp** | Gesetzestext (SR) | `fedlex_search_laws("Datenschutz")` |
| **swiss-courts-mcp** | Rechtsprechung | `search_by_law_reference("Art. 25 DSG")` |

## Tools

| Tool | Beschreibung |
|------|-------------|
| `search_court_decisions` | Volltextsuche in allen Gerichtsentscheiden |
| `get_court_decision` | Einzelnes Urteil anhand der Signatur abrufen |
| `search_bger_decisions` | Bundesgerichtsentscheide gezielt suchen |
| `search_by_law_reference` | Entscheide zu einem Gesetzesartikel finden |
| `list_courts` | Verfügbare Gerichte auflisten |
| `get_recent_decisions` | Neueste Entscheide abrufen |
| `get_decision_statistics` | Statistiken über indexierte Entscheide |

## Installation

```bash
# Aus dem Repository
git clone https://github.com/malkreide/swiss-courts-mcp.git
cd swiss-courts-mcp
pip install -e ".[dev]"
```

## Claude Desktop Konfiguration

In `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "swiss-courts": {
      "command": "python",
      "args": ["-m", "swiss_courts_mcp"],
      "env": {}
    }
  }
}
```

## Nutzung

### Volltextsuche
```
Suche nach Gerichtsentscheiden zum Thema "Datenschutz" im Kanton Zürich
→ search_court_decisions(query="Datenschutz", canton="ZH")
```

### Praxis zu Gesetzesartikel
```
Finde Urteile die Art. 8 BV (Rechtsgleichheit) zitieren
→ search_by_law_reference(law_reference="Art. 8 BV")
```

### Bundesgericht
```
Neueste BGer-Entscheide zum Arbeitsrecht
→ search_bger_decisions(query="Arbeitsrecht", date_from="2024-01-01")
```

### Neueste Entscheide
```
Aktuelle Urteile des Bundesverwaltungsgerichts
→ get_recent_decisions(court_level="bundesverwaltungsgericht", limit=10)
```

## Entwicklung

```bash
# Tests
pytest tests/ -v

# Live-Tests (gegen echte API)
pytest tests/ -v -m live

# Linting
ruff check src/ tests/
ruff format src/ tests/
```

## Datenquelle

- **API:** [entscheidsuche.ch](https://entscheidsuche.ch) (Elasticsearch-basiert)
- **Lizenz:** Freie Nutzung, kein API-Key nötig
- **Abdeckung:** Bundesgerichte + 26 Kantone, ab ca. 2000
- **Sprachen:** Deutsch, Französisch, Italienisch

## Lizenz

MIT
