
Mcp Nsa
io.github.matematicsolutions由 GitHub 帳號 matematicsolutions 發布v1.4.0更新於 Oct 24, 2026
MCP server for Polish administrative court rulings (NSA/WSA) via CBOSA with citations.
概覽
讓助理在 CBOSA 資料庫中檢索波蘭行政法院(NSA 與 WSA)判例,並取得附引用的完整裁判書。
- 可以做什麼
- 透過三個工具存取波蘭行政法院的 CBOSA 資料庫:依關鍵字、案號、法院或日期範圍檢索;用 get_judgment 依十位十六進位文件 ID 取得完整裁判書;用 search_by_case 作為案號查詢的捷徑。檢索會回傳前五份完整裁判書,包含案號、法院、日期、合議庭、關鍵字、法律依據與摘錄。每次回應都帶有結構化引用欄位(標題、CBOSA 連結、案號、法院、裁判日期、裁判類型、摘錄、文件 ID)。
- 適用情境
- 當助理需要波蘭行政判例時適用,例如 UODO 上訴至 WSA 的 GDPR 與資料保護裁決、稅務裁定、海關與消費稅、行政許可與特許,以及公共行政活動審查。它填補了 SAOS 不收錄行政法院的缺口。
- 執行需求
- 透過 npx 從 npm 套件 @matematicsolutions/mcp-nsa 以 stdio 程序在本機執行,需要 Node.js 18 或以上版本。未宣告帳號、API 金鑰、環境變數或標頭。需要連線至 CBOSA 網站(orzeczenia.nsa.gov.pl)的網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Nsa,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-nsa
Installation (one command)
Published on npm + the MCP Registry (io.github.matematicsolutions/mcp-nsa). Run without cloning:
MCP client configuration (stdio):
(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?)- search by keyword, case number, court, date. Fetches the top 5 full rulings (case number, court, date, panel, keywords, legal basis, excerpt).
get_judgment(doc_id)- full ruling by 10-character hex doc_id (from the CBOSA URL, e.g.7E50984BB7).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/sdk- Stdio 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
Wiring into Patron
In patron/backend/mcp-servers.json (alongside mcp-saos and mcp-eu-sparql):
Smoke test
Should 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.
來源:README.md,提交 6a7b1a6
工具
0版本歷史
2- v1.4.0最新Oct 13, 2026
- v1.3.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分