jaytheskier avatar

Fedlex Connector

jaytheskier/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-connector

Run 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 tools

Verified 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.

Parameters* required
languagestring
Language for results (default: de)one of fr · de · it
query*string
Keywords to match against act titles (e.g. 'code civil', 'protection des données')
get_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.

Parameters* required
article*string
Article number (e.g. '3', '28a', '41')
datestring
Consolidation date in YYYY-MM-DD format. Defaults to the latest available version.
languagestring
Language (default: de)one of fr · de · it
rs_number*string
RS/SR number (e.g. '210' for CC, '220' for CO, '311.0' for CP)
get_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...

Parameters* required
languagestring
Language (default: de)one of fr · de · it
pagenumber
Page number for paginated results (default: 1). Large acts are split across multiple pages.
rs_number*string
RS/SR number (e.g. '210' for CC, '220' for CO)
sectionstring
Limit to a specific title, chapter, or part (e.g. 'Titre huitième', 'Zweiter Teil'). If omitted, returns the full act.
list_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.

Parameters* required
languagestring
Language for amendment titles (default: de)one of fr · de · it
rs_number*string
RS/SR number
sincestring
Start date in YYYY-MM-DD format (default: 1 year ago)

Sponsors

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


View the full README on GitHub

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

Related Search & Web Crawling MCP servers

View all
1khalidsaidi avatarRAGMapkhalidsaidi/ragmapFind a retrieval MCP server that works today: a daily-checked list of servers that search knowledge.6stars
2mahach666 avatarPilotmcpmahach666/pilotmcpMCP server for ASCON Pilot-ICE PDM: objects, documents, remarks, search, admin6stars
3nk3750 avatarJitapink3750/jitapiTurn any OpenAPI spec into an executable agent interface using graphs and semantic search.6stars
4basilskywalk avatarParecodebasilskywalk/parecodeToken-aware ripgrep code search and atomic multi-file edits for coding agents.5stars
5unlikefraction avatarSilicon Friendlyunlikefraction/silicon-friendlyDirectory rating websites on AI-agent-friendliness. Search, lookup, and submit.5stars
6cotletdev avatarOmio MCP Server and API by Cotletcotletdev/omio-api-mcp-serverOmio travel transport booking MCP server: search trips, find the cheapest day, start booking.0stars