Atlas / MCP servers / jonashertner / Swiss Caselaw

Swiss CaselawBLOCK

mcp/jonashertner/swiss-caselaw

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

Verdict
BLOCK
Grade
F
Trust score
46 /100
Exposed tools
—
Transport
sse · streamable-http
License
MIT
Stars
72
01

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
Read from source at commit 8a08a2b17e4dOBSERVED · 2026-10-08
Advertisement
02

Connect

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-code
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]
claude-desktop
{
  "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}"
      }
    }
  }
}
03

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.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

HIGHFilesystem / path · fs.credential_store · CWE-22, CWE-59
scripts/anonymization_check.py:80
"/root/.ssh/anomaly_reports_ed25519")
Why it matters. touches a credential store
HIGHFilesystem / path · fs.credential_store · CWE-22, CWE-59
scripts/citation_anomaly_report.py:50
"/root/.ssh/anomaly_reports_ed25519")
Why it matters. touches a credential store
HIGHFilesystem / path · fs.credential_store · CWE-22, CWE-59
scripts/scrape_ne_local.sh:22
VPS_KEY="$HOME/.ssh/caselaw"
Why it matters. touches a credential store
HIGHNetwork egress · net.tls_off · CWE-200, CWE-319
base_scraper.py:301
session.verify = False
Why it matters. certificate verification is disabled
Fix. leave verification on
HIGHNetwork egress · net.tls_off · CWE-200, CWE-319
clients/python/src/opencaselaw_cli/cli.py:418
ppull.add_argument("--insecure", action="store_true", help="install even when no .sha256 checksum is published next to the pack "
Why it matters. certificate verification is disabled
Fix. leave verification on
HIGHNetwork egress · net.tls_off · CWE-200, CWE-319
clients/python/src/opencaselaw_cli/cli.py:426
"schema version, build date and counts; exit 4 when the pack was never verified (pulled with --insecure, "
Why it matters. certificate verification is disabled
Fix. leave verification on
HIGHNetwork egress · net.tls_off · CWE-200, CWE-319
clients/python/src/opencaselaw_cli/local.py:591
raise PackIntegrityError(f"no checksum published at {where}; refusing to install an unverified pack. Pass --insecure to continue "
Why it matters. certificate verification is disabled
Fix. leave verification on
HIGHNetwork egress · net.tls_off · CWE-200, CWE-319
clients/python/src/opencaselaw_cli/local.py:594
log(f"warning: no checksum published at {where}; continuing unverified (--insecure)")
Why it matters. certificate verification is disabled
Fix. leave verification on
MEDIUMCode injection · code.dynamic_import · CWE-78, CWE-94, CWE-95
backfill_ne_fiche_collisions.py:106
cls = getattr(importlib.import_module(mod_name), cls_name)
MEDIUMCode injection · code.dynamic_import · CWE-78, CWE-94, CWE-95
pipeline.py:52
module = importlib.import_module(module_name)
MEDIUMCode injection · code.dynamic_import · CWE-78, CWE-94, CWE-95
quality/runner.py:118
mod = importlib.import_module(f"quality.checks.{name}")
MEDIUMCode injection · code.dynamic_import · CWE-78, CWE-94, CWE-95
run_scraper.py:612
mod = importlib.import_module(module_name)
MEDIUMCode injection · code.dynamic_import · CWE-78, CWE-94, CWE-95
scrape_cantonal_laws.py:74
mod = importlib.import_module(module_name)
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
scripts/p2_probe.py:91
print(f"[{i + 1}/{len(tokens)}] {t['token']} -> {r['status']}",
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
stripe_billing.py:586
logger.info("score_supporting_results: key=%s results=%d", bool(api_key), len(results))
LOWInventory / provenance · inv.binary · CWE-1104
docs/copilot/opencaselaw-copilot-agent.zip
opencaselaw-copilot-agent.zip
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
LOWInventory / provenance · inv.binary · CWE-1104
docs/integrity/2026-05-21.root.ots
2026-05-21.root.ots
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
LOWInventory / provenance · inv.binary · CWE-1104
docs/integrity/2026-05-22.root.ots
2026-05-22.root.ots
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
LOWInventory / provenance · inv.binary · CWE-1104
docs/integrity/2026-05-23.root.ots
2026-05-23.root.ots
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
LOWInventory / provenance · inv.binary · CWE-1104
docs/integrity/2026-05-25.root.ots
2026-05-25.root.ots
Why it matters. a compiled or binary member cannot be reviewed from source
Fix. ship source, or explain the binary in the README
LOWInventory / provenance · inv.hidden_file · CWE-1104
docs/.nojekyll
.nojekyll
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
tests/test_ip_pseudonym_ledger.py:37
exec(src[start:end], ns)
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
LOWCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
tests/test_sanitize_fts5_syntax_chars.py:34
exec(src[start:end], ns)
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
benchmarks/generate_golden_queries.py:202
return "s" + hashlib.sha1(query.encode()).hexdigest()[:8]
LOWInsecure crypto · crypto.weak_hash · CWE-327, CWE-338
benchmarks/generate_golden_queries.py:207
return "dev" if int(hashlib.sha1(qid.encode()).hexdigest(), 16) % 10 < 6 else "test"

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha 8a08a2b17e4dfull audit observations/trust-audit/mcp-server/jonashertner__swiss-caselaw.json · Report an issue / request a re-scan
04

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-088a08a2b17e4dBLOCKF46first audit
05

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.

Advertisement