eu.ansvar/switzerland-law-mcp

Swiss law database — nFADP/DSG, information security, telecommunications with full-text search

0NOASSERTIONdatabases

Install

Config snippet generator goes here (5 client tabs)

README

# Swiss Law MCP Server

**The Fedlex alternative for the AI age.**

[![npm version](https://badge.fury.io/js/@ansvar%2Fswitzerland-law-mcp.svg)](https://www.npmjs.com/package/@ansvar/switzerland-law-mcp)
[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GitHub stars](https://img.shields.io/github/stars/Ansvar-Systems/switzerland-law-mcp?style=social)](https://github.com/Ansvar-Systems/switzerland-law-mcp)
[![CI](https://github.com/Ansvar-Systems/switzerland-law-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Ansvar-Systems/switzerland-law-mcp/actions/workflows/ci.yml)
[![Provisions](https://img.shields.io/badge/provisions-102%2C864-blue)]()

Query **4,873 Swiss federal laws** -- from Datenschutzgesetz (DSG/nFADP) and Strafgesetzbuch to Obligationenrecht, Fernmeldegesetz, and more -- directly from Claude, Cursor, or any MCP-compatible client.

If you're building legal tech, compliance tools, or doing Swiss legal research, this is your verified reference database -- the entire Systematische Rechtssammlung (SR), machine-readable.

Built by [Ansvar Systems](https://ansvar.eu) -- Stockholm, Sweden

---

## Why This Exists

Swiss legal research means navigating Fedlex, admin.ch, and scattered cantonal portals -- in three official languages. Whether you're:
- A **lawyer** validating citations in a brief or contract
- A **compliance officer** checking if a statute is still in force or how it aligns with EU law
- A **legal tech developer** building tools on Swiss federal law
- A **researcher** tracing legislative provisions across the SR numbering system

...you shouldn't need dozens of browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.

This MCP server makes Swiss federal law **searchable, cross-referenceable, and AI-readable** -- covering the full accessible SR corpus from Fedlex.

---

## Quick Start

### Use Remotely (No Install Needed)

> Connect directly to the hosted version -- zero dependencies, nothing to install.

**Endpoint:** `https://switzerland-law-mcp.vercel.app/mcp`

| Client | How to Connect |
|--------|---------------|
| **Claude.ai** | Settings > Connectors > Add Integration > paste URL |
| **Claude Code** | `claude mcp add switzerland-law --transport http https://switzerland-law-mcp.vercel.app/mcp` |
| **Claude Desktop** | Add to config (see below) |
| **GitHub Copilot** | Add to VS Code settings (see below) |

**Claude Desktop** -- add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "switzerland-law": {
      "type": "url",
      "url": "https://switzerland-law-mcp.vercel.app/mcp"
    }
  }
}
```

**GitHub Copilot** -- add to VS Code `settings.json`:

```json
{
  "github.copilot.chat.mcp.servers": {
    "switzerland-law": {
      "type": "http",
      "url": "https://switzerland-law-mcp.vercel.app/mcp"
    }
  }
}
```

### Use Locally (npm)

```bash
npx @ansvar/switzerland-law-mcp
```

**Claude Desktop** -- add to `claude_desktop_config.json`:

**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "switzerland-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/switzerland-law-mcp"]
    }
  }
}
```

**Cursor / VS Code:**

```json
{
  "mcp.servers": {
    "switzerland-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/switzerland-law-mcp"]
    }
  }
}
```

---

## Example Queries

Once connected, just ask naturally:

- *"What does the nFADP Art. 6 say about data processing principles?"*
- *"Is the old DSG still in force?"*
- *"Find provisions about Datenschutz in Swiss law"*
- *"Which Swiss laws align with the GDPR?"*
- *"What does Art. 143bis StGB say about computer crime?"*
- *"Search for cybersecurity requirements in Swiss legislation"*
- *"What are the consent requirements under the new Swiss data protection law?"*
- *"Find provisions about Obligationenrecht and corporate governance"*
- *"Validate the citation SR 235.1 Art. 6"*
- *"Build a legal stance on data breach notification requirements under Swiss law"*

---

## What's Included

| Category | Count | Details |
|----------|-------|---------|
| **Federal Laws** | 4,873 statutes | Full accessible SR corpus from Fedlex |
| **Provisions** | 102,864 sections | Full-text searchable with FTS5 |
| **Legal Definitions** | 931 definitions | Extracted from statute text |
| **EU Cross-References** | 170 references | 64 EU directives and regulations |
| **Database Size** | ~141 MB | Optimized SQLite, portable |
| **SR Census** | 9,022 total entries | 4,873 ingestable + 4,149 PDF-only (documented) |
| **Weekly Drift Detection** | Automated | Freshness checks against Fedlex SPARQL |

**Verified data only** -- every provision is sourced from Fedlex (Swiss Federal Chancell