{
  "markdown": "# se-eli-mcp\n\n<!-- mcp-name: io.github.matematicsolutions/se-eli-mcp -->\n\n\n## Install (one command)\n\nPublished on PyPI + MCP Registry (`io.github.matematicsolutions/se-eli-mcp`). Run without cloning:\n\n```bash\nuvx se-eli-mcp\n```\n\nConfigure your MCP client (stdio):\n\n```json\n{ \"mcpServers\": { \"se-eli-mcp\": { \"command\": \"uvx\", \"args\": [\"se-eli-mcp\"] } } }\n```\n\n### Windows 11 with Smart App Control\n\nSmart App Control blocks unsigned executables, which covers `uvx.exe`, `pip.exe`\nand the `se-eli-mcp.exe` launcher that pip writes at install time. The `python.exe` and\n`py.exe` from the python.org installer are signed by the Python Software\nFoundation, so running the module through the interpreter works:\n\n```bash\npython -m pip install se-eli-mcp\npython -m se_eli_mcp\n```\n\n`pip.exe` is blocked for the same reason, so install with `python -m pip`, not\n`pip install`. If `python` is not on PATH, use the Windows launcher: `py -3 -m se_eli_mcp`.\n\n```json\n{ \"mcpServers\": { \"se-eli-mcp\": { \"command\": \"python\", \"args\": [\"-m\", \"se_eli_mcp\"] } } }\n```\n\nDo not turn Smart App Control off to work around this - it cannot be re-enabled\nwithout reinstalling Windows.\n\nBuilding from source: see [Install](#install).\n\nAn MCP server for **Swedish statutes (SFS, Svensk författningssamling)**, served as open data\nby the **Riksdagen** (parliament) at `data.riksdagen.se` (keyless). It gives an AI agent the\n**consolidated** text of an act with a verifiable citation: a persistent identifier, a\nhuman-readable citation, and a link to the official source.\n\nPart of the **eu-legal-mcp** line by [MateMatic](https://matematic.co) — one connector per EU\nmember state, the same citation contract everywhere.\n\n> **On ELI.** Sweden does **not** publish native ELI (`/eli/`) URIs. To keep the line's\n> contract honest, `eli_uri` carries the official persistent document identifier instead — the\n> `data.riksdagen.se/dokument` URI (e.g. `https://data.riksdagen.se/dokument/sfs-2018-218`).\n> The SFS number (`2018:218`) is the canonical Swedish citation. The connector never fabricates\n> an `/eli/` URI and says so in its tool instructions. See `DISCOVERY.md`.\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `se_search(query)` | Free-text search over SFS statutes (title and full text). Returns acts, each with the citation contract. |\n| `se_get_act(sfs_number)` | Metadata for one act by its SFS number (e.g. `2018:218`) — title, authority, date, consolidation marker. |\n| `se_get_text(sfs_number)` | The full consolidated plain text of one act. |\n| `se_coverage()` | Declare what this connector covers, when each family was captured, and - explicitly - what it does NOT cover. Every gap carries a fallback. |\n\nEvery response carries the **citation contract**:\n\n- `eli_uri` — the official persistent identifier (document URI; see the ELI note above).\n- `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*.\n- `source_url` — the browsable `data.riksdagen.se` page for the act.\n- `consolidated_through` — the last amendment folded into the text (the \"ändrad t.o.m.\" marker).\n\n## Install\n\n```bash\npip install -e \".[dev]\"\n```\n\nRegister it with your MCP client (see `.mcp.json.example`):\n\n```json\n{\n  \"mcpServers\": {\n    \"se-eli-mcp\": {\n      \"command\": \"se-eli-mcp\",\n      \"env\": {\n        \"SE_ELI_BASE_URL\": \"https://data.riksdagen.se\",\n        \"SE_ELI_CACHE_DIR\": \"~/.matematic/cache/se-eli\",\n        \"SE_ELI_AUDIT_DIR\": \"~/.matematic/audit\"\n      }\n    }\n  }\n}\n```\n\n## Design\n\n- **Public data only.** Read-only against the keyless Riksdagen open-data API; nothing is sent\n  beyond the query / SFS number.\n- **Audit log.** Every call appends one JSON line to `~/.matematic/audit/se-eli-mcp.jsonl`\n  (AI Act art. 12 record-keeping).\n- **Vendor-neutral.** No LLM provider, no telemetry; own backoff + on-disk cache.\n- **No fabrication.** Identifiers and titles are parsed from the source record. If Riksdagen's\n  schema changes, the connector fails loudly rather than returning stale or invented data.\n\nSee `CONSTITUTION.md` (the 4 principles) and `DISCOVERY.md` (how the source was mapped).\n\n## Tests\n\n```bash\npytest tests/test_instructions_drift.py tests/test_parse.py   # offline\npytest tests/test_smoke.py                                     # live Riksdagen API\n```\n\n## Licence\n\nApache-2.0. The Swedish legislation served is official public data of the Kingdom of Sweden;\nthis connector adds no rights over it.\n",
  "bytes": 4493,
  "sha": "31cee89f87cd764ef60a307362f92d0298f1282b39f6699bcdc35f172ef64d3b",
  "repo_slug": "matematicsolutions/se-eli-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_matematicsolutions_se_eli_mcp_d5549a8e/readme"
}