MCP server for Swiss federal legislation via Fedlex (fedlex.data.admin.ch)
MCP server for Swiss federal legislation via Fedlex (fedlex.data.admin.ch). That is what the fedlex mcp mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
The server publishes 11 tools. What each one is for:
search_legislation — Search by keyword in law titles and abbreviationslist_legislation — List all in-force legislation (paginated)get_legislation — Get metadata for a law by SR number or ELI URIget_legislation_text — Fetch the full text of a law (HTML or XML)get_versions — List all historical consolidation versionsget_citations — Law-to-law citation graph (which laws cite which)search_provisions — FTS5 full-text search across all article texts (~100k provisions)lookup_definition — Find formal legal definitions by term across all legislationfind_eu_references — Swiss laws that implement or reference specific EU directives/regulationsget_article_citations — Article-to-article citation graph (which specific articles cite which)get_db_stats — Database statistics: counts, size, and last ingestion timestampConfiguration is passed through the environment: FEDLEX_DB_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.
Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Fedlex MCP's toolset — search_legislation, list_legislation, get_legislation and 8 more — is a fair guide to whether it matches your workflow. It is maintained by loicvuilliomenet-boop; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Fedlex MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| search_legislation | Search by keyword in law titles and abbreviations |
| list_legislation | List all in-force legislation (paginated) |
| get_legislation | Get metadata for a law by SR number or ELI URI |
| get_legislation_text | Fetch the full text of a law (HTML or XML) |
| get_versions | List all historical consolidation versions |
| get_citations | Law-to-law citation graph (which laws cite which) |
| search_provisions | FTS5 full-text search across all article texts (~100k provisions) |
| lookup_definition | Find formal legal definitions by term across all legislation |
| find_eu_references | Swiss laws that implement or reference specific EU directives/regulations |
| get_article_citations | Article-to-article citation graph (which specific articles cite which) |
| get_db_stats | Database statistics: counts, size, and last ingestion timestamp |
| Variable | Description | Required |
|---|---|---|
| FEDLEX_DB_PATH | Filesystem location the server is allowed to use. | Optional |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.