Swiss federal law via Fedlex SPARQL endpoint
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
:switzerland: Part of the Swiss Public Data MCP Portfolio
MCP Server for Swiss federal law, consultations & official terminology — search the SR, monitor consultation deadlines, and translate terms across the national languages via Claude Desktop or Claude.ai
fedlex-mcp connects AI assistants (Claude) with three official Swiss SPARQL data sources:
jolux:Consultation) — the pre-parliamentary phase in which anyone can comment on a draft.All three are SPARQL-based, which is exactly why they live in one server rather than three: no new technology stack, only new queries against known patterns.
Metaphor: USB-C for federal law. Fedlex tells you what you have to respond to. TERMDAT tells you what it is called in the other national languages.
"Which education-related consultations are currently open, until when does the deadline run, which office is in charge — and what are the key technical terms in French and Italian for the response?"
A single conversation chains three tools across two endpoints:
Every open consultation carries deadline, days_remaining (computed at
request time in Europe/Zurich, 0 = deadline is today) and a derived
status — an expired consultation never shows up as running. Fedlex says
what you must respond to and by when; TERMDAT says how to name it in the
other national languages.
Use
topic="education", notkeyword="Volksschule". Fedlex consultations have no subject taxonomy — filtering is free-text over the title, and the word "Volksschule" appears in zero consultation titles. Thetopicfilter expands to a disclosed keyword union (Bildung, Schule, Berufsbildung, Hochschule, …) and reports exactly which terms it searched.
Run via uv's uvx — no clone or manual install needed. Add to your MCP client config (mcpServers for Claude Desktop, Cursor and Windsurf; use a top-level servers key for VS Code in .vscode/mcp.json):
Or with uvx (no permanent installation):
Try it immediately in Claude Desktop:
"Show me all valid federal laws on vocational training" "What does the Data Protection Act say? Is it still in force?" "Which consultations on education are open right now, and until when?" "What is 'Volksschule' called in French and Italian in official terminology?"
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Or with uvx:
Config file locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonFor use via claude.ai in the browser (e.g. on managed workstations without local software):
Render.com (recommended):
python -m fedlex_mcp.server --http --port 8000https://your-app.onrender.com/sse"stdio for the developer laptop, SSE for the browser."
| # | Tool | Source | Description |
|---|---|---|---|
| 1 | fedlex_search_laws | Fedlex | Search the Systematic Compilation (SR) by keyword in title |
| 2 | fedlex_get_law_by_sr | Fedlex | Get a law by its SR number (e.g. 235.1 = Data Protection Act) |
| 3 | fedlex_get_recent_publications | Fedlex | Latest publications from the Official Compilation (AS) |
| 4 | fedlex_get_upcoming_changes | Fedlex | Laws entering into force soon (legal monitoring) |
| 5 | fedlex_search_gazette | Fedlex | Search the Federal Gazette (BBl) |
| 6 | fedlex_get_law_history | Fedlex | All versions of a law (version history) |
| 7 | fedlex_search_treaties | Fedlex | International treaties (SR numbers starting with 0.) |
| 8 | fedlex_get_open_consultations | Fedlex | Deadline monitoring — open consultations (eventEndDate >= today, Europe/Zurich); each with days_remaining + derived status, sorted by shortest deadline; optional topic/keyword |
| 9 | fedlex_search_consultations | Fedlex | Full-text search over consultation title/description, with filters (topic, status, deadline range, office) |
| 10 | fedlex_get_consultation | Fedlex | Detail for one eventId: deadline, days_remaining, office, derived status, documents |
| 11 | termdat_lookup_term | LINDAS | Term → equivalents in de/fr/it/rm/en incl. definition |
| 12 | termdat_get_concept | LINDAS | Full TERMDAT entry for a URI or ID |
| Query | Tool |
|---|---|
| "Show me all valid federal laws on vocational training" | fedlex_search_laws |
| "What does the Data Protection Act say?" | fedlex_get_law_by_sr |
| "Which laws enter into force in the next 3 months?" | fedlex_get_upcoming_changes |
| "Show me the version history of the DSG" | fedlex_get_law_history |
| "Which consultations on education are open, and until when?" | fedlex_get_open_consultations |
| "Find closed consultations about the language act" | fedlex_search_consultations |
| "Give me the full detail and documents for consultation proj/2026/71/cons_1" | fedlex_get_consultation |
| "What is 'Volksschule' called in French and Italian?" | termdat_lookup_term |
| "Show the full TERMDAT entry 40109" | termdat_get_concept |
→ More use cases by audience →
Two isolated SPARQL endpoints behind one server. Separate httpx clients and
timeouts mean a LINDAS outage never breaks the fedlex_* tools, and vice versa.
JOLux Ontology — federal law (Fedlex)
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/fedlex-mcp-2)<a href="https://allmcps.com/mcp/fedlex-mcp-2"><img src="https://allmcps.com/api/badge/fedlex-mcp-2?style=directory" alt="Fedlex MCP on AllMCPs" /></a>