home / mcp / swedish law mcp server

Swedish Law MCP Server

Queries 717 Swedish statutes and EU cross-references directly from Claude and MCP clients for legal research.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ansvar-systems-swedish-law-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@ansvar/swedish-law-mcp"
      ],
      "env": {
        "YOUR_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

You can query Swedish statutes and EU cross-references directly from Claude, Cursor, or any MCP-compatible client using the Swedish Law MCP Server. It makes extensive Swedish law searchable, cross-referenceable, and AI-readable, enabling precise provisions, up-to-date status checks, and linked preparatory works for efficient legal research and compliance tooling.

How to use

Connect your MCP client to the Swedish Law MCP Server to search 717 statutes, retrieve exact provisions, and explore EU cross-references. Use natural-language queries to locate specific provisions, check if a statute is still in force, access preparatory works, and retrieve related EU directives and regulations. Use the furnished tools to validate citations, aggregate legal materials, and format citations for Swedish legal conventions.

How to install

Prerequisites you need before installation: Node.js (npm) for server setup and running command-line MCP clients. Ensure you have internet access to pull dependencies.

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

Option 2: Cursor / VS Code

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

Option 3: Local Development Setup (Full Data)

For access to the complete production database, run these commands to fetch and build the server locally.

git clone https://github.com/Ansvar-Systems/swedish-law-mcp
cd swedish-law-mcp
npm install
npm run build

Then configure your Claude Desktop to point to the built distribution.

{
  "mcpServers": {
    "swedish-law": {
      "command": "node",
      "args": ["/absolute/path/to/swedish-law-mcp/dist/index.js"]
    }
  }
}

Available tools

search_legislation

FTS5 search on 31,198 provisions with BM25 ranking to find relevant statutes quickly.

get_provision

Retrieve a specific provision using its SFS number plus chapter and section for exact text.

search_case_law

Search case law with filters for court and date to locate relevant rulings.

get_preparatory_works

Fetch linked propositions and SOUs for statutes to explore legislative history.

validate_citation

Check whether a citation is valid against the database content to prevent errors.

build_legal_stance

Aggregate citations from statutes, case law, and preparatory works for a cohesive view.

format_citation

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

check_currency

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

get_eu_basis

Retrieve EU directives and regulations referenced by Swedish statutes.

get_swedish_implementations

Find Swedish acts that implement specific EU acts.

search_eu_implementations

Search EU documents with counts of Swedish implementations.

get_provision_eu_basis

Obtain EU law references for a given provision.

validate_eu_compliance

Check implementation status of EU acts (status may be future or require more MCP integration).