← Back to directory
S

Swiss Caselaw

Community
Open MCP server for Swiss caselaw, statutes & doctrine
GitHub source repository ↗
★ 57 Stars Category · Other Popular Source revision 674506b7210d
44FMRS · D
Reliability
5/20
Security and permissions
7/20
Maintenance
8/20
Documentation
11/20
Setup experience
13/20

OpenCaseLaw is an excellent open data source for Swiss law, offering a vast database of decisions and powerful citation analysis tools. Its high-quality search (MRR@10=0.647) and rich toolset make it valuable for legal research and AI applications. Data is freely available and code is open source, making it a significant resource for Swiss legal domain.

Read the FMRS scoring method →

OpenCaseLaw provides 1M+ Swiss court decisions, federal and cantonal laws, and a citation graph (DE/FR/IT). Data is CC0 public domain, code MIT-licensed, free, no sign-up. Offers 43 MCP tools (41 remote in public mode + 2 local-only) usable from Claude, ChatGPT, Cursor, Gemini, etc.

Tools

search_decisions
Full-text search over Swiss decisions with filters for court, canton, language, date range.
get_decision
Fetch a single decision by docket number or ID, including citation graph counts.
list_courts
List all courts with decision counts.
get_statistics
Aggregate statistics by court, canton, or year.
find_citations
Show what a decision cites and what cites it, with confidence scores.
find_appeal_chain
Trace the appeal chain (Instanzenzug) for a decision.
find_leading_cases
Find the most-cited decisions for a topic or statute.
analyze_legal_trend
Analyze year-by-year decision counts for a statute or topic.
draft_mock_decision
Draft a research-only mock decision outline from facts.
get_case_brief
Generate a structured case brief with regeste, facts, Erwägungen, cited statutes.
get_doctrine
Get leading cases and a timeline for a statute article or legal concept.
generate_exam_question
Generate a real BGE-based exam question with hidden analysis.
get_law
Look up federal or cantonal Swiss law by SR number / abbreviation, with language support.
search_laws
Unified full-text search across federal and cantonal laws.
get_commentary
Retrieve scholarly commentary for a federal law article from OnlineKommentar.ch.
search_commentaries
Full-text search across 362 legal commentaries.
search_legislation
LexFind-backed legislation discovery search with optional full-text enrichment.
get_legislation
Get details for a specific law including version history and official sources.
browse_legislation_changes
View recent legislation changes for a canton or federal level.
cite
Construct canonical Swiss citation strings and URLs, detect fabricated references.
check_claim_support
Independent Sonnet model verifies if a claim is supported by the decision text.
attest_response
Final audit checking citations, statutes, quotes, dates, and grounding.
get_erwaegung
Fetch the verbatim Erwägung (legal reasoning section) from a decision.
get_regeste
Fetch the official Regeste (headnote) of a decision.
get_materialien
Get legislative materials (Botschaft) references.
update_database
Re-download data and rebuild local database (local only).
check_update_status
Check progress of a running database update (local only).

Setup

Remote server (recommended): In Claude Desktop, add a custom connector with https://mcp.opencaselaw.ch; or in Claude Code, run claude mcp add swiss-caselaw --transport sse https://mcp.opencaselaw.ch. For ChatGPT, create an app in settings and paste the SSE URL. For Gemini CLI, edit settings.json to add {"url": "https://mcp.opencaselaw.ch"}. Local server: clone the repo, create a Python venv, install dependencies, and register with claude mcp add swiss-caselaw -- /path/to/python /path/to/mcp_server.py. First run downloads ~7GB data and builds an ~58GB index.

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

Fit and risk

Best for

  • Legal researchers and academics
  • Lawyers and legal assistants
  • Law students and educators
  • Developers building Swiss law applications

Not for

  • Users needing offline access (remote mode requires internet)
  • Scenarios requiring real-time legal updates (data refreshed daily but remote is nightly)
  • Users with strict disk space limits (local mode needs ~65GB)

Required permissions

  • Only uses MCP protocol to call remote server, no system-level permissions
  • Local mode reads ~/.swiss-caselaw directory for index storage
  • Accesses public legal data, no user privacy involved

Risks and side effects

  • Remote server depends on external services, may be interrupted by network issues
  • Local mode requires significant disk space (~65GB), download may take time
  • Data is CC0 but scraped from official court sites, may contain parsing errors or incompleteness
  • MCP server is free, but client like ChatGPT may require paid plan

Troubleshooting

  1. Remote connection failure: check network, verify URL, try SSE or HTTP endpoint
  2. Local database not built: run `update_database` or set `SWISS_CASELAW_DIR`
  3. Search returns no results: check query syntax, try natural language or use filters
  4. Tool returns empty citations: ensure reference graph database exists; tools return message instead of failing

Use cases

Legal research and analysis
Citation tracking and impact analysis
Quick lookup of Swiss federal and cantonal laws
AI-assisted writing and legal drafting
Legal education (case analysis, exam practice)

Supported clients

Claude DesktopFull support
Claude CodeFull support
ChatGPTFull support
Gemini CLIFull support