mcp-nsa
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., "@mcp-nsa Find recent NSA rulings on GDPR Article 6"
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.
mcp-nsa
Instalacja (zalecana, Windows / macOS / Linux)
Jednorazowo w terminalu (wymaga Node.js 20+):
npm install -g https://github.com/pwasniowski/mcp-nsa/archive/refs/heads/main.tar.gzPotem w claude_desktop_config.json (sciezke do folderu sprawdzisz komenda npm root -g):
"nsa": { "command": "node", "args": ["<npm root -g>/@legal-link/mcp-nsa/dist/index.js"] }Windows, domyslnie: C:\\Users\\<uzytkownik>\\AppData\\Roaming\\npm\\node_modules\\@legal-link\\mcp-nsa\\dist\\index.js.
Aktualizacja: ta sama komenda npm install -g ..., potem restart Claude.
Gotowy dist/ jest w repozytorium, wiec instalacja niczego nie kompiluje (kilka sekund).
Uruchamianie przez npx -y github:... (opisane nizej) tez dziala, ale przy pierwszym starcie
bywa wolniejsze niz limit startu Claude Desktop.
Related MCP server: mcp-nsa
Installation (one command)
Run straight from GitHub (no npm release needed; npm clones the repo and builds it via prepare):
npx -y github:pwasniowski/mcp-nsaClaude Desktop (claude_desktop_config.json, section mcpServers):
{
"mcpServers": {
"mcp-nsa": {
"command": "npx",
"args": ["-y", "github:pwasniowski/mcp-nsa"]
}
}
}Once published to npm as @legal-link/mcp-nsa, npx -y @legal-link/mcp-nsa works the same way
(MCP Registry name: io.github.pwasniowski/mcp-nsa).
(Building from source - below.)
MCP server for the case law of the Polish administrative courts -
Naczelny Sad Administracyjny / NSA (Supreme Administrative Court) + 16 Wojewodzkie Sady Administracyjne / WSA (regional administrative courts) - via CBOSA (Centralna Baza Orzeczen Sadow Administracyjnych - the administrative courts' central case-law database)
(orzeczenia.nsa.gov.pl).
Why
SAOS (the common-courts case-law analysis system) does not index the administrative courts. Yet that is exactly where the substantive case law lives:
GDPR / data protection - decisions of the President of UODO appealed to the WSA, cassation appeals to the NSA
Taxes - individual tax rulings, decisions of tax authorities
Customs and excise
Administrative permits, concessions
Review of public-administration activity
mcp-nsa closes this gap. Coverage: 2,390,000+ rulings (verified live 2026-07-08 across the full date range), from 1981 to today.
Tools
search(query, caseNumber?, court?, dateFrom?, dateTo?, pageNumber?, symbol?, keywords?, organ?, judgmentType?)one page of 10 hits (case number, type, court, date, CBOSA's own text excerpt around the hit); for the first 5 also case symbol, subject keywords (hasla tematyczne), challenged authority, outcome and the thesis / subject of the case - enough to judge relevance.
queryis CBOSA's "all words" field (AND, with inflection). When a long query returns 0, the server retries with a relaxed query (no stop-words, then the first 4 / 2 terms) and says so (structuredContent.query_relaxation).topic filters:
symbol(e.g.6110VAT),keywords(CBOSA subject keyword),organ,judgmentType(Wyrok / Postanowienie / Uchwała). CBOSA sorts by date, not relevance.dates:
YYYY-MM-DD(alsoYYYY,YYYY-MM,DD.MM.YYYY); an unreadable date isinvalid_args.
get_judgment(doc_id, section?, offset?, maxChars?)- ruling by 10-character hex doc_id (from the CBOSA URL, e.g.7E50984BB7): metadata, a section map (tezy / sentencja / uzasadnienie / zdanie_odrebne with character offsets) and a text window (default 10 000, max 50 000 chars).section="uzasadnienie"jumps to the court's reasoning,section="hasla"returns metadata only; continue withoffset.search_by_case(caseNumber)- shortcut: search by case number (e.g.III OSK 1377/23,I SA/Gl 659/22).
Every response contains structuredContent.citations with the fields:
title, url (CBOSA), case_number, court, judgment_date,
decision_type, snippet, doc_id. Patron reads this field automatically
and surfaces it in the UI panel as the section "Rulings from CBOSA (NSA / WSA - administrative courts)".
Stack
Node 18+
@modelcontextprotocol/sdkStdio transport
https+ regex HTML parser (zero external deps beyond the SDK)500 ms throttle between requests (2 req/s)
SSL:
rejectUnauthorized: false- the CBOSA chain is sometimes incomplete on some machines; public rulings, no PII, MITM risk negligible against the benefit. See: LDH issue #167.
Build + run
npm install
npm run build
node dist/index.js # starts the server on stdioWiring into Patron
In patron/backend/mcp-servers.json (alongside mcp-saos and mcp-eu-sparql):
{
"name": "nsa",
"transport": "stdio",
"command": "node",
"args": ["C:/Users/<YOUR-USERNAME>/mcp-nsa/dist/index.js"],
"enabled": true
}Smoke test
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"s","version":"0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search","arguments":{"query":"RODO art 6"}}}' \
| node dist/index.jsShould return ~1500 hits + the top 5 with Polish NSA/WSA case numbers + CBOSA URLs
structuredContent.citations.
Lineage
Implementation rewritten in TypeScript on the basis of the HTTP/HTML contract from
legal-data-hunter/sources/PL/NSA
(Python + BeautifulSoup, MIT). It does not import the source code - it reproduces the
query pattern and HTML parsing.
License
MIT.
Part of MateMatic
This connector queries its source live. It is one of the Polish and EU source connectors bundled in PATRON and works with any MCP client.
Poland, one server for all sources: prawo-pl-mcp · each source on its own: mcp-saos · mcp-nsa (this repo) · mcp-isap · mcp-krs · mcp-eureka · kio-orzeczenia-mcp
European Union: mcp-eu-sparql (live) · mcp-eu-compliance (offline corpus)
A prepared corpus of Polish and EU law with a citation graph: Repertorium
mcp-saos, mcp-nsa, mcp-isap, mcp-krs and mcp-eu-sparql share one structuredContent.citations
contract: each tool returns an array of {title, url, snippet?, ...metadata}
that legal agents can render directly in their citation panel.
See matematicsolutions/.github for the full org profile.
Available Tools
3 toolsget_judgmentARead-onlyIdempotent
Pobiera orzeczenie z CBOSA po jego doc_id (10-znakowy hex z wynikow 'search'). Zwraca metadane (sygnatura, sad, data, sklad, symbol, hasla tematyczne, organ, wynik, powolane przepisy), MAPE SEKCJI (tezy/sentencja/uzasadnienie/zdanie_odrebne z pozycjami znakowymi) i fragment tresci (domyslnie 10000 znakow). Argumentacja sadu jest w section='uzasadnienie'; dalsze partie przez offset.
Inputs: doc_id (required), offset, section, maxChars.
searchARead-onlyIdempotent
Przeszukuje Centralna Baze Orzeczen Sadow Administracyjnych (CBOSA) - Naczelny Sad Administracyjny + 16 wojewodzkich sadow administracyjnych. TU zyje merytoryczne orzecznictwo RODO/UODO, podatkowe, celne, kontrola decyzji administracji publicznej. SAOS NIE indeksuje tego pionu. Zwraca strone 10 trafien (sygnatura, rodzaj, sad, data, fragment CBOSA wokol trafienia); dla pierwszych 5 dodatkowo symbol, hasla tematyczne, organ, wynik i teze/przedmiot sprawy - do oceny trafnosci. query to 'wszystkie slowa' (AND): podawaj 2-4 terminy; przy 0 wynikow konektor sam lagodzi zapytanie i to zaznacza. CBOSA sortuje po dacie, nie po trafnosci - temat zawezaj filtrami symbol/keywords/organ/judgmentType. Pelny tekst: get_judgment.
Inputs: court, organ, query, dateTo, +6 more.
search_by_caseARead-onlyIdempotent
Skrot: szuka orzeczenia po sygnaturze. Odpowiednik search z parametrem caseNumber. Jesli orzeczenie nie znajdzie sie - sygnatura moze byc z sadu powszechnego/SN/TK/KIO (uzyj wtedy saos__search_by_case).
Inputs: caseNumber (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
search and get_judgment are clearly distinct (find vs. fetch full text by doc_id), but search_by_case is explicitly described as a shortcut equivalent to search with caseNumber, creating a genuine overlap an agent must reason about. The descriptions do disambiguate the intended use, but the boundary is redundant rather than clean.
All names are lowercase snake_case, which is consistent. The verb patterns vary slightly (bare 'search' vs. 'get_judgment' vs. 'search_by_case'), but each name is self-explanatory and predictable.
Three tools is lean but justified for a read-only case-law lookup service: find, fetch, and lookup-by-citation. It is slightly thin (a by-case shortcut could have been folded into search), but nothing feels extraneous.
The core lifecycle for a legal database is covered: keyword search with filters, full-text retrieval by doc_id with section offsets, and citation lookup. Minor gaps exist (no browsing by court/date range, no cross-reference helper to the SAOS sibling base), which agents can work around.
Maintenance
Related MCP Connectors
Polish legal data for AI assistants: full-text search across 2.94M+ court rulings (common courts, Supreme Court, Constitutional Tribunal, KIO, NSA/WSA), statute text and version history from the official ELI register (164k+ acts), rulings citing a provision and citations between rulings, a citation verifier for case numbers, case-outcome and duration statistics, KIS tax interpretations, CJEU rulings applied in Poland, UODO decisions, KRS company lookup, court competence, official bank accounts and legal calculators. Works without an API key (daily limit).
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 case law, statutes with version history, citation verifier, court statistics, tax rulings
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides access to Polish court judgments from the SAOS database. Enables search and retrieval of judgments with full-text search, filtering, and detailed case information.320 npm1Apache 2.0
- AlicenseAqualityCmaintenanceMCP server for Polish administrative case-law (NSA + regional administrative courts, CBOSA) with ECLI and verifiable citations.3130 npmMIT
- AlicenseAqualityCmaintenanceMCP server for querying live Polish court case law (orzecznictwo) via the SAOS API, offering tools to search judgments, fetch full cases, find judgments citing specific statutory provisions, and check Constitutional Tribunal citations.7Apache 2.0
- AlicenseAqualityBmaintenanceEnables access to Polish Constitutional Tribunal rulings, including search by keywords or case signature, listing recent decisions, and retrieving full judgment texts with metadata and official links. Supports section-wise and chunked retrieval of long documents to manage context budgets.4MIT