Swiss law database — nFADP/DSG, information security, telecommunications with full-text search
Swiss law database — nFADP/DSG, information security, telecommunications with full-text search
Valid MCP server (3 strong, 3 medium validity signals). 1 known CVE in dependencies (0 critical, 1 high severity) Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (132/133 approved).
5 files analyzed · 2 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"eu-ansvar-switzerland-law-mcp": {
"args": [
"-y",
"@ansvar/switzerland-law-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
The Fedlex alternative for the AI age.
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 -- Stockholm, Sweden
Swiss legal research means navigating Fedlex, admin.ch, and scattered cantonal portals -- in three official languages. Whether you're:
...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.
Connect directly to the hosted version -- zero dependencies, nothing to install.
Endpoint: https://mcp.ansvar.eu/law-ch/mcp
| Client | How to Connect |
|---|---|
| Claude.ai | Settings > Connectors > Add Integration > paste URL |
| Claude Code | claude mcp add switzerland-law --transport http https://mcp.ansvar.eu/law-ch/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:
{
"mcpServers": {
"switzerland-law": {
"type": "url",
"url": "https://mcp.ansvar.eu/law-ch/mcp"
}
}
}
GitHub Copilot -- add to VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"switzerland-law": {
"type": "http",
"url": "https://mcp.ansvar.eu/law-ch/mcp"
}
}
}
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
{
"mcpServers": {
"switzerland-law": {
"command": "npx",
"args": ["-y", "@ansvar/switzerland-law-mcp"]
}
}
}
Cursor / VS Code:
{
"mcp.servers": {
"switzerland-law": {
"command": "npx",
"args": ["-y", "@ansvar/switzerland-law-mcp"]
}
}
}
Once connected, just ask naturally:
| 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 Chancellery). Zero LLM-generated content.
| Law | SR Number | Short Name | Significance |
|---|---|---|---|
| Federal Act on Data Protection | SR 235.1 | DSG | New data protection law (nFADP) effective Sep 1, 2023; replaces 1992 DPA; aligns with GDPR with Swiss-specific features |
| Data Protection Ordinance | SR 235.11 | DSV | Implementing ordinance for the DSG |
| Federal Constitution | SR 101 | BV | Art. 13 guarantees the right to privacy; foundational for all data protection law |
| Code of Obligations | SR 220 | OR | Core contract and company law; corporate governance provisions |
| Swiss Criminal Code | SR 311.0 | StGB | Art. 143bis criminalizes unauthorized computer access; Art. 143 covers data theft |
| Telecommunications Act | SR 784.10 | FMG | Regulates telecommunications services and infrastructure |
| Administrative Procedure Act | SR 172.021 | VwVG | Federal administrative procedure framework |
| Public Procurement Act | SR 172.056.1 | BoeB | Federal public procurement rules |
Verbatim Source Text (No LLM Processing):
Smart Context Management:
Technical Architecture:
Fedlex SPARQL --> HTML Fetch --> Parse --> SQLite --> FTS5 snippet() --> MCP response
^ ^ ^
Census discovery Provision parser Verbatim database query
| Traditional Approach | This MCP Server |
|---|---|
| Search Fedlex by SR number | Search by plain language: "Datenschutz Einwilligung" |
| Navigate multi-chapter statutes manually | Get the exact provision with context |
| Manual cross-referencing between laws | build_legal_stance aggregates across sources |
| "Is this statute still in force?" -- check manually | check_currency tool -- answer in seconds |
| Find EU basis -- dig through EUR-Lex | get_eu_basis -- linked EU directives instantly |
| No API, no integration | MCP protocol -- AI-native |
Traditional: Search Fedlex -- Download PDF -- Ctrl+F -- Cross-reference with EU law -- Check three language versions -- Repeat
This MCP: "What EU directives does the DSG implement?" -- Done.
| Tool | Description |
|---|---|
search_legislation | FTS5 full-text search across 102,864 provisions with BM25 ranking |
get_provision | Retrieve specific provision by SR number + chapter/section |
check_currency | Check if statute is in force, amended, or repealed |
validate_citation | Validate citation against database (zero-hallucination check) |
build_legal_stance | Aggregate citations from statutes for a legal topic |
format_citation | Format citations per Swiss conventions (full/short/pinpoint) |
list_sources | List all available statutes with metadata |
about | Server info, capabilities, and coverage summary |
| Tool | Description |
|---|---|
get_eu_basis | Get EU directives/regulations linked to a Swiss statute |
get_swiss_implementations | Find Swiss laws implementing a specific EU act |
search_eu_implementations | Search EU documents with Swiss implementation counts |
get_provision_eu_basis | Get EU law references for a specific provision |
validate_eu_compliance | Check implementation status of EU directives in Swiss law |
Switzerland is not an EU member state, but autonomously aligns with significant portions of EU law through bilateral agreements (notably the Bilateral I and II agreements with the EU) and voluntary adoption. This server tracks those relationships.
170 cross-references linking 23 Swiss statutes to EU law, covering 64 unique EU directives and regulations -- with bi-directional lookup.
| Metric | Value |
|---|---|
| EU References | 170 cross-references |
| EU Documents | 64 unique directives and regulations |
| Swiss Statutes with EU Refs | 23 statutes |
| Directives | 30 |
| Regulations | 34 |
Unlike EU/EEA member states, Switzerland's relationship with EU law is based on:
The EU tools help trace these alignment relationships -- essential for cross-border compliance work.
All content is sourced from the authoritative Swiss federal legal database:
The database is built using a census-first approach:
data/census.json)Swiss federal law is published in three official languages: German (DE), French (FR), and Italian (IT) -- all three are equally authoritative. English translations exist for selected acts but are unofficial. This database primarily contains the German-language versions as published on Fedlex. For authoritative text in French or Italian, consult the corresponding Fedlex language version.
Verified data only -- every citation is validated against official Fedlex publications. Zero LLM-generated content.
This project uses multiple layers of automated security scanning:
| Scanner | What It Does | Schedule |
|---|---|---|
| CodeQL | Static analysis for security vulnerabilities | Weekly + PRs |
| Semgrep | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |
| Gitleaks | Secret detection across git history | Every push |
| Trivy | CVE scanning on filesystem and npm dependencies | Daily |
| Socket.dev | Supply chain attack detection | PRs |
| Dependabot | Automated dependency updates | Weekly |
See SECURITY.md for the full policy and vulnerability reporting.
THIS TOOL IS NOT LEGAL ADVICE
Statute text is sourced from official Fedlex publications. However:
- This is a research tool, not a substitute for professional legal counsel
- Database covers German-language versions -- for authoritative French or Italian text, verify against the corresponding Fedlex version
- 4,149 SR entries are PDF-only and not included -- verify coverage for your specific statute
- Verify critical citations against the official SR text for court filings and formal legal work
- EU cross-references reflect alignment relationships, not binding EU membership obligations
- Court case coverage is not included -- do not rely on this for case law research
Before using professionally, read: DISCLAIMER.md | PRIVACY.md
Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment (local npm install).
git clone https://github.com/Ansvar-Systems/switzerland-law-mcp
cd switzerland-law-mcp
npm install
npm run build
npm test
npm run dev # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js # Test with MCP Inspector
npm run census # Run census against Fedlex SPARQL endpoint
npm run ingest # Ingest provisions from Fedlex
npm run build:db # Rebuild SQLite database
npm run drift:detect # Check for new/amended legislation
npm run check-updates # Check for amendments
npm run test:contract # Run MCP contract tests
npm run validate # Lint + test + contract tests
This server is part of Ansvar's Compliance Suite -- MCP servers that work together for end-to-end compliance coverage:
Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. Full regulatory text with article-level search. npx @ansvar/eu-regulations-mcp
Query US federal and state compliance laws -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. npx @ansvar/us-regulations-mcp
Query 261 security frameworks -- ISO 27001, NIST CSF, SOC 2, CIS Controls, SCF, and more. npx @ansvar/security-controls-mcp
Query UNECE R155/R156 and ISO 21434 -- Automotive cybersecurity compliance. npx @ansvar/automotive-cybersecurity-mcp
70+ national law MCPs covering Australia, Austria, Belgium, Brazil, Canada, China, Croatia, Czech Republic, Denmark, Finland, France, Germany, Ghana, Hungary, Iceland, India, Indonesia, Ireland, Israel, Italy, Japan, Kenya, Latvia, Lithuania, Luxembourg, Malaysia, Mexico, Netherlands, New Zealand, Nigeria, Norway, Philippines, Poland, Portugal, Romania, Russia, Singapore, Slovakia, Slovenia, South Africa, South Korea, Spain, Sweden, Switzerland, Thailand, Turkey, UAE, UK, US, and more.
Contributions welcome! See CONTRIBUTING.md for guidelines.
Priority areas:
If you use this MCP server in academic research:
@software{switzerland_law_mcp_2026,
author = {Ansvar Systems AB},
title = {Swiss Law MCP Server: AI-Powered Federal Legal Research Tool},
year = {2026},
url = {https://github.com/Ansvar-Systems/switzerland-law-mcp},
note = {Comprehensive Swiss federal legal database with 4,873 statutes, 102,864 provisions, and EU cross-references}
}
Apache License 2.0. See LICENSE for details.
We build AI-accelerated compliance and legal research tools for the global market. This MCP server started as our internal reference tool for Swiss law -- turns out everyone building compliance tools has the same research frustrations.
So we're open-sourcing it. Navigating 4,873 federal statutes across three languages shouldn't require a law degree.
ansvar.eu -- Stockholm, Sweden
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.