← Back to directory
S

Swiss Caselaw

Community
Open MCP server for Swiss caselaw, statutes & doctrine
Category
Other #187 of 230
Stars
★ 73 Popular
Transport
SSE · Streamable HTTP
Runtime
Hosted (no local runtime) · Node.js 18+ · Python 3.10+
Credentials
No credential needed
License
MIT
Last commit
Tools
27
44FMRS · D

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.

Strongest · Setup experience 13/20 Weakest · Reliability 5/20

Reliability
5/20
Security and permissions
7/20
Maintenance
8/20
Documentation
11/20
Setup experience
13/20
Why each score
Reliability 5/20
Only the README and server manifest were supplied; no mcp_server.py, test files, or CI workflow content are available to verify the initialization, tool-list handshake, or whether declared tools match real behavior. The README contains contradictory tool counts (manifest says 42, README says 43, while also citing 24/38/40/41 tools), and the tool table does not list all claimed tools. Per static calibration, without verifiable execution evidence reliability cannot exceed 12, and missing evidence is a deduction; score is 5.
Security and permissions 7/20
No clear red-line violation is visible: install examples contain no real tokens or secrets, data flow is disclosed (local search is offline; attest/rerank call external LLM APIs), and no covert exfiltration or malicious behavior is described. However, no source code was provided to audit, the remote endpoint has no authentication (config example states auth: None), the update_database tool rebuilds the local database without an explicit confirmation mechanism, and least-privilege and data-boundary controls are not documented. Score is 7.
Maintenance 8/20
The repository is not archived, has an MIT license, only 1 open issue, and the README shows a CI badge, version 1.3.0, and claims of daily data refresh. But no release history, changelog, dependency-update evidence, or security-response channel was provided; stars are discovery signals only and add no points. The project looks active but has governance/versioning evidence gaps, matching the 'active but with gaps' anchor; score is 8.
Documentation 11/20
The README is extensive: remote/local setup, client configuration examples for Claude/ChatGPT/Gemini CLI/ADK, tool tables with parameters, example queries, troubleshooting, architecture diagram, and data descriptions. However, tool counts are inconsistent (42 vs 43; 24 vs 40/41/38), the table omits several claimed tools, referenced docs/tests/benchmarks were not supplied, and limits, error codes, and costs are only partially documented. Score is 11.
Setup experience 13/20
Remote setup is trivial — paste the URL into Claude, ChatGPT, or Gemini — and config examples are given for JSON, CLI, and ADK. Local setup has step-by-step instructions for macOS/Linux/Windows. However, local installation requires ~65 GB of disk and a 30–60 minute index build, making it manual and fragile, and there is no CI/test evidence verifying these steps. Per static calibration, setup cannot exceed 15 without execution evidence; score is 13.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkConnects to a database

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

Setup

Before you start

Runtime:Hosted (no local runtime) · Node.js 18+ · Python 3.10+

GEMINI_API_KEY optionalsecret Optional: API key for using Google Gemini in the local Web UI; get it at aistudio.google.com/apikey
OPENAI_API_KEY optionalsecret Optional: API key for using OpenAI (or Ollama's OpenAI-compatible API) in the local Web UI; get it at platform.openai.com
ANTHROPIC_API_KEY optionalsecret Optional: API key for using Claude in the local Web UI; get it at console.anthropic.com (a Claude subscription does not include an API key)
Other optional settings (5)
SWISS_CASELAW_GRAPH_DB optional Optional: path to the reference_graph.db citation graph database to enable citation-graph reranking
SWISS_CASELAW_STATUTES_DB optional Optional: path to statutes.db for federal law lookup via get_law / search_laws
SWISS_CASELAW_GRAPH_SIGNALS optional Optional: set to 0 to disable citation-graph signal reranking
SWISS_CASELAW_FEDLEX_CACHE optional Optional: file path where draft_mock_decision caches fetched Fedlex statute excerpts
SWISS_CASELAW_DIR optional Optional: local data directory (default ~/.swiss-caselaw), used by the SQLite snapshot bootstrap script

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"
      ]
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

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

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add swiss-caselaw -- npx -y mcp-remote https://mcp.opencaselaw.ch

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After adding the connector https://mcp.opencaselaw.ch in Claude Desktop (or running claude mcp add), check that tools like search_decisions appear in the client's tool list, or ask "list all courts with decision counts" to confirm the connection.

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

Things to try

Once connected, you can ask your AI assistant things like:

  • Search for BGer decisions on Mietrecht Kündigung from 2024
  • Show me the citation network for BGE 138 III 374
  • What are the leading cases on Art. 8 EMRK?
  • Show me Art. 41 OR full text

Tools 27

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

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 Desktop
Claude Code
ChatGPT
Gemini CLI

Listed from the project's documentation, not tested by this site.

Overview

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.

Similar servers

BioMCP 75 · B

One binary. One grammar. Evidence from the biomedical sources you already trust.

★ 659 · Tools 11 Compare with this →

Source revision 4f7c774222d0 Data synced 2026-10-19 Read the FMRS scoring method