# Fedlex Connector

Connects an AI coding agent to Swiss federal legislation on Fedlex. Search acts, read articles, and inspect amendment versions when legal source text is needed.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7
- Author: JayTheSkier
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/JayTheSkier/fedlex-connector
- Updated: 2026-10-07
- HTML: https://affpapa.org/en/nevibecode/mcp/fedlex-connector

## What it does

Fedlex Connector gives Claude Code an MCP route to Swiss federal legislation published through Fedlex. It can search act titles, retrieve a consolidated article or law, and list amendment versions. The available language codes are German, French, and Italian.

The server first uses SPARQL metadata queries to resolve an RS number, consolidation date, and HTML file location. It then fetches the legislation from Fedlex’s static filestore and parses the requested text. Large acts are split at article boundaries and returned over several pages. Its tools are `search_by_title`, `get_article`, `get_law_text`, and `list_amendments`.

Claude Code connects over HTTP to `https://mcp.fedlex-connector.ch/`. The repository also includes a `Dockerfile` for a self-hosted instance: setting `PORT` selects HTTP mode, while omitting it runs stdio mode. Remote setup depends on access to that MCP endpoint.

## Requirements
- Remote server: `https://mcp.fedlex-connector.ch/`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http fedlex-connector https://mcp.fedlex-connector.ch/
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add fedlex-connector --url https://mcp.fedlex-connector.ch/
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "fedlex-connector": {
            "url": "https://mcp.fedlex-connector.ch/"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "fedlex-connector": {
            "type": "http",
            "url": "https://mcp.fedlex-connector.ch/"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http fedlex-connector https://mcp.fedlex-connector.ch/
```

## When to use it
- find an RS number from an act title
- retrieve a specific article in its current text
- read one section of a larger law
- list amendment and consolidation versions
- query an act in German, French, or Italian

## Example prompts
- Find the Swiss data protection act and return its RS number.
- Retrieve article 1 from RS number `210` in German.
- List amendments for act `220` starting from `2024-01-01`.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
