# mcp-saos [Health: Active]

**Category:** ⚖️ Legal  
**Repository:** https://github.com/matematicsolutions/mcp-saos  
**GitHub Stars:** 2  
**npm Downloads (last month):** 312  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-saos

## Description
MCP server for Polish court judgments via the SAOS API with verifiable citations.

## Tools
Capabilities this server exposes over MCP:

- **search** — Przeszukuje baze orzeczen sadow polskich w SAOS (System Analizy Orzeczen Sadowych). Pokrycie obejmuje takze orzeczenia biezace (lata 2024-2026 sa dobrze reprezentowane), ale jest nierowne wg typu sadu. Sady administracyjne (WSA/NSA) NIE sa indeksowane. Daty bywaja znieksztalcone przez OCR - weryfikuj sygnature i date w zrodle. Przydatny do: analizy linii orzeczniczej, precedensow, wyszukiwania po tresci / sygnatuze / sedzim / podstawie prawnej. Bledy: `invalid_court_type` (zly enum), `upstream_error` (HTTP/timeout API).
- **get_judgment** — Pobiera pelne orzeczenie z SAOS po jego numerycznym ID. Zwraca metadane (sygnatura, sad, data, sklad, podstawy prawne), streszczenie (jesli dostepne) oraz pierwsze 2000 znakow tresci. ID orzeczenia pochodzi z wynikow narzedzia 'search' lub 'search_by_case'. Bledy: `missing_arg` (brak id), `not_found` (id poza baza), `upstream_error`.
- **search_by_case** — Skrot: szuka orzeczenia po sygnaturze akt (np. 'I ACa 772/13', 'IV CSK 123/15', 'KIO/UZP 100/12'). Odpowiednik search z parametrem caseNumber. Jesli sygnatura nie znajdzie sie w SAOS, sprawa moze byc z sadu administracyjnego (WSA/NSA - nieindeksowane) lub jeszcze nieopublikowana w bazie. Bledy: `missing_arg` (brak caseNumber), `upstream_error`.
- **saos_cite_check** — Citator 'czy wyrok zyje': dla podanej sygnatury szuka POZNIEJSZYCH orzeczen, ktore ja cytuja (pelnotekstowo w SAOS), i skanuje ich uzasadnienia pod frazy przelamania linii orzeczniczej (np. 'odstepuje od pogladu wyrazonego', 'nie podziela pogladu', 'traci moc uchwala', 'uchwala skladu siedmiu sedziow') w oknie ~500 znakow wokol wystapienia sygnatury. Werdykt: przelamanie_wykryte / uchwala_skladu_powiekszonego / nadal_cytowany / brak_cytowan_w_saos. To heurystyka - kazde trafienie ma fragment tekstu do recznej weryfikacji, a brak trafien NIE potwierdza aktualnosci orzeczenia. Bledy: `missing_arg` (nieczytelna sygnatura), `invalid_court_type`, `upstream_error`.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-saos": {
    "command": "npx",
    "args": ["-y","@matematicsolutions/mcp-saos"]
  }
}
```

## Documentation

## What mcp-saos does

The mcp-saos MCP server exposes the SAOS public REST API to MCP-compatible AI clients. SAOS contains Polish judgments from common courts, the Supreme Court, the Constitutional Tribunal, and the National Appeal Chamber. It does not provide indexed data from administrative courts such as WSA or NSA.

The server is intended for research workflows involving Polish case law. Responses include caveats about database coverage, and the project’s citation contract can provide structured citation records containing a title, URL, snippet, and related metadata.

## How it works

The process communicates with an MCP client over standard input and output using JSON-RPC. It sends requests to SAOS at `https://www.saos.org.pl/api`, including the judgment search and individual judgment endpoints. HTTP and JSON handling use Node’s built-in HTTPS support; the production MCP dependency is the official SDK.

The `saos_cite_check` tool searches for later judgments that cite a supplied case signature. It examines text near the cited signature for phrases that may indicate a departure from, or loss of authority of, the earlier judgment. Results use verdicts such as `przelamanie_wykryte`, `uchwala_skladu_powiekszonego`, `nadal_cytowany`, and `brak_cytowan_w_saos`, with text fragments for human review.

## Setup and configuration

The mcp-saos MCP server requires Node.js 18 or newer, npm 9 or newer, and internet access to the live SAOS API. The published package can be started without cloning the repository:

```bash
npx -y @matematicsolutions/mcp-saos
```

For a source build, clone the repository, run `npm install`, then run `npm run build`. The generated entry point is `dist/index.js`. A stdio client configuration uses `npx` with the package name, or invokes that built JavaScript file with Node. Diagnostic output goes to stderr, leaving stdin and stdout available for MCP traffic.

## Tools and capabilities

- `search` performs full-text searches and supports filters for court, judge, legal basis, and dates.
- `get_judgment` retrieves a complete SAOS judgment by its identifier.
- `search_by_case` searches using a case number such as `I ACa 772/13`.
- `saos_cite_check` looks for later citing judgments and possible overruling language.

## Limitations and notes

The citator is heuristic rather than a definitive statement of whether a judgment remains good law. It checks the top citing results and a defined phrase set, so an absence of matches does not establish that a judgment is still current. Each result should be reviewed by a legal professional and checked against primary sources where the issue matters.

SAOS coverage varies by court and period. Current judgments are well represented in some areas, but certain Supreme Court resolutions may appear only as citations. Administrative-court searches return no indexed results. The database can also contain OCR-related date errors, making the case number more dependable than `judgmentDate` in affected records.

The server enforces a minimum `pageSize` of 10 because smaller values cause an SAOS error. The mcp-saos MCP server does not require an API key, but it does require network access. The software is MIT-licensed; judgment data is provided through Fundacja ePanstwo’s public API under its stated open-use terms.

_Full upstream README: https://allmcps.com/mcp/mcp-saos/readme_

