Swiss CaselawBLOCK
Open Swiss legal corpus + MCP server: 1M+ court decisions (1875–today), 21k laws, 10M-edge citation graph, 42 MCP tools. CC0 data, MIT code. Live at mcp.opencaselaw.ch
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Open Swiss case law and legislation for legal research and AI.
1M+ decisions · all 26 cantons · 1875–today · citation graph · MCP + REST + CLI + Parquet · CC0 data · MIT code
Try the search · Chat with your AI · Automate research · Download the dataset · API documentation
What you can do
- Find Swiss decisions across federal and cantonal courts, in German, French and Italian.
- Trace citations between cases and identify the leading decisions on a question.
- Query case law and legislation from Claude, ChatGPT-compatible clients, or any MCP client.
- Save repeatable research scripts, inspect citation resolution, and preserve selected evidence with the research CLI.
- Download the corpus for legal NLP, retrieval and graph research.
Connect in 30 seconds
{
"mcpServers": {
"opencaselaw": {
"url": "https://mcp.opencaselaw.ch/mcp"
}
}
}No sign-up, no API key, read-only. 42 tools; setup guides for individual clients are at opencaselaw.ch/mcp.
Using Anthropic's Claude for Legal plugin? A Swiss playbook that makes its contract-review and NDA-triage skills work under Swiss law, every article verified against the statute mirror, is at opencaselaw.ch/claude/legal.local.md; see the setup guide.
Automate research
ocl is a small command-line client over the public research API, made for two jobs a chat window does badly: checking the citations in a draft, and keeping the evidence behind a memo in a folder you can share. It is on PyPI as opencaselaw-cli:
pipx install opencaselaw-cli # or: uv tool install opencaselaw-cli ocl citat
8a08a2b17e4dOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add swiss-caselaw-ui --env ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} --env GEMINI_API_KEY=${GEMINI_API_KEY} --env HF_TOKEN=${HF_TOKEN} --env OCL_ANOMALY_DEPLOY_KEY=${OCL_ANOMALY_DEPLOY_KEY} -- npx -y [email protected]{
"mcpServers": {
"swiss-caselaw-ui": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
"GEMINI_API_KEY": "${GEMINI_API_KEY}",
"HF_TOKEN": "${HF_TOKEN}",
"OCL_ANOMALY_DEPLOY_KEY": "${OCL_ANOMALY_DEPLOY_KEY}"
}
}
}
}Trust audit
BLOCKgrade F · trust 46/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (11 observation(s))
- Network
- declared (12 observation(s))
- Shell
- declared (5 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (25)
"/root/.ssh/anomaly_reports_ed25519")
"/root/.ssh/anomaly_reports_ed25519")
VPS_KEY="$HOME/.ssh/caselaw"
session.verify = False
ppull.add_argument("--insecure", action="store_true", help="install even when no .sha256 checksum is published next to the pack ""schema version, build date and counts; exit 4 when the pack was never verified (pulled with --insecure, "
raise PackIntegrityError(f"no checksum published at {where}; refusing to install an unverified pack. Pass --insecure to continue "log(f"warning: no checksum published at {where}; continuing unverified (--insecure)")cls = getattr(importlib.import_module(mod_name), cls_name)
module = importlib.import_module(module_name)
mod = importlib.import_module(f"quality.checks.{name}")mod = importlib.import_module(module_name)
mod = importlib.import_module(module_name)
print(f"[{i + 1}/{len(tokens)}] {t['token']} -> {r['status']}",logger.info("score_supporting_results: key=%s results=%d", bool(api_key), len(results))opencaselaw-copilot-agent.zip
2026-05-21.root.ots
2026-05-22.root.ots
2026-05-23.root.ots
2026-05-25.root.ots
.nojekyll
exec(src[start:end], ns)
exec(src[start:end], ns)
return "s" + hashlib.sha1(query.encode()).hexdigest()[:8]
return "dev" if int(hashlib.sha1(qid.encode()).hexdigest(), 16) % 10 < 6 else "test"
Gates applied: no_behavioural_pass.
8a08a2b17e4dfull audit observations/trust-audit/mcp-server/jonashertner__swiss-caselaw.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 8a08a2b17e4d | BLOCK | F | 46 | first audit |
Questions
What is the Swiss Caselaw MCP server?
Open Swiss legal corpus + MCP server: 1M+ court decisions (1875–today), 21k laws, 10M-edge citation graph, 42 MCP tools. CC0 data, MIT code. Live at mcp.opencaselaw.ch
Is Swiss Caselaw safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (46/100) and found 8 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does Swiss Caselaw need?
It reads ANTHROPIC_API_KEY, GEMINI_API_KEY, HF_TOKEN, OCL_ANOMALY_DEPLOY_KEY, OPENAI_API_KEY, STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Swiss Caselaw run?
It speaks sse and streamable-http, so it runs as a service you connect to over the network. It is published on npm as swiss-caselaw-ui at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (8a08a2b17e4d), read on 2026-10-08. The repository is watched and re-audited when it changes.