matematicsolutions

se-eli-mcp

Community matematicsolutions
Updated

MCP server for Swedish statutes (SFS) via the Riksdagen open-data API - consolidated acts with persistent identifiers and verifiable citations. Seventh EU connector in the eu-legal-mcp line.

se-eli-mcp

Instalacja (jedna komenda)

Opublikowany na PyPI + MCP Registry (io.github.matematicsolutions/se-eli-mcp). Uruchomienie bez klonowania:

uvx se-eli-mcp

Konfiguracja klienta MCP (stdio):

{ "mcpServers": { "se-eli-mcp": { "command": "uvx", "args": ["se-eli-mcp"] } } }

(Budowanie ze źródeł — niżej.)

An MCP server for Swedish statutes (SFS, Svensk författningssamling), served as open databy the Riksdagen (parliament) at data.riksdagen.se (keyless). It gives an AI agent theconsolidated text of an act with a verifiable citation: a persistent identifier, ahuman-readable citation, and a link to the official source.

Part of the eu-legal-mcp line by MateMatic — one connector per EUmember state, the same citation contract everywhere.

On ELI. Sweden does not publish native ELI (/eli/) URIs. To keep the line'scontract honest, eli_uri carries the official persistent document identifier instead — thedata.riksdagen.se/dokument URI (e.g. https://data.riksdagen.se/dokument/sfs-2018-218).The SFS number (2018:218) is the canonical Swedish citation. The connector never fabricatesan /eli/ URI and says so in its tool instructions. See DISCOVERY.md.

Tools

Tool What it does
se_search(query) Free-text search over SFS statutes (title and full text). Returns acts, each with the citation contract.
se_get_act(sfs_number) Metadata for one act by its SFS number (e.g. 2018:218) — title, authority, date, consolidation marker.
se_get_text(sfs_number) The full consolidated plain text of one act.

Every response carries the citation contract:

  • eli_uri — the official persistent identifier (document URI; see the ELI note above).
  • human_readable_citation — the act title, which embeds the SFS number, e.g. Lag (2018:218) med kompletterande bestämmelser till EU:s dataskyddsförordning.
  • source_url — the browsable data.riksdagen.se page for the act.
  • consolidated_through — the last amendment folded into the text (the "ändrad t.o.m." marker).

Install

pip install -e ".[dev]"

Register it with your MCP client (see .mcp.json.example):

{
  "mcpServers": {
    "se-eli-mcp": {
      "command": "se-eli-mcp",
      "env": {
        "SE_ELI_BASE_URL": "https://data.riksdagen.se",
        "SE_ELI_CACHE_DIR": "~/.matematic/cache/se-eli",
        "SE_ELI_AUDIT_DIR": "~/.matematic/audit"
      }
    }
  }
}

Design

  • Public data only. Read-only against the keyless Riksdagen open-data API; nothing is sentbeyond the query / SFS number.
  • Audit log. Every call appends one JSON line to ~/.matematic/audit/se-eli-mcp.jsonl(AI Act art. 12 record-keeping).
  • Vendor-neutral. No LLM provider, no telemetry; own backoff + on-disk cache.
  • No fabrication. Identifiers and titles are parsed from the source record. If Riksdagen'sschema changes, the connector fails loudly rather than returning stale or invented data.

See CONSTITUTION.md (the 4 principles) and DISCOVERY.md (how the source was mapped).

Tests

pytest tests/test_instructions_drift.py tests/test_parse.py   # offline
pytest tests/test_smoke.py                                     # live Riksdagen API

Licence

Apache-2.0. The Swedish legislation served is official public data of the Kingdom of Sweden;this connector adds no rights over it.

MCP Server · Populars

MCP Server · New

    PascaleBeier

    HitKeep

    HitKeep is privacy-first analytics for humans and AI agents, self-hosted or in managed EU/US cloud regions.

    Community PascaleBeier
    prometheus

    prometheus-mcp

    MCP server for LLMs to interact with Prometheus

    Community prometheus
    TencentEdgeOne

    edgeone-makers-mcp

    An MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.

    Community TencentEdgeOne
    bonfire-systems

    reaper-mcp

    A comprehensive Model Context Protocol (MCP) server that enables AI agents to create fully mixed and mastered tracks in REAPER with both MIDI and audio capabilities.

    Community bonfire-systems
    Wanyi424

    wanyi-watermark

    抖音、小红书等平台去水印,视频解析工具,支持MCP服务

    Community Wanyi424