legal-cite
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., "@legal-citeVerify the text of art. 45 u.k.k."
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.
legal-cite
Legal citation verifier (PL / EU law) — an MCP server that fetches the exact, in-force wording of a cited article straight from the official source. An anti-hallucination tool for Claude (and any MCP client): instead of trusting the model's memory of a statute, it returns the verbatim text of the cited article from the official register.
Weryfikator cytatów prawnych (prawo PL / UE) — serwer MCP pobierający dokładne, aktualne brzmienie cytowanego artykułu prosto z oficjalnego źródła. Narzędzie anti-halucynacyjne dla Claude (i dowolnego klienta MCP).
🇵🇱 PL law —
api.sejm.gov.pl(ELI). Returns the consolidated text (tekst jednolity, currently in force), not the original as-promulgated version.🇪🇺 EU law — EUR-Lex (Polish text). Note: EUR-Lex sometimes serves a bot-challenge (HTTP 202) → returns an error instead of text.
Returns only the cited article (not the whole act). The quote comes straight from the source.
Consolidated texts available only as PDF (since 2025)
Since 2025 the Sejm ELI API publishes Journal of Laws acts only as PDF — the newest consolidated texts of the Civil Code, Labour Code, Civil Procedure Code and others have no HTML. The tool therefore picks the version first, the format second: the newest consolidated text is the basis, and when it exists only as PDF, the tool converts the official PDF itself with a pinned version of eli2md (MIT) and reads the article from the resulting tree of units. Such a result is an unofficial reading of an official PDF and is labelled as such (📄 instead of 📜), with the Journal of Laws number, link to the PDF, PDF checksum and converter version. Two separate judgements are reported: fidelity of the reading and currency of the law.
Fidelity checks before anything is returned (any failure → the tool refuses instead of returning an older text):
structure — article numbers increase in document order; the article is a unit of the tree, not a quoted passage;
text layer, second reader — the article's words must appear in order in the PDF text layer read by poppler's
pdftotext(eli2md reads through pdfminer), and words the converter skipped inside the article may only be page headers and footnotes;older consolidated text in HTML (official and independent of the PDF) — an identical article is returned as the official HTML text, confirmed as unchanged by the newest consolidated text; a different article must be explained by a footnote at the unit or by an amendment that entered into force between the two texts.
Currency is a separate line: how many amending acts entered into force after the consolidated text's date (from the ELI register), or none. The trailing [dla modelu] line carries the same judgements as fields for an LLM reading the tool output.
Measured on 2026-10-10 (8 acts whose newest consolidated text is PDF-only, 4676 articles): 99.7 % pass the text-layer check; of those also present in the older HTML, 4339 are word-for-word identical. Requirements: pdftotext (Debian/Ubuntu: apt install poppler-utils); without it the PDF path refuses. First conversion of a code takes 30–90 s and is cached on disk (LEGAL_CITE_CACHE, default under the system temp dir). Optionally set LEGAL_CITE_GCS_BUCKET (and install .[gcs]) to keep conversions in Cloud Storage: a new instance downloads them instead of converting (file names carry the PDF checksum and converter version; fidelity checks run on the downloaded file as on a fresh one; any bucket error falls back to conversion). On Cloud Run use at least --memory=512Mi and the default request timeout (300 s).
English
Tools
verify_article("art. 45 u.k.k.")— the wording of a provision. Format:art. N [ust. M] CODE. Handles letter suffixes (art. 36a),§as a unit (art. 58 § 2 KC), superscripts with letters (art. 385¹/385[1]/131¹ᵃ/131[1a]), dotted codes (k.p.c.). When a consolidated text prints two wordings of the same paragraph/point (current one and one entering into force later), the tool returns only the one in force today, chosen by the date in the footnote, and says so; if the date cannot be read, it refuses.list_acts()— list of supported act codes (PL + EU).
Run locally (stdio — Claude Desktop / Claude Code)
pip install -e .
legal-cite # stdioclaude_desktop_config.json:
{ "mcpServers": { "legal-cite": { "command": "legal-cite" } } }Deploy to Cloud Run (streamable-http — one shared URL)
gcloud run deploy legal-cite \
--source=. \
--region=europe-west4 \
--allow-unauthenticated \
--memory=512Mi --cpu=1 --max-instances=1 --timeout=300 --port=8080Public, no-auth is safe here — the service serves only public legal texts (no data, no database, no LLM calls).
Connect in Claude: Connectors → Add custom connector → https://<service-url>.run.app/mcp (streamable-http mounts MCP at /mcp).
Add a new act
Add an entry to PL_ACTS (key = abbreviation; pub/year/pos from the Journal of Laws / ELI) or EU_ACTS (key = abbreviation, celex) in legal_cite/core.py.
Related MCP server: Slovak Law MCP Server
Polski
Narzędzia
verify_article("art. 45 u.k.k.")— brzmienie przepisu. Format:art. N [ust. M] KOD. Obsługuje sufiks literowy (art. 36a), § jako jednostkę (art. 58 § 2 KC), indeks górny z literą (art. 385¹/385[1]/131¹ᵃ/131[1a]), kody z kropkami (k.p.c.,k.r.o.). Gdy tekst jednolity drukuje dwa brzmienia tego samego paragrafu, ustępu lub punktu (obowiązujące i wchodzące w życie później), narzędzie zwraca tylko obowiązujące dziś — wybrane po dacie z odnośnika — i to zaznacza; gdy daty nie da się odczytać, odmawia.
Teksty jednolite dostępne tylko w PDF (od 2025 r.)
Od 2025 r. API ELI Sejmu publikuje akty Dziennika Ustaw wyłącznie w PDF — najnowsze teksty jednolite k.c., k.p., k.p.c. i innych nie mają HTML. Narzędzie wybiera więc najpierw wersję, potem format: podstawą jest najnowszy tekst jednolity, a gdy jest tylko w PDF, narzędzie samo konwertuje urzędowy PDF przypiętą wersją eli2md (MIT) i wycina artykuł z drzewa jednostek. Taki wynik to nieurzędowy odczyt urzędowego PDF i tak jest oznaczony (📄 zamiast 📜): numer Dz.U., link do PDF, suma kontrolna PDF, wersja konwertera. Osobno podawane są dwie oceny: wierność odczytu i aktualność prawna.
Kontrole wierności przed oddaniem wyniku (każda niezaliczona → odmowa zamiast starszego brzmienia):
struktura — numery artykułów rosną w kolejności dokumentu, artykuł jest węzłem drzewa, nie cytatem w przepisie przejściowym;
warstwa tekstowa, drugi czytnik — słowa artykułu muszą wystąpić w tej kolejności w warstwie tekstowej PDF czytanej przez
pdftotext(poppler; eli2md czyta przez pdfminer), a słowa pominięte przez konwerter w obrębie artykułu mogą być tylko nagłówkami stron i przypisami;starszy tekst jednolity w HTML (urzędowy, niezależny od PDF) — artykuł identyczny jest zwracany jako tekst urzędowy HTML, potwierdzony przez najnowszy t.j. jako niezmieniony; artykuł różny musi mieć wytłumaczenie w odnośniku przy jednostce albo w nowelizacji, która weszła w życie między datami obu tekstów.
Aktualność to osobna linia: ile aktów zmieniających weszło w życie po dacie tekstu jednolitego (wg wykazu ELI) albo że żaden. Linia [dla modelu] na końcu powtarza te oceny jako pola dla modelu czytającego wynik narzędzia.
Pomiar 2026-10-10 (8 aktów z najnowszym t.j. tylko w PDF, 4676 artykułów): 99,7 % przechodzi kontrolę warstwy tekstowej; spośród obecnych w starszym HTML 4339 jest identycznych co do słowa. Wymagania: pdftotext (Debian/Ubuntu: apt install poppler-utils); bez niego ścieżka PDF odmawia. Pierwsza konwersja kodeksu trwa 30–90 s i jest trzymana na dysku (LEGAL_CITE_CACHE, domyślnie w katalogu tymczasowym systemu). Opcjonalnie LEGAL_CITE_GCS_BUCKET (instalacja .[gcs]) trzyma konwersje w Cloud Storage: nowa instancja pobiera je zamiast konwertować (nazwa pliku zawiera sumę PDF i wersję konwertera; kontrole wierności biegną na pobranym pliku tak samo; błąd zasobnika = powrót do konwersji). Na Cloud Run co najmniej --memory=512Mi.
list_acts()— lista obsługiwanych kodów aktów (PL + UE).
Uruchomienie lokalne (stdio — Claude Desktop / Claude Code)
pip install -e .
legal-cite # stdioWpis w claude_desktop_config.json:
{ "mcpServers": { "legal-cite": { "command": "legal-cite" } } }Deploy na Cloud Run (streamable-http — współdzielony URL)
gcloud run deploy legal-cite \
--source=. \
--region=europe-west4 \
--allow-unauthenticated \
--memory=512Mi --cpu=1 --max-instances=1 --timeout=300 --port=8080Publiczny bez auth jest tu bezpieczny — serwis serwuje wyłącznie publiczne teksty aktów (zero danych, zero bazy, zero wywołań LLM).
Podłączenie w Claude: Connectors → Add custom connector → https://<adres-serwisu>.run.app/mcp.
Ekosystem / Related
Część zestawu otwartych narzędzi LegalTech (PL):
legal-cite-pl — (ten projekt) MCP: weryfikacja brzmienia przepisu PL/UE ze źródła.
commercial-legal-pl — Claude skill: redakcja i analiza umów (PL); używa
verify_article.anon-legal-pl — lokalna anonimizacja akt prawnych (PL).
kancelaria-dms — DMS/CRM dla kancelarii (Google Workspace).
License
Apache License 2.0 — see LICENSE.
Available Tools
2 toolslist_actsA
Lista obsługiwanych kodów aktów (PL + UE) dla verify_article.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description does not disclose any behavioral traits such as read-only nature, side effects, or return format. Since no annotations are provided, the description carries the burden, but it only states the purpose without behavioral details. However, for a parameterless listing tool, the lack of behavioral information is less critical.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise. However, it is in Polish, which may not be ideal for English-language agents. The structure is front-loaded and efficient, but language consideration reduces the score slightly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and the presence of an output schema (not shown but indicated), the description is complete enough. It states the tool lists codes for verify_article, which is sufficient for the agent to understand the tool's role. No additional requirements are needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, and the schema covers 100% (no parameters). The baseline for 0 parameters is 4, and the description does not add parameter semantics beyond what the schema provides, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists supported act codes (PL+EU) for verify_article. The name 'list_acts' is a verb+resource, and the sibling tool verify_article provides context, distinguishing this listing function from verification.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is used to get codes for verify_article, but it does not explicitly state when to use it or provide alternatives. The context is clear from the sibling tool, but no explicit guidance such as 'use this tool to retrieve codes before calling verify_article' is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_articleA
Dokładne brzmienie cytowanego przepisu z OFICJALNEGO źródła (api.sejm.gov.pl dla PL, EUR-Lex dla UE) — zwraca tylko ten artykuł, nie cały akt. Zwraca AKTUALNE brzmienie (tekst jednolity). Anti-halucynacja: weryfikacja cytatu wprost ze źródła. Format: 'art. N [ust. M] KOD'. Przykłady: 'art. 45 u.k.k.', 'art. 385 KC', 'art. 28 ust. 3 RODO', 'art. 10 CCD'. Kody: list_acts().
| Name | Required | Description | Default |
|---|---|---|---|
| citation | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description compensates by stating it returns current wording (consolidated text), only the requested article, and that it uses official sources. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is somewhat lengthy but each sentence adds value: purpose, sources, behavior, format, examples. Front-loads the main purpose. Could be slightly tighter but still efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (not shown but indicated), the description adequately covers input format, sources, and behavior. Sufficient for a single-parameter tool with clear return (article text).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% for the single parameter 'citation'. Description provides detailed format, examples, and code listing instruction, adding essential meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it returns the exact wording of a cited provision from official sources (api.sejm.gov.pl, EUR-Lex), returns only the article not the whole act, and distinguishes from sibling list_acts by focusing on verification.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description explains when to use: for verifying citations directly from source (anti-hallucination). Provides format and examples, and mentions sibling tool list_acts for codes. Does not explicitly state when not to use, but context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
list_acts - First observed
verify_article
TDQS
Scored across 2 tools
The two tools have completely separate purposes: listing supported act codes and verifying a single article citation. There is no overlap or ambiguity.
Both tool names follow a consistent verb_noun pattern (list_acts, verify_article) and are easily readable.
With only two tools, the server feels very minimal. While the domain is narrow, additional tools for searching or retrieving full act texts would be expected.
The server handles listing codes and verifying individual articles but lacks tools for retrieving full act texts or verifying multiple citations, leaving notable gaps.
Maintenance
Related MCP Connectors
Semantic search over Polish law and case law, citing the exact in-force article.
Polish and EU law: statutes, rulings, UODO/UOKiK/KNF, EU regulations, citation checks. Free tier.
Verifies legal citations vs primary sources: existence, quote match, proposition support.
- acquisOAuthcom.acquislaw
Verified EU law: verbatim, signed provisions with EUR-Lex links. Read-only, not legal advice.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI-powered legal research and analysis of Polish legal acts from the Sejm API. Provides comprehensive search, document retrieval, metadata analysis, and content access for legal documents from Dziennik Ustaw and Monitor Polski.1322MIT
- AlicenseNot gradedqualityFmaintenanceEnables querying and analyzing Slovak legislation via natural language, including full-text search, provision retrieval, and EU law integration.37 npm2Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables searching and quoting EU legislation with verifiable EUR-Lex citations, including GDPR, NIS2, DORA, and the EU AI Act.251 npmMIT
- AlicenseNot gradedqualityFmaintenanceEnables querying 40 Slovenian statutes with full-text search, provision retrieval, and EU law integration, providing verified references from official PISRS sources.45 npmApache 2.0