
Mcp Saos
io.github.matematicsolutionsPublished by GitHub account matematicsolutionsv1.3.1Updated Oct 24, 2026
MCP server for Polish court judgments via the SAOS API with verifiable citations.
Overview
Connector to the SAOS public database of Polish court judgments, letting an assistant search case law, fetch full rulings and check whether a judgment is…
- What you can do
- Search judgments by full text, court, judge, legal basis or dates
- Fetch a full judgment by its SAOS ID
- Look up a ruling directly by case number
- Run a citator check that finds later judgments citing a signature and scans them for overruling language, returning a verdict plus a short fragment for verification
- When to use it
- Useful when working with Polish case law: finding rulings on a topic, retrieving a specific judgment, or checking whether a cited decision has been departed from. Responses include coverage caveats, so it suits research and drafting support rather than authoritative legal advice.
- Requirements
- Local process run with npx from the npm package; needs Node.js 18 or newer, npm 9 or newer, and internet access to the live SAOS API. No API key, account, environment variable or header is required.
Installation
In SourceWeft
- Open Mcp Saos in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
mcp-saos
Installation (one command)
Published on npm + the MCP Registry (io.github.matematicsolutions/mcp-saos). Run without cloning:
MCP client configuration (stdio):
(Building from source - below.)
An MCP (Model Context Protocol) server for Polish case law - a connector to SAOS (System Analizy Orzeczen Sadowych - the courts' public case-law database, run by Fundacja ePanstwo).
Part of the MateMatic "Polish legal AI" project. It runs as a separate process communicating over stdio; the chat template (a fork of mike) calls it through the MCP protocol.
What SAOS is
An open database of Polish court judgments. Public REST API, no key required.
Coverage caveat: coverage is broad and includes current judgments (2024-2026 are well populated), but it is uneven by court type, and some Supreme Court resolutions exist only as citations in other judgments. Verify anything critical against sn.pl, orzeczenia.ms.gov.pl, trybunal.gov.pl.
The database covers: common courts (COMMON), the Sad Najwyzszy (Supreme Court, SUPREME), the Trybunal Konstytucyjny (Constitutional Tribunal, CONSTITUTIONAL_TRIBUNAL), the KIO (National Appeal Chamber, NATIONAL_APPEAL_CHAMBER). Administrative courts (WSA/NSA) - no data in SAOS.
MCP tools
saos_cite_check - the citator
Give it a case number (a placeholder here; use a real one):
It searches SAOS full-text for later judgments citing that signature, scans
their reasoning for departure phrases ("odstepuje od pogladu wyrazonego",
"nie podziela pogladu", "traci moc uchwala", "uchwala skladu siedmiu sedziow"
and others) within ~500 characters of the signature, and returns one of four
verdicts: przelamanie_wykryte, uchwala_skladu_powiekszonego,
nadal_cytowany, brak_cytowan_w_saos. Each hit includes a +-200 character
fragment for human verification.
Every phrase on the list was verified against live SAOS data - the evidence table, the algorithm and the honest-limits section are in docs/CITE-CHECK.md. The short version: no hits does NOT mean the judgment is still good law, and every response says so.
Requirements
- Node.js >= 18
- npm >= 9
- Internet access (live API saos.org.pl)
Installation and build
After npm run build, the entry point is dist/index.js.
Standalone run (test)
Wiring into the chat template (fork of mike) - mcp-servers.json
Add an entry to your client's MCP configuration (e.g. mcp-servers.json):
Provide the absolute path to dist/index.js. On Windows use forward slashes /
or double backslashes \\.
Tests
The smoke test checks tools/list (4 tools), search, search_by_case,
a Constitutional Tribunal lookup and saos_cite_check on a Supreme Court
resolution with known later treatment.
Architecture
No external dependencies for HTTP/JSON - requests go through the built-in node:https.
The only production dependency: @modelcontextprotocol/sdk.
Limitations and known pitfalls
pageSizehas a hard lower limit of 10 (SAOS returns HTTP 400 for less) - the server automatically enforces a minimum of 10.courtType=ADMINISTRATIVEreturns empty results - SAOS does not index WSA/NSA.- Dates in the database may contain OCR artifacts (e.g. "3013-12-04") - the case
number is more reliable than the
judgmentDatefield. - Coverage is uneven by court type - the server states the relevant caveats in every tool response.
saos_cite_checkis a heuristic. It reads the top citing judgments only, its phrase list cannot cover every way a court departs from a line of case law, and no hits does not confirm the judgment is current.
License
MIT - see the LICENSE file for details. Judgment data: Fundacja ePanstwo, open license (public API with no usage restrictions).
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 (this repo) · mcp-nsa · 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.
Source: README.md at commit 683010a
Tools
0Version history
2- v1.3.1LatestOct 13, 2026
- v1.2.0Sep 16, 2026
Score
50% 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 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts