Fedlex Connector

An MCP connector that gives Claude direct access to Swiss federal legislation on Fedlex.

What it does

Fedlex Connector gives Claude direct access to Fedlex, the official publication platform for Swiss federal law. It lets Claude query individual articles or whole acts from the Classified Compilation (RS/SR) in French, German, and Italian, and check what has changed in a law over time.

The result is less wasted reasoning and greater accuracy when using Claude for legal research within Swiss federal law.

Why it's needed

Claude cannot access the legal acts published on Fedlex, because the website relies on JavaScript, which Claude cannot execute. Without this connector, Claude resorts to workarounds — mirror sites, random PDFs, secondary sources — an approach that introduces potential inaccuracies and wastes reasoning power.

However, Fedlex does expose two machine-readable interfaces that work without JavaScript: a SPARQL endpoint for metadata and a static HTML filestore serving the consolidated legislation. This connector queries those interfaces, extracts the relevant text, and returns it to Claude in a structured format.

It works as an MCP server — a lightweight protocol that lets Claude call external tools as part of its reasoning. Once connected, Claude can query Fedlex on its own whenever a conversation requires it.

Setup

The server is available at:

https://fedlex-connector.ch/mcp

On claude.ai, Desktop, or mobile: profile → Connectors → Add custom connector, paste the URL.

On Claude Code: claude mcp add --transport http fedlex https://fedlex-connector.ch/mcp

Tools

search_by_title

Find a law by its name. Returns RS numbers and titles.

get_law_text

The primary tool. Retrieve a full act or a specific title/chapter, then locate relevant provisions in the text. Large acts are paginated automatically.

get_article

Retrieve a single article when you already know the exact article number. Supports historical versions by consolidation date.

list_amendments

List consolidation versions for an act over a given period. Shows what changed and when.

GitHub

The code is open source and available on GitHub.

About

Built by Jeremy Bacharach. jeremy@bacharach.ch · LinkedIn

Feedback and contributions are welcome.