
Kio Orzeczenia Mcp
io.github.matematicsolutions由 GitHub 帳號 matematicsolutions 發布v0.4.5更新於 Oct 24, 2026
MCP server for Krajowa Izba Odwolawcza (KIO) rulings from orzeczenia.uzp.gov.pl.
概覽
本機 MCP 伺服器,讓助理檢索波蘭 UZP 資料庫中的 KIO 政府採購裁決,並取得附引用的全文。
- 可以做什麼
- 依詞句、案號、日期範圍或 PZP 條文檢索 KIO 判例,支援詞形變化與分頁,並可列出近期裁決或引用某條 PZP 條文的裁決。依案號或內部 ID 取得單一裁決的全文、當事人、主文與理由。取得 UZP 產生的裁決 PDF 連結,但不下載檔案。查詢連接器宣告的涵蓋範圍與已知缺口,避免誤判某裁決不存在。
- 適用情境
- 適合法律與政府採購情境:助理需要查找 KIO 裁決、了解某條 PZP 條文的裁判見解,或調取特定裁決並附上可驗證的案號、連結與日期以供引用。此版本為概念驗證,宜作探索性使用而非正式生產環境。
- 執行需求
- 以本機 Python 程序執行(PyPI 套件 kio-orzeczenia-mcp,可透過 uvx 或 python -m 啟動)。需要連線至 UZP 公開判例網站的網路,該站以 HTML 擷取而非官方 API。可選設定 KIO_MCP_RATE_LIMIT 與 KIO_MCP_CACHE_DIR 控制請求頻率與快取位置。未宣告需要帳號、API 金鑰或標頭。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Kio Orzeczenia Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
kio-orzeczenia-mcp
MCP server (Model Context Protocol) for the case law of the Krajowa Izba Odwolawcza (KIO) (National Appeals Chamber) at the Urzad Zamowien Publicznych (Public Procurement Office) - the public database orzeczenia.uzp.gov.pl.
It lets Claude / Cursor / VS Code MCP agents consume KIO rulings with verifiable citations (signature + URL + date).
Status: POC v0.1.0 | License: Apache-2.0 | Maintainer: MateMatic
Preliminary warning. The v0.1.0 connector is a proof-of-concept release. It fetches data from the public UZP case law database via HTML (no official REST API). Full legal disclaimer - see the "Legal disclaimer" section below. A dedicated smoke test and notification to UZP are required before production deployment.
What KIO is
The Krajowa Izba Odwolawcza (National Appeals Chamber) is an administrative (quasi-judicial) body operating at the Urzad Zamowien Publicznych (Public Procurement Office) - KIO members are independent when adjudicating (art. 471 PZP) - which hears appeals against contracting authorities' decisions in public procurement proceedings (the Act of 11 September 2019 - Public Procurement Law). KIO rulings are made publicly available by UZP under the Act on access to public information.
KIO rulings are not a source of law within the meaning of art. 87 of the Constitution of the Republic of Poland - they are reference material widely used in the practice of law firms dealing with public procurement.
Quickstart
Wiring into Claude Code
Add to ~/.claude.json (or .mcp.json in the project):
Restart Claude Code. After startup, 6 tools should be visible.
Windows 11 with Smart App Control
Smart App Control blocks unsigned executables, which covers uvx.exe, pip.exe
and the kio-orzeczenia-mcp.exe launcher that pip writes at install time. The python.exe and
py.exe from the python.org installer are signed by the Python Software
Foundation, so running the module through the interpreter works:
pip.exe is blocked for the same reason, so install with python -m pip, not
pip install. If python is not on PATH, use the Windows launcher: py -3 -m kio_orzeczenia_mcp.
Do not turn Smart App Control off to work around this - it cannot be re-enabled without reinstalling Windows.
6 MCP tools
1. kio_search(query: SearchQuery) -> SearchResult
Search over KIO case law. All fields optional.
Returns {total, page, items: [OrzeczenieSummary]}.
2. kio_get_orzeczenie(signature_or_id: str | int) -> Orzeczenie
Fetches the full text of a single ruling.
Returns the full Orzeczenie with content_text, sentence, reasoning (if the parser can extract them), pzp_articles, subject_index, doc_type, outcome, chamber_composition, parties.
issue_date may be null - UZP has no issue date for some older records. We do not substitute a placeholder date.
3. kio_recent(days: int = 30, limit: int = 20) -> list[OrzeczenieSummary]
The most recent rulings from the last N days, sorted by date descending.
4. kio_by_pzp_article(article: str, limit: int = 20) -> list[OrzeczenieSummary]
Rulings citing a specific PZP article. Uses the UZP server-side Art filter, which matches the provisions dictionary and is format-sensitive ("art. 226 ust. 1 pkt 5" hits, plain "226" does not). On an empty result the tool falls back to a full-text phrase search.
5. kio_get_pdf_url(signature_or_id: str | int) -> dict
Returns the URL to the PDF (rendered by UZP from .docx via Qt 4.8.7). Does not fetch bytes - we link to it.
6. kio_coverage() -> Coverage
Declares what this connector covers, where it comes from, and what it does NOT cover. Every gap carries a stable id and a fallback. Call it before telling a user a ruling "does not exist" - the absence may be a gap in this connector, not in KIO case law.
3 usage examples (natural language)
Example 1: "KIO rulings on abnormally low price from the past year"
The agent calls kio_search:
Result: a list of OrzeczenieSummary with human_readable_citation ready to insert into a court filing.
Example 2: "KIO rulings citing art. 226 sec. 1 point 5 PZP"
The agent calls kio_by_pzp_article:
Example 3: "Ruling KIO 2924/21 - who were the parties and was the appeal upheld"
The agent calls kio_get_orzeczenie:
Result: the full Orzeczenie with parties, sentence, reasoning.
Limitations (POC)
- Mapping signature -> internal_id requires a search - if you query by signature, we make +1 req
- Server-side PZP article filter is dictionary-based -
Artmatches entries of the UZP provisions dictionary, so the format matters ("art. 226 ust. 1 pkt 5", not"226"); on a miss we fall back to a phrase search, which is broader and needs verification - PDF not fetched - only a link to the UZP page (product decision)
- The sentence/reasoning parser is shallow - in the POC we return
content_textas plain text. Splitting into sections -> v1.0 - Rate limit 1 req/s - large lists may be slow. A 7-day cache for rulings (immutable) mitigates this.
- UZP serves a fixed 10 results per page -
size > 10is stitched client-side from consecutive pages, i.e. +1 request per extra page - Scraping, not an API - UZP rebuilt the search engine in July 2026 and every endpoint moved (see
DISCOVERY.md). Runpytest -m smokeafter any UZP-side change;tests/test_parser_regression.pyguards the parser offline.
Cache
- Rulings (immutable): 7 days
- Search result lists: 6 hours
- PZP dictionary (once implemented): 30 days
Cache location: ~/.matematic/cache/kio/ (configurable via KIO_MCP_CACHE_DIR).
Audit log
Location: ~/.matematic/audit/kio-orzeczenia-mcp.jsonl
JSONL format (one entry per tool call). See CONSTITUTION.md Art. 3.
What is NOT logged: the full text of a ruling (content_text, reasoning). We log only signatures and metadata.
Legal disclaimer
The data comes from the public UZP case law database (orzeczenia.uzp.gov.pl), made available under the Act of 6 September 2001 on access to public information and the Act of 11 September 2019 - Public Procurement Law.
The connector:
- does not modify the source data,
- does not de-anonymize the parties to a proceeding beyond what UZP publishes,
- does not circumvent any technical protections,
- identifies itself with the User-Agent header
matematic-kio-mcp/{version} (+https://matematic.co).
Pre-release blocker. Before publishing the repository on GitHub, a notification to UZP ([email protected]) about launching the connector is planned - User-Agent, query limit, nature of access. Status: TODO.
In case of objections from UZP or other parties - contact: [email protected].
License
Apache-2.0. See LICENSE.
Project constitution
See CONSTITUTION.md - 4 governance principles (public data, rate limit, audit log, citations).
Other open connectors for Polish law
Open-source connectors by MateMatic that complement the scope of this repository:
mcp-saos- SAOS (Supreme Court, Supreme Administrative Court, common courts)mcp-eu-sparql- EU law via Cellar SPARQLmcp-isap- Journal of Laws, Monitor Polski, ministerial gazettes (Sejm ELI API)
External catalog of legal sources: worldwidelaw/legal-sources (bulk harvest scripts, MIT).
來源:README.md,提交 7456d13
工具
0版本歷史
3- v0.4.5最新Oct 15, 2026
- v0.4.4Sep 24, 2026
- v0.4.3Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分