polish-law-mcp
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., "@polish-law-mcp What does art. 1 ust. 3 pkt 1 of the Polish Civil Code say?"
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.
polish-law-mcp
English
An MCP server that lets AI assistants search and read Polish legal texts. It reads the data published in polish-law (consolidated statutes as Markdown and JSON, CC0, refreshed daily). That data is produced by polish-law-toolkit.
Repository | What it holds |
the texts (data only) | |
the software that downloads and reads the texts | |
polish-law-mcp (this one) | the MCP server for AI clients |
The texts have no official force. They are teksty ujednolicone: current but unofficial, prepared by the Chancellery of the Sejm, and extracted automatically from PDF files, so errors are expected. Always check the text published in Dziennik Ustaw (Journal of Laws). The server repeats this in every answer.
Tools
Tool | What it does |
| kinds of text available (today |
| find acts by words in title or address, diacritics ignored |
| metadata: title, what the text is based on, source PDF, versions |
| the act as Markdown, in pages |
| one provision by citation ( |
| provisions containing all given words, in one act or in all |
Every tool takes kind (default unified). The data repository keeps each kind of text in its own top-level folder
with the same layout, so kinds added there later work without changing the server (list them in POLISH_LAW_KINDS,
or, with a local clone, they are discovered).
Install and use
pip install git+https://github.com/MikolajKondej/polish-law-mcpClaude Desktop / any MCP client (stdio):
{ "mcpServers": { "polish-law": { "command": "polish-law-mcp" } } }Two ways to read the data:
Over HTTP (default). Nothing to download: files are fetched from
raw.githubusercontent.comwhen needed. Searching inside provisions works within one act; searching all acts at once does not.Local clone (faster, full search).
git clone https://github.com/MikolajKondej/polish-lawand setPOLISH_LAW_DATA_DIR=/path/to/polish-law. Searching all ~800 acts then takes about 10 seconds.
Variable | Meaning |
| path to a local clone of polish-law |
| repository ( |
| comma-separated kinds for HTTP mode; default |
Tests
pip install -e '.[test]' && python -m pytestLicence: Apache 2.0 for the code. The texts are CC0 (see polish-law).
Related MCP server: legal-cite
Polski
Serwer MCP, dzięki któremu asystenci AI wyszukują i czytają polskie teksty prawne. Czyta dane z repozytorium polish-law (teksty ujednolicone ustaw jako Markdown i JSON, CC0, odświeżane codziennie). Dane wytwarza program polish-law-toolkit.
Repozytorium | Co zawiera |
teksty (same dane) | |
program pobierający i odczytujący teksty | |
polish-law-mcp (to) | serwer MCP dla klientów AI |
Teksty nie mają mocy urzędowej. To teksty ujednolicone: aktualne, ale nieurzędowe, opracowane przez Kancelarię Sejmu i odczytane automatycznie z plików PDF, więc mogą zawierać błędy. Zawsze sprawdź tekst ogłoszony w Dzienniku Ustaw. Serwer powtarza to w każdej odpowiedzi.
Narzędzia
list_kinds (rodzaje tekstów), search_acts (akty po słowach z tytułu, bez względu na polskie znaki),
get_act (metadane i wersje), get_act_text (akt jako Markdown, stronami), get_provision (przepis po
cytacie, np. art. 1 ust. 3 pkt 1, razem z jednostkami podrzędnymi), search_provisions (przepisy ze wszystkimi
podanymi słowami, w jednym akcie albo we wszystkich). Każde narzędzie przyjmuje kind (domyślnie unified);
nowe rodzaje tekstów w repozytorium danych (osobne katalogi o tym samym układzie) działają bez zmian w serwerze.
Instalacja i użycie
pip install git+https://github.com/MikolajKondej/polish-law-mcpKonfiguracja klienta MCP: { "mcpServers": { "polish-law": { "command": "polish-law-mcp" } } }.
Domyślnie serwer pobiera pliki przez HTTP z GitHuba (wyszukiwanie w treści działa w obrębie jednego aktu).
Żeby przeszukiwać wszystkie akty naraz (ok. 10 s), sklonuj polish-law i ustaw POLISH_LAW_DATA_DIR.
Zmienne: POLISH_LAW_DATA_DIR, POLISH_LAW_REPO, POLISH_LAW_REF, POLISH_LAW_KINDS (opis wyżej).
Licencja kodu: Apache 2.0. Teksty: CC0 (zob. polish-law).
Available Tools
6 toolsget_actA
Metadata of one act: title, dates, what the consolidated text is based on, source PDF, versions seen. act_id is an ELI id such as DU/1992/86 (or an address such as 'Dz.U. 1992 nr 21 poz. 86').
Inputs: act_id (required), kind. Returns: result
get_act_textA
Read an act as Markdown, in pages. Statutes are long: use next_offset from the answer to continue, or prefer get_provision when you know the citation.
Inputs: act_id (required), kind, offset, max_chars. Returns: result
get_provisionB
One provision of an act by citation, e.g. 'art. 15', 'art. 1 ust. 3 pkt 1' or 'art. 24aa ust. 2'. With include_children (default) the sub-units (ustępy, punkty, litery) come too, in reading order.
Inputs: act_id (required), citation (required), kind, include_children. Returns: result
list_kindsA
List the kinds of text available (e.g. 'unified' = consolidated texts) and how many acts each holds.
Inputs: no named parameters. Returns: result
search_actsA
Find acts by words in their title or address (diacritics ignored), e.g. 'podatek dochodowy osob prawnych' or 'Dz.U. 1992'. Returns ids to pass to the other tools. Titles only: to search inside provisions use search_provisions.
Inputs: query (required), kind, year, limit, +1 more. Returns: result
search_provisionsA
Find provisions containing ALL the given words (diacritics ignored). With act_id it searches that act. Without it, it searches every act of the kind, which works only when the server reads a local clone of the data (POLISH_LAW_DATA_DIR); otherwise give an act_id (find it with search_acts).
Inputs: query (required), kind, limit, act_id. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct target: list_kinds (corpus summary), search_acts (title lookup) vs search_provisions (content lookup), get_act (metadata) vs get_act_text (full paginated text) vs get_provision (single citation). The overlap between get_act_text and get_provision is explicitly resolved by the description's guidance to prefer get_provision when a citation is known.
Uniform snake_case verb_noun pattern throughout (list_kinds, search_acts, get_act, get_act_text, get_provision, search_provisions). The two verbs (list/get/search) map predictably onto summary/metadata vs. retrieval vs. lookup semantics.
Six tools is well within the ideal range and each earns its place: corpus overview, two search axes, metadata, bulk text, and single-provision retrieval. Nothing redundant and nothing feels missing at the count level.
The read-only retrieval lifecycle (discover kinds -> search acts -> act metadata -> text -> provision -> search inside provisions) is fully covered with no dead ends. Minor gaps remain: no table-of-contents/structure endpoint for long acts, no way to retrieve historical/specific versions despite metadata mentioning versions seen, and search_provisions is crippled without a local data clone.
Maintenance
Related MCP Connectors
Polish legal database: acts as worded on any date, case law, tax rulings. Answers cite sources.
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.
Polish law from Dziennik Ustaw: full text of statutes, daily in-force status, wording by date.
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.1323MIT
- AlicenseAqualityBmaintenanceVerifies legal citations by fetching the exact, in-force wording of cited articles from official PL and EU legal sources, preventing hallucination by returning verbatim text.29Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve Polish statutes, provisions, and EU law cross-references with verified citations, supporting legal research and compliance checks.Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables AI clients to search, retrieve and cite over 600 Polish statutes and regulations from the Journal of Laws in full text, including the wording of a provision as of any date, in-force status checked against the ELI register, related provisions, annexes and tables. Access is read-only via a hosted endpoint with e-mail sign-in, optional free trial queries, and paid plans.-