fedlex-mcp — Claude Code MCP server: Swiss law and terminology
Wires Swiss federal law, open consultations and the TERMDAT terminology base into your assistant. Handy when you need a statute or a consultation deadline fast.
claude mcp add fedlex-mcp -- uvx fedlex-mcpWhat fedlex-mcp does
The server talks to two SPARQL endpoints. Fedlex serves the Systematic Compilation (SR), the Official Compilation (AS), the Federal Gazette (BBl), treaties and consultations; LINDAS serves TERMDAT, the Federal Chancellery's terminology database. Twelve tools and two resources sit behind them, covering title search, lookup by SR number, version history and upcoming entry into force.
Each open consultation comes back with a deadline, a days_remaining value computed in Europe/Zurich at request time, and a derived status, so an expired one never reads as running. The topic filter expands into a keyword union and tells you which terms it used. On consultations reach for topic instead of keyword — there is no subject taxonomy, filtering runs over the title text.
Python 3.11+ is required, plus uv or pip. No API key: the data sits under open reuse licences. Two transports are available, stdio for a desktop client and Streamable HTTP for cloud deployment.
What it helps with
- pull up a law by its SR number
- check whether a consultation deadline has passed
- walk through every version of a statute
- get the official French and Italian equivalent of a term
- watch for laws about to enter into force
Example prompts for the agent
- List all valid federal laws on vocational training
- Which education consultations are open right now, and until when?
How to install fedlex-mcp
Platform CLI
claude mcp add fedlex-mcp -- uvx fedlex-mcpuvx runs the command named after the package; if the README names another one, use uvx --from fedlex-mcp <command>
Platform CLI
codex mcp add fedlex-mcp -- uvx fedlex-mcpuvx runs the command named after the package; if the README names another one, use uvx --from fedlex-mcp <command>
Config file
{
"mcpServers": {
"fedlex-mcp": {
"command": "uvx",
"args": [
"fedlex-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from fedlex-mcp <command>
Config file
{
"servers": {
"fedlex-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"fedlex-mcp"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from fedlex-mcp <command>
Platform CLI
gemini mcp add fedlex-mcp uvx fedlex-mcpuvx runs the command named after the package; if the README names another one, use uvx --from fedlex-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about fedlex-mcp
How do I install fedlex-mcp in Claude Code?
One command: claude mcp add fedlex-mcp -- uvx fedlex-mcp.
What does fedlex-mcp do?
It gives your assistant access to Swiss federal law, consultations and the TERMDAT terminology base through two SPARQL endpoints.
Do I need an API key?
No. All three sources are open for reuse. Python 3.11+ and uv or pip are enough to run it.