Latvian law as a grounded MCP endpoint
One remote MCP server. Nine read-only tools. Every answer linked to the law in force. Free while we grow.
# 1 · open the session (initialize)curl -sS https://likumapaligs.lv/api/mcp \ -H "Authorization: Bearer lk_YOUR_API_KEY" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize", "params":{"protocolVersion":"2025-11-25"}}' # 2 · call a tool → verbatim, cited provisionscurl -sS https://likumapaligs.lv/api/mcp \ -H "Authorization: Bearer lk_YOUR_API_KEY" \ -H "MCP-Protocol-Version: 2025-11-25" \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/call", "params":{"name":"search_law","arguments": {"query":"darba līguma uzteikums","k":3}}}'The nine tools
search_lawget_provisionask_latvian_lawget_act_structurelist_coveragerecent_changesresolve_citationsearchfetchEvery citation, verifiable
{"actTitle": "Darba likums","anchor": "p101","quote": "Darba devējam ir tiesības uzteikt darba līgumu …","inForce": true,"deepLinkUrl": "https://likumi.lv/ta/id/26019#p101","effectiveFrom": "2002-06-06","supersededByChunkId": null,}Example resolve_citation result. Every quoting tool carries the same contract: act title, provision anchor, verbatim quote, a live in-force flag, and a likumi.lv deep link.
Authentication
A Bearer token on the Authorization header — either a personal lk_ key from your account or an OAuth token from the connector. Every token is read-only and scoped (likums:search / likums:ask); revoke it anytime in Profile → API keys.
Rate limits
The verified-answer tool (ask_latvian_law) is burst-limited per client — a short run of calls, then a brief cooldown returning rate_limited. Search and lookup tools aren't metered today; durable per-plan quotas arrive with billing.
Refusals
When no in-force provision supports an answer, ask_latvian_law returns status: "refused" — never a fabricated citation. Bad input, a missing scope, or an unknown id come back as machine-readable errors, not guesses.
Pick your tool. Each block has the exact file or command with the real production URL, and a way to confirm it works.
claude mcp add --transport http likums https://likumapaligs.lv/api/mcp \
--header "Authorization: Bearer lk_YOUR_API_KEY"{
"mcpServers": {
"likums": {
"url": "https://likumapaligs.lv/api/mcp",
"headers": { "Authorization": "Bearer lk_YOUR_API_KEY" }
}
}
}{
"mcpServers": {
"likums": {
"serverUrl": "https://likumapaligs.lv/api/mcp",
"headers": { "Authorization": "Bearer lk_YOUR_API_KEY" }
}
}
}VS Code prompts once for the key and stores it in your OS secret store; MCP tools need Agent mode.
{
"inputs": [
{ "type": "promptString", "id": "likums-key", "password": true }
],
"servers": {
"likums": {
"type": "http",
"url": "https://likumapaligs.lv/api/mcp",
"headers": { "Authorization": "Bearer ${input:likums-key}" }
}
}
}The transport must be spelled exactly "streamableHttp" (camelCase), or Cline falls back to the old SSE transport and fails.
{
"mcpServers": {
"likums": {
"type": "streamableHttp",
"url": "https://likumapaligs.lv/api/mcp",
"headers": { "Authorization": "Bearer lk_YOUR_API_KEY" },
"disabled": false,
"autoApprove": []
}
}
}Claude and ChatGPT connect over OAuth — no key to paste.
Open the Connect guideDiscovery: https://likumapaligs.lv/.well-known/oauth-protected-resource/api/mcp
Free — 50 a month. Then €9.99/mo, unlimited.
The MCP connector is part of every plan — no per-answer pricing, ever.
Legal information with verified sources, not legal advice.