Latvian Law MCP Server
Latvian Law MCP Server
The Latvian 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 Latvijas Vēstnesis alternative for the AI age.
Query 2,249 Latvian statutes -- from the Fizisko personu datu apstrādes likums and Krimināllikums to the Civillikums, Darba likums, and more -- directly from Claude, Cursor, or any MCP-compatible client.
If you're building legal tech, compliance tools, or doing Latvian legal research, this is your verified reference database.
Built by Ansvar Systems -- Stockholm, Sweden
Related MCP server: Icelandic Law MCP
Why This Exists
Latvian legal research means navigating likumi.lv, the Latvijas Vēstnesis official gazette, and EUR-Lex for EU implementation status -- across a comprehensive system of codes and regulations. Whether you're:
A lawyer validating citations before the Augstākā tiesa (Supreme Court) or Satversmes tiesa (Constitutional Court)
A compliance officer checking GDPR implementation under Fizisko personu datu apstrādes likums or NIS2 requirements
A legal tech developer building tools on Latvian law
A researcher tracing EU directive transposition across 2,249 statutes
...you shouldn't need dozens of browser tabs and manual cross-referencing. Ask Claude. Get the exact provision. With context.
This MCP server makes Latvian law searchable, cross-referenceable, and AI-readable.
Example Queries
Once connected, just ask naturally:
"Ko nosaka Fizisko personu datu apstrādes likuma 25. pants par datu apstrādi?"
"Vai Krimināllikums ir spēkā?"
"Meklēt 'personas datu aizsardzība' Latvijas tiesību aktos"
"Kādi ES tiesību akti ir Darba likuma pamatā?"
"Kuri Latvijas likumi īsteno NIS2 direktīvu?"
"Ko paredz Civillikuma 1785. pants par saistību tiesībām?"
"Validēt citātu 'Fizisko personu datu apstrādes likums, 25. pants'"
"Salīdzināt datu aizsardzības prasības dažādās NIS2 Latvijas implementācijās"
What's Included
类别 | 数量 | 详情 |
法规 | 2,249 部法规 | 来自 likumi.lv 的全面拉脱维亚立法 |
条款 | 57,679 条 | 支持 FTS5 全文搜索 |
高级版:判例法 | 127,042 项判决 | Augstākā tiesa、Satversmes tiesa、Administratīvā tiesa(高级版层级) |
高级版:准备文件 | 29,516 份文件 | Saeima anotācijas 和解释性报告(高级版层级) |
数据库大小 | 131 MB | 优化过的 SQLite,可移植 |
每日更新 | 自动化 | 针对 likumi.lv 的新鲜度检查 |
仅限经过验证的数据——每条引文都对照官方来源(likumi.lv、Latvijas Vēstnesis)进行验证。零 LLM 生成内容。
高级版数据集非常庞大:来自拉脱维亚三级法院的 127,042 项法院判决,外加 29,516 份准备文件。
See It In Action
Why This Works
Verbatim Source Text (No LLM Processing):
All statute text is ingested from likumi.lv (the official consolidated legislation portal, maintained by the Republic of Latvia)
Provisions are returned unchanged from SQLite FTS5 database rows
Zero LLM summarization or paraphrasing -- the database contains statute text, not AI interpretations
Smart Context Management:
Search returns ranked provisions with BM25 scoring (safe for context)
Provision retrieval gives exact text by statute identifier + section number
Cross-references help navigate without loading everything at once
Technical Architecture:
likumi.lv --> Parse --> SQLite --> FTS5 snippet() --> MCP response
^ ^
Provision parser Verbatim database queryTraditional Research vs. This MCP
传统方式 | 此 MCP 服务器 |
按法规名称搜索 likumi.lv | 用纯拉脱维亚语搜索:"personas datu apstrāde piekrišana" |
手动浏览多章节法规 | 获取带有上下文的精确条款 |
手动进行法律之间的交叉引用 |
|
"Vai šis likums ir spēkā?" ——手动检查 |
|
查找欧盟基础——翻查 EUR-Lex |
|
无 API,无集成 | MCP 协议——AI 原生 |
传统方式: Meklēt likumi.lv --> Pārvietoties daudzpantu likumos --> Ctrl+F --> Salīdzināt ar ES direktīvām --> Atkārtot
此 MCP: "Kāds ES tiesību akts ir Fizisko personu datu apstrādes likuma 25. panta pamatā?" --> 完成。
Available Tools (13)
Core Legal Research Tools (8)
工具 | 描述 |
| FTS5 全文搜索,覆盖 57,679 个条款,采用 BM25 排序。支持拉脱维亚语、带引号的短语、布尔运算符、前缀通配符 |
| 通过法规标识符 + 章节号检索特定条款(例如,"Fizisko personu datu apstrādes likums" + "25") |
| 检查法规是现行有效、已修正还是已废止 |
| 对照数据库验证引文——零幻觉检查 |
| 聚合多个法规中关于某个法律主题的引文 |
| 按照拉脱维亚惯例格式化引文(完整/简短/精确定位) |
| 列出所有可用法规及其元数据、覆盖范围和来源 |
| 服务器信息、能力、数据集统计和覆盖范围摘要 |
EU Law Integration Tools (5)
工具 | 描述 |
| 获取拉脱维亚法规对应的欧盟指令/条例 |
| 查找实施特定欧盟法案的拉脱维亚法律 |
| 搜索带有拉脱维亚实施数量的欧盟文件 |
| 获取特定条款的欧盟法律引用 |
| 检查实施状态(未来,需要 EU MCP) |
EU Law Integration
拉脱维亚于 2004 年 5 月 1 日加入欧盟。所有欧盟条例直接适用;指令需要转化到拉脱维亚法律中。
指标 | 值 |
欧盟成员资格 | 自 2004 年 5 月 1 日起 |
Acquis communautaire | 完整的欧盟法律秩序适用 |
GDPR | 通过 Fizisko personu datu apstrādes likums 实施 |
NIS2 | 通过 Informācijas tehnoloģiju drošības likums 转化 |
AML5 | 通过 Noziedzīgi iegūtu līdzekļu legalizācijas un terorisma finansēšanas novēršanas likums 实施 |
EUR-Lex 集成 | 交叉引用将拉脱维亚法规链接到原始欧盟法案 |
Key EU-Derived Latvian Legislation
Fizisko personu datu apstrādes likums —— GDPR 实施(条例 2016/679)
Informācijas tehnoloģiju drošības likums —— NIS2 转化(指令 2022/2555)
Finanšu instrumentu tirgus likums —— MiFID II 转化
Elektronisko sakaru likums —— 电子通信法典转化
Noziedzīgi iegūtu līdzekļu likums —— AML 指令转化
See EU_INTEGRATION_GUIDE.md for detailed documentation and EU_USAGE_EXAMPLES.md for practical examples.
Data Sources & Freshness
所有内容均来自权威的拉脱维亚法律数据库:
likumi.lv -- 官方综合法规,拉脱维亚共和国
Latvijas Vēstnesis -- 拉脱维亚共和国官方公报
EUR-Lex -- 欧盟官方法律数据库(交叉引用元数据)
数据来源
字段 | 值 |
权威机构 | 拉脱维亚共和国(Latvijas Republika) |
语言 | 拉脱维亚语(唯一官方立法语言) |
覆盖范围 | 拉脱维亚所有国家立法;欧盟法规直接适用 |
来源 | likumi.lv |
自动时效性检查(每日)
一个每日 GitHub Actions 工作流监控 likumi.lv 的变更:
检查项 | 方法 |
法规修订 | 与全部 2,249 部法规进行 likumi.lv API 日期比较 |
新法规 | likumi.lv 索引比较(90 天窗口) |
已废止法规 | 状态变更检测 |
EU 引用过期情况 | 超过 90 天即标记 |
仅含经过验证的数据 -- 每条引用均对照官方来源进行验证。零 LLM 生成内容。
安全
本项目使用多层自动化安全扫描:
扫描器 | 功能 | 频率 |
CodeQL | 安全漏洞静态分析 | 每周 + PR |
Semgrep | SAST 扫描(OWASP top 10、密钥、TypeScript) | 每次推送 |
Gitleaks | 跨 git 历史进行密钥检测 | 每次推送 |
Trivy | 文件系统和 npm 依赖的 CVE 扫描 | 每日 |
Socket.dev | 供应链攻击检测 | PR |
Dependabot | 自动化依赖更新 | 每周 |
完整政策与漏洞报告请参阅 SECURITY.md。
重要免责声明
法律建议
本工具不构成法律建议
法规文本来源于 likumi.lv(官方综合法规)。然而:
这是一个研究工具,不能替代专业法律顾问
免费层级不包含法院判例 -- 请直接查询 Augstākā tiesa(AT)和 Satversmes tiesa 数据库;高级层级提供 127,042 项判决
在提交法院文件前,请对照原始来源核实关键引用
EU 交叉引用源于法规文本,而非 EUR-Lex 全文分析
likumi.lv 上的综合版本具有权威性,但在法院诉讼中请对照 Latvijas Vēstnesis 核实颁布日期
专业使用前,请阅读: DISCLAIMER.md | PRIVACY.md
客户保密性
查询经由 Claude API 传输。对于特权或机密事务,请使用本地部署。请参考 Latvijas Zvērinātu advokātu padome(拉脱维亚宣誓律师委员会)关于在法律实践中使用 AI 的指南。
开发
设置
git clone https://github.com/Ansvar-Systems/Latvian-law-mcp
cd Latvian-law-mcp
npm install
npm run build
npm test本地运行
npm run dev # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js # Test with MCP Inspector数据管理
npm run ingest # Ingest statutes from likumi.lv
npm run ingest:linked # Ingest linked legislation
npm run ingest:corpus # Full corpus ingestion
npm run build:db # Rebuild SQLite database
npm run drift:detect # Run drift detection against anchors
npm run check-updates # Check for amendments性能
搜索速度: 大多数 FTS5 查询 <100ms
数据库大小: 131 MB(优化、可移植)
可靠性: 2,249 部法规的导入成功率为 100%
更多 Ansvar MCP
完整套件覆盖见 ansvar.eu/coverage。
贡献
欢迎贡献!指南请参阅 CONTRIBUTING.md。
优先领域:
法院判例扩展(免费层级 -- Augstākā tiesa 判决)
EU 交叉引用扩展(完整指令到法规映射)
历史法规版本与修订追踪
下级法院判决(Apgabaltiesa、Rajona tiesa 档案)
路线图
带 FTS5 搜索的核心法规数据库
完整语料库导入(2,249 部法规,57,679 项条款)
EU 法律整合工具
Vercel Streamable HTTP 部署
高级数据集:127,042 项判例法判决 + 29,516 份立法准备文件
法院判例扩展(免费层级)
下级法院覆盖(Apgabaltiesa 档案)
历史法规版本(修订追踪)
用于程序化访问的 Web API
引用
如果您在学术研究中使用此 MCP 服务器:
@software{latvian_law_mcp_2026,
author = {Ansvar Systems AB},
title = {Latvian Law MCP Server: AI-Powered Legal Research Tool},
year = {2026},
url = {https://github.com/Ansvar-Systems/Latvian-law-mcp},
note = {2,249 Latvian statutes with 57,679 provisions and EU law cross-references}
}许可证
Apache License 2.0。详情请参阅 LICENSE。
数据许可证
法规与立法:
LV-Statutory-PD— 根据 Autortiesību likums §6,拉脱维亚法定公有领域。该条款将规范性文件和行政文件、国家及地方政府机构发布的其他文件、法院判决、官方翻译、官方综合文本以及法律规定的地图排除在版权保护之外。逐字依据:likumi.lv 综合文本(自 2023 年 4 月 5 日起生效)。允许商业再利用,无需署名,不要求相同方式共享。完整解读请参阅 Ansvar 许可证目录和 2026-05-17 EU 法定作品逐字审计报告。EU 元数据: EUR-Lex(欧盟公有领域)
关于 Ansvar Systems
我们为欧洲市场构建 AI 加速的合规和法律研究工具。这个 MCP 服务器最初是我们内部用于拉脱维亚法律的参考工具 -- 事实证明,所有为波罗的海和欧盟市场开发的人都面临着相同的研究困扰。
因此我们将其开源。查阅 2,249 部法规及其 EU 来源指令不应需要法律学位。
ansvar.eu -- 瑞典斯德哥尔摩
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceEnables querying and analyzing Slovak legislation via natural language, including full-text search, provision retrieval, and EU law integration.1082Apache 2.0
- AlicenseAqualityFmaintenanceProvides access to 1,709 Icelandic statutes and 19,026 provisions with full-text search, citation validation, and EU/EEA law integration, enabling legal research and compliance checks through natural language queries.111091Apache 2.0
- Alicense-qualityFmaintenanceEnables querying Estonian legislation from Riigi Teataja, including full-text search across 1,602 statutes and 63,624 provisions, with EU law integration and citation validation.95Apache 2.0
- Alicense-qualityFmaintenanceEnables querying 40 Slovenian statutes with full-text search, provision retrieval, and EU law integration, providing verified references from official PISRS sources.79Apache 2.0
Related MCP Connectors
Verified, citable German & EU law for any LLM. Daily updates from official sources, hosted in DE.
EU law, article-level: GDPR, NIS2, DORA, EU AI Act + more, with EUR-Lex citations. Keyless.
Temporal search and comparison for official Luxembourg and reviewed EU law, with provenance.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ansvar-Systems/Latvian-law-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server