Se MCP Server

MCP server for Swedish statutes (SFS) via Riksdagen open data with verifiable citations.

Local serverstdioPython

What is the Se MCP server?

Se MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP server for Swedish statutes (SFS) via Riksdagen open data with verifiable citations.

What you get

Published on PyPI + MCP Registry (io.github.matematicsolutions/se-eli-mcp). Run without cloning:

Setting it up

Installation goes through your MCP client rather than a global install: point it at se-eli-mcp on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

What the assistant can call

Once Se is connected, these are the calls the assistant has available:

  • 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)

Configuration and credentials

You will need 3 environment variables: SE_ELI_BASE_URL, SE_ELI_CACHE_DIR, SE_ELI_AUDIT_DIR. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the se mcp server does with a few real requests.

Choosing this one

This sits in the planning and project tracking group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Se's toolset — eli_uri, human_readable_citation, source_url and 1 more — is a fair guide to whether it matches your workflow. It is maintained by matematicsolutions; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Se's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
eli_urithe official persistent identifier (document URI; see the ELI note above).
human_readable_citationthe act title, which embeds the SFS number, e.g. *Lag (2018:218) med kompletterande bestämmelser till EU:s dataskyddsförordning*.
source_urlthe browsable data.riksdagen.se page for the act.
consolidated_throughthe last amendment folded into the text (the "ändrad t.o.m." marker).

How to install the Se MCP server

Configure your MCP client (stdio):

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
SE_ELI_BASE_URLEndpoint or connection string the server talks to.Yes
SE_ELI_CACHE_DIRFilesystem location the server is allowed to use.Optional
SE_ELI_AUDIT_DIRFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Se to eli uri.
  • Use Se to human readable citation.
  • Use Se to source url.

Frequently asked questions

It connects Se to MCP-compatible AI assistants such as Claude and Cursor, exposing 4 tools (eli_uri, human_readable_citation, source_url, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Se directly.