Latvian legislation via MCP — full-text search across statutes and provisions
Latvian legislation via MCP — full-text search across statutes and provisions
Valid MCP server (2 strong, 2 medium validity signals). 4 known CVEs in dependencies (1 critical, 2 high severity) Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (198/200 approved).
5 files analyzed · 5 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"eu-ansvar-latvian-law-mcp": {
"args": [
"-y",
"@ansvar/latvian-law-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
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
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:
...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.
Connect directly to the hosted version -- zero dependencies, nothing to install.
Endpoint: https://mcp.ansvar.eu/law-lv/mcp
| Client | How to Connect |
|---|---|
| Claude.ai | Settings > Connectors > Add Integration > paste URL |
| Claude Code | claude mcp add latvian-law --transport http https://mcp.ansvar.eu/law-lv/mcp |
| Claude Desktop | Add to config (see below) |
| GitHub Copilot | Add to VS Code settings (see below) |
Claude Desktop -- add to claude_desktop_config.json:
{
"mcpServers": {
"latvian-law": {
"type": "url",
"url": "https://mcp.ansvar.eu/law-lv/mcp"
}
}
}
GitHub Copilot -- add to VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"latvian-law": {
"type": "http",
"url": "https://mcp.ansvar.eu/law-lv/mcp"
}
}
}
npx @ansvar/latvian-law-mcp
Claude Desktop -- add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"latvian-law": {
"command": "npx",
"args": ["-y", "@ansvar/latvian-law-mcp"]
}
}
}
Cursor / VS Code:
{
"mcp.servers": {
"latvian-law": {
"command": "npx",
"args": ["-y", "@ansvar/latvian-law-mcp"]
}
}
}
Once connected, just ask naturally:
| Category | Count | Details |
|---|---|---|
| Statutes | 2,249 statutes | Comprehensive Latvian legislation from likumi.lv |
| Provisions | 57,679 sections | Full-text searchable with FTS5 |
| Premium: Case Law | 127,042 decisions | Augstākā tiesa, Satversmes tiesa, Administratīvā tiesa (Premium tier) |
| Premium: Preparatory Works | 29,516 documents | Saeima anotācijas and explanatory reports (Premium tier) |
| Database Size | 131 MB | Optimized SQLite, portable |
| Daily Updates | Automated | Freshness checks against likumi.lv |
Verified data only -- every citation is validated against official sources (likumi.lv, Latvijas Vēstnesis). Zero LLM-generated content.
The premium dataset is substantial: 127,042 court decisions from Latvia's three levels of courts plus 29,516 preparatory works.
Verbatim Source Text (No LLM Processing):
Smart Context Management:
Technical Architecture:
likumi.lv --> Parse --> SQLite --> FTS5 snippet() --> MCP response
^ ^
Provision parser Verbatim database query
| Traditional Approach | This MCP Server |
|---|---|
| Search likumi.lv by statute name | Search by plain Latvian: "personas datu apstrāde piekrišana" |
| Navigate multi-section statutes manually | Get the exact provision with context |
| Manual cross-referencing between laws | build_legal_stance aggregates across sources |
| "Vai šis likums ir spēkā?" -- check manually | check_currency tool -- answer in seconds |
| Find EU basis -- dig through EUR-Lex | get_eu_basis -- linked EU directives instantly |
| No API, no integration | MCP protocol -- AI-native |
Traditional: Meklēt likumi.lv --> Pārvietoties daudzpantu likumos --> Ctrl+F --> Salīdzināt ar ES direktīvām --> Atkārtot
This MCP: "Kāds ES tiesību akts ir Fizisko personu datu apstrādes likuma 25. panta pamatā?" --> Done.
| Tool | Description |
|---|---|
search_legislation | FTS5 full-text search across 57,679 provisions with BM25 ranking. Supports Latvian, quoted phrases, boolean operators, prefix wildcards |
get_provision | Retrieve specific provision by statute identifier + section (e.g., "Fizisko personu datu apstrādes likums" + "25") |
check_currency | Check if a statute is in force, amended, or repealed |
validate_citation | Validate citation against database -- zero-hallucination check |
build_legal_stance | Aggregate citations from multiple statutes for a legal topic |
format_citation | Format citations per Latvian conventions (full/short/pinpoint) |
list_sources | List all available statutes with metadata, coverage scope, and data provenance |
about | Server info, capabilities, dataset statistics, and coverage summary |
| Tool | Description |
|---|---|
get_eu_basis | Get EU directives/regulations for a Latvian statute |
get_latvian_implementations | Find Latvian laws implementing a specific EU act |
search_eu_implementations | Search EU documents with Latvian implementation counts |
get_provision_eu_basis | Get EU law references for a specific provision |
validate_eu_compliance | Check implementation status (future, requires EU MCP) |
Latvia joined the EU on 1 May 2004. All EU regulations apply directly; directives require transposition into Latvian law.
| Metric | Value |
|---|---|
| EU Membership | Since 1 May 2004 |
| Acquis communautaire | Full EU legal order applies |
| GDPR | Implemented via Fizisko personu datu apstrādes likums |
| NIS2 | Transposed via Informācijas tehnoloģiju drošības likums |
| AML5 | Implemented via Noziedzīgi iegūtu līdzekļu legalizācijas un terorisma finansēšanas novēršanas likums |
| EUR-Lex Integration | Cross-references link Latvian statutes to source EU acts |
See EU_INTEGRATION_GUIDE.md for detailed documentation and EU_USAGE_EXAMPLES.md for practical examples.
All content is sourced from authoritative Latvian legal databases:
| Field | Value |
|---|---|
| Authority | Republic of Latvia (Latvijas Republika) |
| Languages | Latvian (sole official legislative language) |
| Coverage | All national Latvian legislation; EU regulations apply directly |
| Source | likumi.lv |
A daily GitHub Actions workflow monitors likumi.lv for changes:
| Check | Method |
|---|---|
| Statute amendments | likumi.lv API date comparison against all 2,249 statutes |
| New statutes | likumi.lv index comparison (90-day window) |
| Repealed statutes | Status change detection |
| EU reference staleness | Flagged if >90 days old |
Verified data only -- every citation is validated against official sources. Zero LLM-generated content.
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 |
| Socket.dev | Supply chain attack detection | PRs |
| Dependabot | Automated dependency updates | Weekly |
See SECURITY.md for the full policy and vulnerability reporting.
THIS TOOL IS NOT LEGAL ADVICE
Statute text is sourced from likumi.lv (official consolidated legislation). However:
- This is a research tool, not a substitute for professional legal counsel
- Court case coverage in the free tier is not included -- consult the Augstākā tiesa (AT) and Satversmes tiesa databases directly; 127,042 decisions are available in the Premium tier
- Verify critical citations against primary sources before court filings
- EU cross-references are derived from statute text, not EUR-Lex full text analysis
- Consolidated versions on likumi.lv are authoritative but verify promulgation dates against Latvijas Vēstnesis for court proceedings
Before using professionally, read: DISCLAIMER.md | PRIVACY.md
Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment. Consult Latvijas Zvērinātu advokātu padome (Latvian Council of Sworn Advocates) guidelines on AI use in legal practice.
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
This server is part of Ansvar's Compliance Suite -- MCP servers that work together for end-to-end compliance coverage:
Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. npx @ansvar/eu-regulations-mcp
Query Lithuanian legislation -- neighbouring Baltic state. npx @ansvar/lithuanian-law-mcp
Query Estonian legislation -- fellow Baltic state. npx @ansvar/estonian-law-mcp
Query 261 security frameworks -- ISO 27001, NIST CSF, SOC 2, CIS Controls, SCF, and more. npx @ansvar/security-controls-mcp
70+ national law MCPs covering Austria, Belgium, Croatia, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Lithuania, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, and more.
Contributions welcome! See CONTRIBUTING.md for guidelines.
Priority areas:
If you use this MCP server in academic research:
@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. See LICENSE for details.
We build AI-accelerated compliance and legal research tools for the European market. This MCP server started as our internal reference tool for Latvian law -- turns out everyone building for the Baltic and EU markets has the same research frustrations.
So we're open-sourcing it. Navigating 2,249 statutes and their EU source directives shouldn't require a law degree.
ansvar.eu -- Stockholm, Sweden
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.