Finnish Law MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Finnish Law MCP Server Is Rikoslaki 2 luku 21 § still in force?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Finnish Law MCP Server
The Finnish law corpus is now served through the Ansvar Gateway. Connect your AI assistant (Claude, Copilot, Cursor, custom MCP client) to
https://gateway.ansvar.eu/mcp— one OAuth connection, free tier available, covering this corpus plus EU regulations, national law across dozens of audited jurisdictions (Europe + the US), and CVE/security intelligence, every result with a verbatim source citation. Start at https://ansvar.eu/docs/quickstart
Connect
Claude Code (one line):
claude mcp add ansvar --transport http https://gateway.ansvar.eu/mcpClaude Desktop / Cursor — add to claude_desktop_config.json (or mcp.json):
{
"mcpServers": {
"ansvar": {
"type": "url",
"url": "https://gateway.ansvar.eu/mcp"
}
}
}Claude.ai — Settings → Connectors → Add custom connector → paste https://gateway.ansvar.eu/mcp
First request opens an OAuth signup flow (setup details: ansvar.eu/docs/quickstart). After signup, your client is bound to your account; tier (free / premium / team / company) determines fan-out, quota, and which downstream MCPs are reachable.
Self-host this MCP
You can also clone this repo and build the corpus yourself. The schema, fetcher, and tool implementations all live here. What is not in the repo is the pre-built database — TDM and standards-licensing constraints on the upstream sources mean we host the corpus on Ansvar infrastructure rather than redistribute it as a public artifact.
Build your own: run this repo's ingestion script (entry-point varies per
repo — typically scripts/ingest.sh, npm run ingest, or make ingest;
check the repo root).
The Finlex alternative for the AI age.
Query Finnish statutes -- from Tietosuojalaki and Rikoslaki to Osakeyhtiölaki, Ympäristönsuojelulaki, and more -- directly from Claude, Cursor, or any MCP-compatible client.
If you're building legal tech, compliance tools, or doing Finnish legal research, this is your verified reference database.
Built by Ansvar Systems -- Helsinki, Finland
Related MCP server: fi-eli-mcp
Why This Exists
Swedish legal research is scattered across Riksdagen, SFS publications, lagen.nu, and EUR-Lex. Whether you're:
A lawyer validating citations in a brief or contract
A compliance officer checking if a statute is still in force
A legal tech developer building tools on Swedish law
A researcher tracing legislative history from proposition to statute
...you shouldn't need 47 browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.
This MCP server makes Swedish law searchable, cross-referenceable, and AI-readable.
Example Queries
Once connected, just ask naturally:
"What does Dataskyddslagen 3 kap. 5 § say about consent?"
"Is PUL (1998:204) still in force?"
"Find provisions about personuppgifter in Swedish law"
"What EU directives does DSL implement?"
"Which Swedish laws implement the GDPR?"
"Get the preparatory works for Dataskyddslagen"
"Compare incident reporting requirements across NIS2 Swedish implementations"
"Validate the citation NJA 2020 s. 45"
"Find Labour Court cases about discrimination from 2020-2023"
What's Included
Category | Count | Details |
Statutes | 717 laws | Comprehensive Swedish legislation |
Provisions | 31,198 sections | Full-text searchable with FTS5 |
Preparatory Works | 3,625 documents | Propositions (Prop.) and SOUs |
EU Cross-References | 668 references | 228 EU directives and regulations |
Legal Definitions | 615 terms | Extracted from statute text |
Database Size | ~70 MB | Optimized SQLite, portable |
Daily Updates | Automated | Freshness checks against Riksdagen |
Verified data only -- every citation is validated against official sources (Riksdagen, lagen.nu, EUR-Lex). Zero LLM-generated content.
See It In Action
Why This Works
Verbatim Source Text (No LLM Processing):
All statute text is ingested from Riksdagen/SFS official sources
Provisions are returned unchanged from SQLite FTS5 database rows
Zero LLM summarization or paraphrasing -- the database contains regulation text, not AI interpretations
Smart Context Management:
Search returns ranked provisions with BM25 scoring (safe for context)
Provision retrieval gives exact text by SFS number + chapter/section
Cross-references help navigate without loading everything at once
Technical Architecture:
Riksdagen API → Parse → SQLite → FTS5 snippet() → MCP response
↑ ↑
Provision parser Verbatim database queryTraditional Research vs. This MCP
Traditional Approach | This MCP Server |
Search Riksdagen by SFS number | Search by plain Swedish: "personuppgifter samtycke" |
Navigate multi-chapter statutes manually | Get the exact provision with context |
Manual cross-referencing between laws |
|
"Is this statute still in force?" → check manually |
|
Find EU basis → dig through EUR-Lex |
|
Check 5+ sites for updates | Daily automated freshness checks |
No API, no integration | MCP protocol → AI-native |
Traditional: Search Riksdagen → Download SFS PDF → Ctrl+F → Cross-reference with proposition → Check EUR-Lex for EU basis → Repeat
This MCP: "What EU law is the basis for DSL 3 kap. 5 § about consent?" → Done.
Available Tools (13)
Core Legal Research Tools (8)
Tool | Description |
| FTS5 search on 31,198 provisions with BM25 ranking |
| Retrieve specific provision by SFS + chapter/section |
| FTS5 search on case law with court/date filters |
| Get linked propositions and SOUs for a statute |
| Validate citation against database (zero-hallucination check) |
| Aggregate citations from statutes, case law, prep works |
| Format citations per Swedish conventions (full/short/pinpoint) |
| Check if statute is in force, amended, or repealed |
EU Law Integration Tools (5)
Tool | Description |
| Get EU directives/regulations for Swedish statute |
| Find Swedish laws implementing EU act |
| Search EU documents with Swedish implementation counts |
| Get EU law references for specific provision |
| Check implementation status (future, requires EU MCP) |
EU Law Integration
668 cross-references linking 49 Swedish statutes to EU law, with bi-directional lookup.
Metric | Value |
EU References | 668 cross-references |
EU Documents | 228 unique directives and regulations |
Swedish Statutes with EU Refs | 49 (68% of database) |
Directives | 89 |
Regulations | 139 |
EUR-Lex Integration | Automated metadata fetching |
Most Referenced EU Acts
eIDAS Regulation (910/2014) - 20 references
E-Signatures Directive (1999/93) - 15 references
GDPR (2016/679) - 15 references
Data Protection Directive (1995/46) - 14 references
Market Surveillance Regulation (2019/1020) - 14 references
See EU_INTEGRATION_GUIDE.md for detailed documentation and EU_USAGE_EXAMPLES.md for practical examples.
Data Sources & Freshness
All content is sourced from authoritative Swedish legal databases:
Riksdagen -- Swedish Parliament's official legal database
Svensk Forfattningssamling -- Official statute collection
Lagen.nu -- Case law database (CC-BY Domstolsverket)
EUR-Lex -- Official EU law database (metadata only)
Automated Freshness Checks (Daily)
A daily GitHub Actions workflow monitors all data sources:
Source | Check | Method |
Statute amendments | Riksdagen API date comparison | All 717 statutes checked |
New statutes | Riksdagen SFS publications (90-day window) | Diffed against database |
Case law | lagen.nu feed entry count | Compared to database |
Preparatory works | Riksdagen proposition API (30-day window) | New props detected |
EU reference staleness | Git commit timestamps | Flagged if >90 days old |
The workflow supports auto_update: true dispatch for automated sync, rebuild, version bump, and npm publishing.
Security
This project uses multiple layers of automated security scanning:
Scanner | What It Does | Schedule |
CodeQL | Static analysis for security vulnerabilities | Weekly + PRs |
Semgrep | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |
Gitleaks | Secret detection across git history | Every push |
Trivy | CVE scanning on filesystem and npm dependencies | Daily |
Docker Security | Container image scanning + SBOM generation | Daily |
Socket.dev | Supply chain attack detection | PRs |
OSSF Scorecard | OpenSSF best practices scoring | Weekly |
Dependabot | Automated dependency updates | Weekly |
See SECURITY.md for the full policy and vulnerability reporting.
Important Disclaimers
Legal Advice
THIS TOOL IS NOT LEGAL ADVICE
Statute text is sourced from official Riksdagen/SFS publications. However:
This is a research tool, not a substitute for professional legal counsel
Court case coverage is limited -- do not rely solely on this for case law research
Verify critical citations against primary sources for court filings
EU cross-references are extracted from Swedish statute text, not EUR-Lex full text
Before using professionally, read: DISCLAIMER.md | PRIVACY.md
Client Confidentiality
Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment. See PRIVACY.md for Advokatsamfundet compliance guidance.
Documentation
EU Integration Guide -- Detailed EU cross-reference documentation
EU Usage Examples -- Practical EU lookup examples
Security Policy -- Vulnerability reporting and scanning details
Disclaimer -- Legal disclaimers and professional use notices
Privacy -- Client confidentiality and data handling
Development
Setup
git clone https://github.com/Ansvar-Systems/swedish-law-mcp
cd swedish-law-mcp
npm install
npm run build
npm testRunning Locally
npm run dev # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js # Test with MCP InspectorData Management
npm run ingest -- <sfs-number> <output.json> # Ingest statute from Riksdagen
npm run ingest:cases:full-archive # Ingest case law (full archive)
npm run sync:cases # Ingest case law (incremental)
npm run sync:prep-works # Sync preparatory works
npm run extract:definitions # Extract legal definitions
npm run build:db # Rebuild SQLite database
npm run check-updates # Check for amendmentsPerformance
Search Speed: <100ms for most FTS5 queries
Database Size: ~70 MB (efficient, portable)
Reliability: 100% ingestion success rate
More Ansvar MCPs
Full fleet coverage at ansvar.eu/coverage.
Contributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
Priority areas:
Court case law expansion (currently limited coverage)
EU Regulations MCP integration (full EU law text, CJEU case law)
Historical statute versions and amendment tracking
Lower court decisions (Tingsrätt, Hovrätt)
Roadmap
Statute expansion -- 785% growth from 81 to 717 statutes (v1.1.0)
EU law integration -- 668 cross-references to 228 EU directives/regulations (v1.1.0)
Court case law expansion (scraper updated, re-ingestion needed for 12K-18K cases)
Lower court coverage (Tingsrätt, Hovrätt archives)
Historical statute versions (amendment tracking)
English translations for key statutes
Web API for programmatic access
Citation
If you use this MCP server in academic research:
@software{swedish_law_mcp_2025,
author = {Ansvar Systems AB},
title = {Swedish Law MCP Server: Production-Grade Legal Research Tool},
year = {2025},
url = {https://github.com/Ansvar-Systems/swedish-law-mcp},
note = {Comprehensive Swedish legal database with 717 statutes and EU law cross-references}
}License
Apache License 2.0. See LICENSE for details.
Data Licenses
Statutes & Decrees:
FI-Statutory-PD— Finnish statutory public domain. Tekijänoikeuslaki 9 § (404/1961 as amended by 608/2015) excludes laws and decrees, decisions and statements of public authorities, and authority-produced translations of these works from copyright protection. Verified verbatim 2026-05-17 — seedocs/audits/2026-05-17-eu-copyright-statutory-works-batch-1a-AT-BE-DK-FI-FR.md. Catalog entry:FI-Statutory-PDininfrastructure/attribution-licenses.json.Case Law: Finnish court decisions — same statutory basis (Tekijänoikeuslaki 9 § public-authority-decisions clause)
EU Metadata: EUR-Lex (EU public domain, Decision 2011/833/EU)
About Ansvar Systems
We build AI-accelerated compliance and legal research tools for the European market. This MCP server started as our internal reference tool for Swedish law -- turns out everyone building for the Swedish market has the same research frustrations.
So we're open-sourcing it. Navigating 717 statutes shouldn't require a law degree.
ansvar.eu -- Stockholm, Sweden
Available Tools
16 toolsaboutA
Server metadata, dataset statistics, freshness, and provenance. Call this to verify data coverage, currency, and content basis before relying on results.
Inputs: no named parameters.
build_legal_stanceA
Build a comprehensive set of citations for a legal question.
Searches across statutes, case law, and preparatory works simultaneously to aggregate relevant citations. Use this for broad legal research questions.
When NOT to use: If you need a specific provision or targeted search, use get_provision or search_legislation instead.
Inputs: query (required), limit, as_of_date, document_id, +2 more.
check_currencyA
Check if a Finnish statute or provision is in force (current or historical).
Returns the document's status (in_force, amended, repealed, not_yet_in_force), dates, and warnings. Provide as_of_date for historical evaluation.
When NOT to use: If you need the actual text of a provision, use get_provision. This tool only checks status.
Inputs: document_id (required), as_of_date, provision_ref.
format_citationA
Format a Finnish legal citation per standard conventions.
Formats:
full: "Laki 1050/2018 3 luku 5 §"
short: "1050/2018 3:5"
pinpoint: "3 luku 5 §"
When NOT to use: If you want to check whether a citation exists in the database, use validate_citation instead.
Inputs: citation (required), format.
get_eu_basisA
Get EU legal basis (directives and regulations) for a Finnish statute.
Returns all EU directives and regulations that this statute implements, supplements, or references. Includes reference types, article citations, and whether each EU document is a primary implementation.
Essential for understanding which EU law a Finnish statute is based on.
When NOT to use: For provision-level EU references, use get_provision_eu_basis. To find Finnish laws implementing EU law, use get_finnish_implementations.
Inputs: sfs_number (required), reference_types, include_articles.
get_finnish_implementationsA
Find Finnish statutes implementing a specific EU directive or regulation.
Given an EU document ID (e.g., "regulation:2016/679" for GDPR), returns all Finnish statutes that implement, supplement, or reference it. Shows implementation status and which articles are referenced.
Essential for finding Finnish law corresponding to EU requirements.
When NOT to use: If you have a Finnish statute and want its EU basis, use get_eu_basis (opposite direction).
Inputs: eu_document_id (required), primary_only, in_force_only.
get_preparatory_worksA
Get preparatory works (esityöt) for a Finnish statute.
Returns linked government proposals (HE), committee reports, and related documents with summaries. Essential for understanding legislative intent behind statutory provisions.
When NOT to use: If you need the statute text itself, use get_provision. Preparatory works explain legislative intent, not current law.
Inputs: document_id (required).
get_provisionA
Retrieve a specific provision from a Finnish statute.
Specify the statute number and either chapter+section or provision_ref directly. Examples:
document_id="1050/2018", chapter="1", section="1" → 1 luku 1 §
document_id="1050/2018", provision_ref="1:1" → same result
document_id="434/2003", section="6" → 6 § (flat lookup)
Omit chapter/section/provision_ref to get all provisions in the statute.
When NOT to use: If you are searching by keyword and don't know the exact statute/provision, use search_legislation instead.
Inputs: document_id (required), chapter, section, as_of_date, +1 more.
get_provision_at_dateA
Retrieve Finnish statute provision text as it read on a specific date (time-travel query).
This tool enables historical legal research by showing how a provision was worded at any point in time, accounting for all amendments since original enactment.
Use cases:
"What did Tietosuojalaki 1:3 say in 2019?"
"Show me Rikoslaki 3:1 before the 2019 amendment"
"Was this provision in force on 2020-06-15?"
Supports:
Historical versions (any date in the past)
Current version (today's date)
Future provisions (enacted but not yet in force)
Returns the complete provision text, validity dates, and optionally the amendment history showing what changed after the queried date.
Inputs: sfs (required), date (required), provision_ref (required), include_amendments.
get_provision_eu_basisA
Get EU legal basis for a specific provision within a Finnish statute.
Returns EU directives/regulations that a specific provision implements or references, with article-level precision. For example, DSL 2:1 references GDPR Article 6.1.c.
Use this for pinpoint EU compliance checks at the provision level.
When NOT to use: For statute-level EU references (not a specific provision), use get_eu_basis instead.
Inputs: sfs_number (required), provision_ref (required).
list_sourcesA
List all authoritative data sources used by this server, including provider, license, coverage, and freshness metadata. Call this to understand where the data comes from.
Inputs: no named parameters.
search_case_lawA
Search Finnish court decisions (oikeustapaukset).
Searches case summaries and keywords. Filter by court (KKO, KHO, hovioikeus, etc.) and date range.
When NOT to use: If you need statute text, use search_legislation. Case law searches only cover court decisions.
Inputs: query (required), court, limit, date_to, +1 more.
search_eu_implementationsA
Search for EU directives and regulations with Finnish implementation information.
Search by keyword, type, year range, or community. Returns matching EU documents with counts of Finnish statutes referencing them.
Use this for exploratory searches like "data protection" or "privacy" to find relevant EU law.
When NOT to use: If you already know the EU document ID, use get_finnish_implementations for direct lookup.
Inputs: type, limit, query, year_to, +3 more.
search_legislationA
Search Finnish statutes and regulations by keyword.
Searches provision text using FTS5 with BM25 ranking. Supports boolean operators (AND, OR, NOT), phrase search ("exact phrase"), and prefix matching (term*).
Returns matched provisions with snippets, relevance scores, and document metadata.
When NOT to use: If you already know the exact statute number and provision, use get_provision instead. If you need a comprehensive multi-source answer, use build_legal_stance.
Inputs: query (required), limit, status, as_of_date, +1 more.
validate_citationA
Validate a Finnish legal citation against the database.
Parses the citation, checks that the document and provision exist, and returns warnings about status (repealed, amended). This is the zero-hallucination enforcer.
Supported formats:
"Laki 1050/2018 1 luku 1 §"
"1050/2018 1:1"
"SFS 2018:218 1 kap. 1 §" (legacy compatibility)
"Prop. 2017/18:105"
"SOU 2017:39"
"NJA 2020 s. 45"
When NOT to use: If you want to format a citation string, use format_citation. This tool checks existence in the database.
Inputs: citation (required).
validate_eu_complianceA
Validate EU compliance status for a Finnish statute or provision.
Checks for:
References to repealed EU directives (e.g., Data Protection Directive 95/46/EC)
Missing implementation status
Outdated references
Returns compliance status (compliant, partial, unclear, not_applicable) with warnings and recommendations.
Note: This is Phase 1 validation. Full compliance checking against EU requirements will be added in future phases.
When NOT to use: For basic EU reference lookup, use get_eu_basis. This tool assesses compliance status.
Inputs: sfs_number (required), provision_ref, eu_document_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool targets a distinct resource and action: validation, searching, retrieval, formatting, status checks, EU lookups, and metadata. Potential overlaps like validate_citation vs check_currency are clearly differentiated by input and purpose, and get_eu_basis vs get_provision_eu_basis are scoped by statute vs provision.
The vast majority of tools follow a consistent snake_case verb_noun pattern (search_legislation, get_provision, validate_eu_compliance). The single exception is 'about', which breaks the pattern, and get_provision_at_date has an extra preposition, though still clear.
16 tools is on the higher end of reasonable for a legal research server that spans statutes, case law, preparatory works, EU implementations, citation handling, and compliance. Each tool serves a distinct purpose, so the count feels justified rather than bloated.
The server covers core workflows comprehensively: searching, retrieving, validating, formatting, historical versions, and EU compliance. A notable gap is the lack of a direct tool to fetch a full court decision text (only search_case_law with summaries and keywords), which agents may need for deep case analysis.
Maintenance
Related MCP Connectors
Resolve, search and verify legal citations against the official sources, with provenance.
Lithuanian legislation and court practice for your AI agent. Search laws and 2.4 million court decisions, read the exact article or ruling paragraph, see which version was in force on any date, follow citations both ways and check a quote against its source. Lithuanian and EU law. Free during beta: sign in with your email. --- Lietuvos teisės šaltiniai jūsų DI asistente (Claude, ChatGPT ir kt.). Galiojančios įstatymų ir kitų teisės aktų redakcijos su datomis, teismų praktika su punktais, VMI ir kitų institucijų paaiškinimai, citatų patikra. Kiekvienas atsakymas su nuoroda į oficialų šaltinį. Teisininkams, buhalteriams, personalo, viešųjų pirkimų ir kitiems specialistams.
One connection to Avokata, Rekvira and Victano inside your AI assistant. Discover and enable services for Lithuanian law and court practice, EU regulation, public tenders and grant calls. Use their tools and guided workflows without adding each connector separately. Free during beta; sign in with your email. --- Viena MCP jungtis prie „Avokata“, „Rekvira“ ir „Victano“ jūsų DI asistente (Claude, ChatGPT ir kt.). Atraskite ir įjunkite reikiamas paslaugas: Lietuvos teisę ir teismų praktiką, ES reguliavimą, viešuosius pirkimus ir finansavimo kvietimus. Naudokitės jų įrankiais ir darbo eigomis nepridėdami kiekvienos jungties atskirai. Beta laikotarpiu nemokama; prisijunkite el. paštu.
Current law as data for AI: search, read and verify statutes and citations. CIS countries first.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables querying and analyzing Danish legislation, including search, citation validation, currency checks, and EU law integration, directly from AI assistants.1550 npm1Apache 2.0
- AlicenseAqualityBmaintenanceEnables accessing Finnish legislation from the Finlex open-data API, listing statutes by year and retrieving their full texts with ELI identifiers and Finnish citations.41Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server providing direct, citable access to Finnish legislation by retrieving statute text from Finlex open data, enabling AI assistants to answer legal queries with accurate citations.MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to search, retrieve, validate, and cross-reference Hungarian statutes and EU law, including full-text provisions, citation checks, and compliance status via MCP.55 npmApache 2.0