
Fedlex Connector
Gives Claude direct access to Swiss federal legislation via Fedlex's SPARQL endpoint and static HTML filestore. You can search acts by title across the Classified Compilation, pull specific articles with their official consolidated text, retrieve full laws or sections with automatic pagination for large acts, and list amendment history. All three official languages supported (German, French, Italian). Built to work around the fact that Fedlex's frontend is a JavaScript SPA that Claude's web tools can't render, so it queries metadata through SPARQL and scrapes the actual legislative text from the HTML filestore. Returns everything with consolidation dates and legal caveats. Useful when you need to reference or analyze Swiss law directly from the authoritative source without copy-pasting from PDFs.
- GitHub stars
- 6
- tools
- 4
- transport
- HTTP
- last updated
- Apr 9, 2026
Install
From registry metadata$ npx add-mcp https://mcp.fedlex-connector.ch/ --name fedlex-connectorRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http fedlex-connector https://mcp.fedlex-connector.ch/Run in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 4 toolsVerified live against the running server on Nov 6, 2026.
search_by_titleSearch Swiss federal legislation titles in the Classified Compilation (RS/SR) on Fedlex. Use to find the RS number of a law when you know its name but not its number. Searches titles only, not article content. Returns only acts currently in force.2 params
Search Swiss federal legislation titles in the Classified Compilation (RS/SR) on Fedlex. Use to find the RS number of a law when you know its name but not its number. Searches titles only, not article content. Returns only acts currently in force.
languagestringfr · de · itquery*stringget_articleRetrieve a single article when you already know the EXACT article number (e.g. from a cross-reference). Do NOT call this tool repeatedly to search for provisions — use get_law_text instead to fetch the full act or a section and locate relevant articles in the text.4 params
Retrieve a single article when you already know the EXACT article number (e.g. from a cross-reference). Do NOT call this tool repeatedly to search for provisions — use get_law_text instead to fetch the full act or a section and locate relevant articles in the text.
article*stringdatestringlanguagestringfr · de · itrs_number*stringget_law_textRetrieve the official consolidated text of a Swiss federal act (or a specific title/chapter) directly from Fedlex (fedlex.admin.ch). This is the PRIMARY tool for answering Swiss law questions — always start here. Fetch the full act or a specific section, then locate relevant p...4 params
Retrieve the official consolidated text of a Swiss federal act (or a specific title/chapter) directly from Fedlex (fedlex.admin.ch). This is the PRIMARY tool for answering Swiss law questions — always start here. Fetch the full act or a specific section, then locate relevant p...
languagestringfr · de · itpagenumberrs_number*stringsectionstringlist_amendmentsList consolidation version dates for a Swiss federal act. Returns the dates each consolidated version took effect.3 params
List consolidation version dates for a Swiss federal act. Returns the dates each consolidated version took effect.
languagestringfr · de · itrs_number*stringsincestringSponsors
Readme
Fedlex Connector
Access Swiss Federal Law from Claude
A connector that gives Claude direct access to the official text of Swiss federal legislation on Fedlex, built on the Model Context Protocol (MCP). Covers all acts in the Classified Compilation (SR, RS) in German, French, and Italian.
Why This Exists
Swiss federal law is published exclusively on Fedlex, but the frontend is a JavaScript single-page application that Claude's built-in web tools cannot render. However, Fedlex exposes two machine-readable interfaces that work without JavaScript:
- A SPARQL endpoint (
fedlex.data.admin.ch/sparqlendpoint) for metadata queries - A static HTML filestore (
fedlex.admin.ch/filestore/...) serving consolidated legislation
This MCP server bridges the gap: it queries SPARQL for metadata (RS numbers, consolidation dates, amendment history), fetches and parses the HTML for the actual legislative text, and returns it to Claude in a structured format. No proprietary database, no cache -- just a stateless bridge to Fedlex's open data infrastructure.
Setup
Details
- Repository
- github.com/jaytheskier/fedlex-connector
- Website
- fedlex-connector.ch
- Category
- Search & Web Crawling
- Transport
- HTTP
- Registry
- MCP registry, active
- Tools verified
- Nov 6, 2026