AI · MCP server
Connect AI agents
OpenCaseLaw's public MCP server gives language models direct access to 1,040,000+ Swiss court decisions, the citation graph, federal laws and cantonal acts. 42 specialized tools, no sign-up, no API keys.
§01 Operating modes
Two operating modes
Remote recommended
Immediately available, always up to date. No download required. Server endpoint:
https://mcp.opencaselaw.ch
Local offline
Full control, works offline. ~65 GB storage, one-time setup approx. 30-60 minutes. See README.
§02 Setup
Setup per client
Endpoint https://mcp.opencaselaw.ch · Streamable HTTP (recommended), legacy SSE at /sse · no sign-in · all tools read-only. The model you pick must support tool calls (function calling); small local models often cannot do this reliably.
Claude (Web, Desktop, Mobile)
Customize → Connectors → "+" → "Add custom connector" → enter the name opencaselaw (the OpenCaseLaw Artifacts look for it by that name) and the URL, no sign-in. Direct: claude.ai/settings/connectors. Available on every plan; the Free plan allows one custom connector. On Team and Enterprise the Owner enables it first: Organization settings → Connectors → Add → Custom → Web. Once added on the web or in Claude Desktop, it is also available in the mobile apps.
https://mcp.opencaselaw.ch
Claude Code (CLI)
claude mcp add --transport http swiss-caselaw https://mcp.opencaselaw.ch
ChatGPT
Settings → Apps & Connectors → Advanced settings → turn on Developer mode → "Create": name "Swiss Caselaw", paste the URL, Authentication: None. Web only; per OpenAI on Plus, Pro, Business, Enterprise and Edu, on Business, Enterprise and Edu only once an admin allows it. Without Developer mode (deep research, company connectors) ChatGPT uses only the search and fetch tools.
https://mcp.opencaselaw.ch
Gemini (CLI, Enterprise, App)
Gemini CLI: the command below, or in ~/.gemini/settings.json under mcpServers with "type": "http", "url": "https://mcp.opencaselaw.ch". Gemini Enterprise: an admin adds the server under Settings & help → Manage team → Connected apps → Add MCP Server (Streamable HTTP only). In the Gemini app (gemini.google.com) custom MCP servers are only partly rolled out (Connected Apps, personal accounts on Google AI Pro or Ultra); where the option is missing, use Gemini CLI.
gemini mcp add --transport http swiss-caselaw https://mcp.opencaselaw.ch
Mistral Le Chat
Connectors → "+ Add Connector" → "Custom MCP Connector" tab → enter a name and the URL, Authentication: None → Connect. Admins add connectors; on Free, Pro and Student the account owner is the admin.
https://mcp.opencaselaw.ch
Microsoft Copilot Studio & Microsoft 365 Copilot
Agent → Tools → Add a tool → New tool → "Model Context Protocol". Server name "Swiss Caselaw" and the URL, Authentication: None. Streamable HTTP only (SSE no longer supported since August 2025). In Microsoft 365 Copilot users cannot add an MCP server themselves; there is a ready-made agent package your IT uploads once, no Copilot Studio licence needed: opencaselaw.ch/copilot.
https://mcp.opencaselaw.ch
Cursor
Add it to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project); the server then shows up in Cursor’s MCP settings:
{
"mcpServers": {
"swiss-caselaw": {
"url": "https://mcp.opencaselaw.ch"
}
}
}VS Code (GitHub Copilot)
Command Palette → "MCP: Add Server" → HTTP → paste the URL, or add it to .vscode/mcp.json (the key is servers, not mcpServers):
{
"servers": {
"swiss-caselaw": {
"type": "http",
"url": "https://mcp.opencaselaw.ch"
}
}
}OpenAI Codex CLI
The command below, or in ~/.codex/config.toml under [mcp_servers.swiss-caselaw] with url = "https://mcp.opencaselaw.ch". Codex speaks Streamable HTTP only, not /sse.
codex mcp add swiss-caselaw --url https://mcp.opencaselaw.ch
Other clients
Perplexity: under Connectors, create a custom remote connector with the URL. Grok: grok.com/connectors → "New Connector" → Custom → URL. Windsurf: in Cascade’s MCP config file, an entry with "serverUrl". Zed: settings.json, under context_servers with "url". Continue: type: streamable-http and url. Any other MCP-capable client connects over Streamable HTTP to https://mcp.opencaselaw.ch. For older clients only: SSE at https://mcp.opencaselaw.ch/sse (deprecated by the MCP spec; Copilot Studio, Codex and Gemini Enterprise do not accept it).
§03 Tools
42 public tools at a glance (+ 2 local admin tools)
Each tool is optimised for a specific research use case. Full schemas via the MCP protocol tools/list, grouped here by function.
Search & retrieve decisions
- search_decisions
- get_decision
- get_decisions
- get_case_brief
- list_courts
- get_statistics
Decision structure (federal)
- get_decision_structure
- get_erwaegung
- get_regeste
- find_relevant_erwaegung
Citation graph
- find_citations
- find_appeal_chain
- find_leading_cases
- analyze_legal_trend
Statute text
- get_law
- search_laws
- get_legislation
- search_legislation
- browse_legislation_changes
- get_article_history
- get_article_purpose
Doctrine & commentary
- get_doctrine
- get_commentary
- search_commentaries
Legal scholarship (open access)
- search_scholarship
- get_scholarship
- get_scholarship_full_text
- list_scholarship_sources
- find_scholarship_citing_statute
- find_scholarship_citing_decision
Preparatory materials (dispatches, consultations)
- get_materialien
- search_materialien
- search_botschaft
Verification & citation
- check_claim_support
- attest_response
- cite
Administrative practice (federal)
- search_practice
- get_practice
Drafting & study
- generate_exam_question
- draft_mock_decision
ChatGPT Deep Research (aliases)
- search
- fetch
Local mode (maintenance)
- update_database
- check_update_status
§04 Technical
Technical details
- Transport: Server-Sent Events (SSE) + Streamable HTTP, compatible with every common MCP client
- TLS via Let's Encrypt, nginx rate limiting, health endpoint: /health
- 8× uvicorn workers behind an nginx load balancer, automatic failover
- Backend: 1,040,000+ decisions in SQLite FTS5 with BM25+RRF ranking, citation graph of 10M extracted citations (9.65M resolved edges)
- Data from public sources (federal courts, cantonal courts, Fedlex, LexFind), updated daily