home / mcp / swiss law mcp server

Swiss Law MCP Server

Query Swiss legislation from MCP clients with full-text search, provision retrieval, and currency checks.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ansvar-systems-switzerland-law-mcp": {
      "url": "https://switzerland-law-mcp.vercel.app/mcp"
    }
  }
}

You can query Swiss law from an MCP client to search, retrieve, and verify provisions across federal statutes, with EU cross-references and currency checks. This server makes Swiss legislation searchable, cross-referenceable, and AI-friendly, so you can validate citations, assess in-force status, and build legal stances directly from your preferred MCP client.

How to use

Connect to the Swiss Law MCP Server using your MCP client. You can use the hosted HTTP endpoint for remote access or run the server locally and connect via MCP tooling. Once connected, ask natural language questions such as what a provision says, how a statute is implemented, or whether a statute is currently in force. Use the built-in tools to search, retrieve exact provisions, verify citations, and aggregate information across statutes to build a legal position.

How to install

Prerequisites: you need Node.js and npm installed on your system. You also need an MCP client or interface (Claude, Cursor, Copilot, or any MCP-compatible client). Follow the steps below to get the Swiss Law MCP Server up and running.

Install and run the server locally

# Install and build the package from source
git clone https://github.com/Ansvar-Systems/Switzerland-law-mcp
cd Switzerland-law-mcp
npm install
npm run build

# Start the server for local use
npm run dev

Connect from an MCP client using npx

You can run the MCP server locally using npx and connect the client to the local instance. This is a quick way to start without installing dependencies globally.

npx @ansvar/switzerland-law-mcp

Connect to the hosted MCP server

You can connect any MCP client to the hosted endpoint for Swiss law queries. Use the provided HTTP URL in your client configuration.

Notes on usage with clients

If you use Claude Desktop, Copilot, or other MCP clients, add the server as an MCP endpoint or transport URL as shown in the integration guides. You will receive exact provisions, currency checks, and EU cross-references directly from the server.

Security and privacy considerations

Queries are processed by the MCP server and responses are returned to your client. For privileged matters, consider on-premise deployment to keep data within your environment.

Additional sections

This MCP server provides a structured, verbatim database of Swiss statutes with full-text search and direct provision retrieval. It supports fast currency checks, citation validation, and cross-references to EU acts. The data sources are maintained to reflect official Swiss publications, and the tooling is designed to minimize hallucinations by returning exact text from the database.

Available tools

search_legislation

Perform a full-text search across all provisions with BM25 ranking to quickly locate relevant sections.

get_provision

Retrieve a specific provision by statute, including chapter and section identifiers.

check_currency

Verify whether a statute is in force, amended, or repealed.

validate_citation

Validate a legal citation against the database to ensure accuracy.

build_legal_stance

Aggregate citations from multiple statutes to form a legal stance on a topic.

format_citation

Format citations according to Swiss conventions (full, short, pinpoint).

list_sources

List all available statutes with metadata to understand coverage.

about

Provide server information, capabilities, and coverage summary.

get_eu_basis

Retrieve EU directives or regulations that form the basis for Swiss statutes.

get_swiss_implementations

Find Swiss laws that implement a given EU act.

search_eu_implementations

Search EU documents and count Swiss implementations.

get_provision_eu_basis

Get EU law references for a specific provision.

validate_eu_compliance

Check the implementation status of EU directives within Swiss law.