home / mcp / swedish law mcp server

Swedish Law MCP Server

Queries 717 Swedish statutes and EU cross-references from Claude and MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ansvar-systems-danish-law-mcp": {
      "url": "https://swedish-law-mcp.vercel.app/mcp",
      "headers": {
        "MCP_ENDPOINT": "https://swedish-law-mcp.vercel.app/mcp"
      }
    }
  }
}

You can query 717 Swedish statutes directly from Claude and other MCP-compatible clients using the Swedish Law MCP Server. It centralizes Swedish law text, cross-references, and AI-friendly access so you can validate citations, check currency, and retrieve exact provisions from a trusted, official-source-backed database.

How to use

Connect your MCP client to the hosted Swedish Law MCP endpoint to start querying provisions, preparatory works, and EU cross-references. You can search for specific acts, retrieve exact text by SFS number and section, check if a statute is still in force, and compare provisions across sources. Use natural language queries like “What does Dataskyddslagen say about consent?” or “Show EU directives implementing the GDPR.” The MCP delivers exact provisions with context and cross-references directly from the database.

How to install

Prerequisites you need before installing: Node.js and npm installed on your system.

Option A: Use remotely without installing anything on your side.

Option B: Run locally with npm.

Follow these steps to get started quickly.

# 1) Use remotely (no install needed): connect to the hosted MCP
# Endpoint: https://swedish-law-mcp.vercel.app/mcp
```
```bash
# 2) Run locally (npm):
npx @ansvar/swedish-law-mcp
```
```bash
# 3) If you want to run a local development server:
npm install
npm run build
npm run dev
```
```bash
# 4) If you prefer a direct command path for local start:
npm install
npm run build
npm run start

Additional setup for clients and configuration

To connect specific clients, use the following configuration examples. These show how to point Claude or other MCP clients to the remote endpoint.

Notes on usage patterns

- Use the remote endpoint for quick trials without local setup. - For extended development or offline work, run the local server and point your MCP clients to the local instance.

Available tools

search_legislation

FTS5-based search across 31,198 provisions with BM25 ranking to quickly locate relevant statutes or provisions.

get_provision

Retrieve a specific provision by SFS number plus chapter and section to obtain exact text.

search_case_law

Search case law with filters for court and date to find relevant decisions.

get_preparatory_works

Fetch linked propositions and SOUs to provide legislative context for statutes.

validate_citation

Check a given citation against the database to ensure accuracy and reduce errors.

build_legal_stance

Aggregate citations from statutes, case law, and preparatory works to support a legal position.

format_citation

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

check_currency

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

get_eu_basis

Retrieve EU directives or regulations that form the basis for a Swedish statute.

get_swedish_implementations

Identify Swedish laws that implement a given EU act.

search_eu_implementations

Search EU implementation documents and count Swedish implementations.

get_provision_eu_basis

Get EU law references for a specific provision.

validate_eu_compliance

Check the implementation status of EU requirements (status checks may require EU MCP).