Nalegalu MCP

io.github.nalegaluorgPublished by GitHub account nalegaluorgv1.0.0Updated Oct 24, 2026

Semantic search over Polish law and case law, citing the exact in-force article.

VerifiedStreamable HTTPWeb executableWeb Search & ScrapingKnowledge & Memory

Overview

AI-generated overview

Remote MCP server for Polish law: semantic search of statutes and SAOS case law, with exact article text, case lookup and quote verification.

What you can do
  • Search Polish statutes in force by natural-language issue or citation and get article-level hits
  • Fetch the exact text of a single article or paragraph by act address and article key
  • Find SAOS judgments linked to a provision, or discover related cases for a described legal issue
  • Retrieve a judgment's metadata and paged text excerpt by its SAOS ID
  • Verify a cited case signature and check whether a quoted fragment appears in a judgment
When to use it
Useful when answering questions about Polish law, checking which article applies to a situation, or grounding an analysis in case law with verifiable citations and signatures. Also handy for validating a judgment or quotation someone else cited.
Requirements
A remote streamable HTTP endpoint; no package, account, API key or environment variable is declared. Network access to the hosted service is required.
Before you install
The README states it is not an official source of law; the authoritative text is the Dziennik Ustaw on isap.sejm.gov.pl. Related-case links and quote matches are not proof of a legal rule or that a quote supports a conclusion, so judgments should be inspected before being relied on. Queries and quoted fragments are sent to the remote service.

Installation

In SourceWeft

  1. Open Nalegalu MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.nalegaluorg%2Fnalegalu/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "nalegalu": {
      "type": "http",
      "url": "https://mcp.nalegalu.org/mcp"
    }
  }
}

README

nalegalu — polskie akty prawne i orzecznictwo

Polskie prawo w formacie Markdown — akty prawne z Dziennika Ustaw oraz powiązane orzecznictwo sądowe z bazy SAOS. Gotowe do użycia z narzędziami AI (Claude, ChatGPT, Obsidian, Cursor).

Więcej informacji: nalegalu.org

Najczęściej cytowane akty prawne

Akty z największą liczbą powiązanych orzeczeń sądowych:

Orzecznictwo

Repozytorium zawiera kompaktowe indeksy orzecznictwa — łącznie 620 890 powiązań między orzeczeniami a aktami prawnymi.

Każdy akt prawny, na który powołują się orzeczenia, posiada plik orzecznictwo.md z listą cytujących orzeczeń pogrupowanych wg artykułu. Dla największych aktów (np. Kodeks cywilny) orzecznictwo jest podzielone na osobne pliki per artykuł.

Każde orzeczenie zawiera link do pełnego tekstu w serwisie SAOS.

Jak korzystać

Najprostszy sposób: otwórz repozytorium w Claude Cowork, Obsidian lub Cursor — narzędzia te pozwalają AI przeszukiwać i analizować wszystkie pliki jednocześnie. Bez ręcznego kopiowania i wklejania.

Przykład: Wskaż folder nalegalu w Claude Cowork i zapytaj:

Jakie przesłanki odpowiedzialności deliktowej wynikają z art. 415 k.c.w świetle najnowszego orzecznictwa SN? Podaj sygnatury z bazy.

Claude sam otworzy Kodeks cywilny, znajdzie art. 415, sprawdzi orzecznictwo i przygotuje analizę z konkretnymi sygnaturami.

Aktualizacja danych

Dane aktualizują się automatycznie. Najnowszą wersję można pobrać jako ZIP z zakładki Releases.

Dokumentacja

PrzewodnikOpis
Jak korzystać z nalegaluKompletny przewodnik — od przeglądania na GitHubie do pracy z AI
Konfiguracja Claude CoworkKrok po kroku: instalacja, ustawienie projektu, instrukcje dla AI
Biblioteka promptówGotowe prompty do analizy przepisów, orzecznictwa, pism procesowych
Przewodnik pracy LLMArchitektura bazy, system scoringu, strategie wyszukiwania

Dziedziny prawa

Bramka jakości

Każdy akt przed publikacją przechodzi automatyczną kontrolę jakości. Dokumenty z wykrytymi problemami są blokowane do czasu naprawy.

KontrolaOpisPróg
CID fontUszkodzone glify — plik PDF używa wewnętrznych identyfikatorów znaków zamiast tekstudowolne wystąpienie (cid:N)
Null bytesBajty zerowe w pliku wyjściowymdowolne wystąpienie
Pusty dokumentTreść zbyt krótka po ekstrakcji< 50 znaków
Struktura artykułówUtrata treści lub znaczników w strukturze aktu — np. pusty artykuł Art. N., znikające ustępy albo punktydowolna niespójność AST ↔ Markdown
PostScript CEPozostałości kodowania PostScript CE — zniekształcone polskie znaki diakrytyczne1 wzorzec
MojibakeUTF-8 odczytane jako Latin-1 — ciągi typu Ä\u0085, ó3+ wystąpienia
Brak diakrytykówTekst prawny bez polskich znaków diakrytycznych (ą, ę, ś, ć...)< 0.5% liter to diakrytyki (dla tekstów > 500 znaków)
Rozstrzelony tekstLitery rozdzielone spacjami (artefakt OCR, np. A r t 77)dowolna linia z > 30% jednoliterowych słów
Śmieci tabelaryczneLinie z dużą ilością znaków pipe i slash — wynik ekstrakcji grafik i tabel z PDF3+ linie z > 25% tych znaków
Nagłówek PDFNagłówek ©Kancelaria Sejmu przedostał się do treścidowolne wystąpienie
Znacznik datyStopka z datą (np. 05/21/99) na osobnej liniidowolne wystąpienie
PowtórzeniaTa sama linia (> 20 znaków) powtarza się wielokrotnie — prawdopodobnie nagłówek/stopka PDF> 20 powtórzeń

Testy

PASSED — 422 tests — 422 passed, 0 failed, 0 errors, 33 skipped

Ostatni przebieg: 2026-07-13 13:24 UTC. Szczegóły: TEST_RESULTS.md.

Statystyki

[Wzrost bazy aktów]

Wartość
Opublikowane akty20,278
Odrzucone (jakość)6,118
Artykuły201,529
Znaki treści596.9M
Śr. znaków/akt29,436
Śr. artykułów/akt9.9

Źródła danych:

  • PDF: 20,089 (99%)
  • ELI HTML: 189 (1%)

Odrzucone: 5 skanów bez OCR, 709 zablokowanych przez bramkę jakości, 6113 inne

Od 2026-05-18: +6,957 aktów

Ostatnia aktualizacja: 2026-07-13

Zakres i ograniczenia

Repozytorium zawiera obowiązujące akty prawne z Dziennika Ustaw (teksty jednolite) oraz indeksy orzecznictwa sądowego z bazy SAOS. To nie jest oficjalne źródło prawa — jedynym autentycznym źródłem jest Dziennik Ustaw publikowany na isap.sejm.gov.pl.

Licencja

Treść aktów prawnych jest wyłączona spod ochrony prawa autorskiego na mocy art. 4 ustawy o prawie autorskim i prawach pokrewnych. Struktura i metadane: CC0 1.0 — Public Domain.

20278 aktów • wygenerowano automatycznie przez nalegalu • źródło danych: ISAP + SAOS • aktualizacja: 2026-07-13

Source: README.md at commit 9186e1f

Tools

7

search_law

Search current Polish statutes and return article-level hits. Start here for a natural-language legal issue or a direct citation. Use the user's own Polish wording, e.g. "kupiłem wadliwy towar od firmy jakie mam prawa". Do not add address, domain, article, act_type, or status filters unless the user explicitly supplied that restriction. Results are primary-source material, not legal advice.

Parameterslimitqueryrequireddomainstatusaddressarticleact_typetop_casescase_law_boostretrieval_modecandidate_multiplierinclude_non_in_force

get_article

Fetch the exact text of one article (or paragraph) of a Polish legal act. Use after search_law or another trusted source supplied the address and article key; never guess them. Deterministic lookup by act address (e.g. WDU19740240141) and article key (e.g. "133" or "Art. 133."). Optional paragraph_key (e.g. "1" or "§ 1.") narrows the result to a single paragraph.

Parametersaddressrequiredarticle_keyrequiredparagraph_key

research_cases

Discover related-case candidates for a natural-language legal issue. This tool first searches statutes, then follows local provision-to-case links for several distinct provisions and deduplicates by SAOS ID. ``rerank=false`` is the inexpensive deterministic discovery stage. With ``rerank=true``, it fetches at most ``rerank_fetch_limit`` public SAOS excerpts and reranks them only when the server has explicitly configured a Cohere reranker. It never decides a holding: call ``get_case`` for every judgment used in an answer.

Parametersqueryrequiredrerankcandidate_limitprovision_limitcontext_max_charsrerank_fetch_limitcase_text_max_charscases_per_provisionrerank_result_limit

get_case

Fetch one SAOS court judgment (metadata + bounded text excerpt). Use only with a saos_id returned by related_cases, research_cases, or search_case_by_signature. Long judgments are paged: when has_more is true, call again with offset=next_offset. If the response has ok=false with a fallback hint, SAOS is unavailable or rate-limited — fetch the returned saos_url yourself with your own web tools instead of retrying this tool.

Parametersoffsetsaos_idrequiredmax_chars

search_case_by_signature

Verify a cited case signature (sygnatura), e.g. "II CSK 448/14". Use before relying on a judgment cited by a user or another agent. Answers from a local index of all SAOS judgments first; only on a local miss does it query live SAOS. Read the verdict field: "confirmed" (matches listed with saos_id, court, date, type — different courts reuse signatures, so check the court), "not_found" (strong evidence the citation is fabricated or wrong), "outside_coverage" (administrative courts NSA/WSA are not in SAOS — verify in CBOSA instead), "unverified" (local miss and SAOS unreachable; do not treat as nonexistent). Optional court_type: COMMON, SUPREME, CONSTITUTIONAL_TRIBUNAL, NATIONAL_APPEAL_CHAMBER. has_text=false on a match means SAOS stores no text for it, so verify_quote cannot check quotes against that judgment.

Parameterslimitsignaturerequiredcourt_type

verify_quote

Check whether a supplied quote appears in a SAOS judgment. Use only after resolving the judgment to a saos_id. This validates wording, not whether the quote supports a legal conclusion. Pass the saos_id (from search_case_by_signature or related_cases) and the fragment as quoted. One call replaces paging through the full text: verdict is "exact" (verbatim after normalizing whitespace, quote marks and dashes), "near_match" (best passage plus similarity score — compare it against the claim), or "not_found" (treat the quote as fabricated or misattributed). If ok=false with a fallback hint, fetch saos_url with your own web tools instead of retrying.

Parametersquoterequiredsaos_idrequiredmin_similarity

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts