polish-caselaw-mcp
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., "@polish-caselaw-mcp search judgments for art21par2 in Supreme Court"
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.
Polish Case Law MCP (polish-caselaw-mcp)
An MCP server exposing Polish court case law (orzecznictwo) live from the SAOS API. It has no local database — every tool call queries SAOS at request time.
The response envelope and the artNNNparN article-reference scheme mirror
polish-law-mcp (Polish statutes from ISAP), so a client can compose both
servers and follow a judgment straight to the provision it cites. This is an
independent implementation that shares those conventions for interoperability;
it is not derived from that server's code.
Tools
search_case_law— search judgments (query, court type, dates, sort, limit)get_judgment— full judgment by SAOS id (text, judges, referenced regulations as ELI ids + article refs)find_judgments_for_provision— judgments citing a statute provision (pl-du-YYYY-NNN), verified against referenced regulationscheck_constitutional_status— Constitutional Tribunal (TK) judgments citing a provision (does NOT assert the provision was struck down — read the operative part)list_courts— court types for filteringcaselaw_about/caselaw_list_sources— provenance and legal basis (prefixed to avoid name clashes with sibling MCP servers in a gateway)
All tools return { results, _metadata } (ToolResponse). get_judgment exposes
referenced_regulations[].articles_refs for cross-server linking.
Related MCP server: swiss-courts-mcp
Run
npm install
npm run build
npm start # stdio MCP serverHTTP (obraz publikowany pod tagiem -http)
npm run build
npm run start:http # nasłuchuje na PORT (domyślnie 3000)
curl http://localhost:3000/healthEndpointy: POST /mcp (Streamable HTTP), GET /health (probes).
Obraz :latest uruchamia transport stdio (Docker MCP Gateway).
Wariant HTTP publikowany jest pod tagiem :latest-http — używa go agent
łączący się po sieci. Lokalnie: docker build -f Dockerfile -t caselaw-http .
Install
This section covers stdio clients (see ## Run above for the HTTP variant).
Pick whichever setup matches your client.
Docker MCP Gateway
mcp-gateway-server.yaml already points at the published image, so no build is
needed:
docker mcp profile server add default --server file://"$PWD/mcp-gateway-server.yaml"To run your own build instead, set image: in that file to a local tag and
build it first:
docker build -f Dockerfile.stdio -t polish-caselaw-mcp:local .The gateway's --block-network flag cuts SAOS off; tools then return a clear
network error rather than hanging.
Standalone — Docker
Any MCP client that launches a stdio command can run the image directly.
--rm -i matters: the server talks over stdin/stdout and should not outlive
the client.
{
"mcpServers": {
"polish-caselaw": {
"command": "docker",
"args": ["run", "--rm", "-i", "ghcr.io/pawelharacz/polish-caselaw-mcp:latest"]
}
}
}Pass configuration through with -e:
"args": ["run", "--rm", "-i", "-e", "SAOS_TIMEOUT_MS=60000",
"ghcr.io/pawelharacz/polish-caselaw-mcp:latest"]Standalone — Node
Without Docker, point the client at the built entrypoint:
{
"mcpServers": {
"polish-caselaw": {
"command": "node",
"args": ["/absolute/path/to/polish-caselaw-mcp/dist/index.js"],
"env": { "SAOS_TIMEOUT_MS": "60000" }
}
}
}Run npm install && npm run build first — dist/ is not committed.
Claude Code
claude mcp add polish-caselaw -- docker run --rm -i ghcr.io/pawelharacz/polish-caselaw-mcp:latestVerify with /mcp, then call caselaw_about — it returns provenance without
touching SAOS, so it confirms the server is wired up even if the API is slow.
Configuration
Variable | Default | Purpose |
|
| HTTP timeout per SAOS request. |
|
| Delay before the single retry, so a slow upstream is not hit again immediately. |
Legal
Court decisions are not statutes. See sources.yml for the legal basis.
Research tool, not legal advice — verify against official court portals.
License
Apache-2.0
Available Tools
7 toolscaselaw_aboutA
Case-law server metadata, provenance, and freshness (live SAOS). Call to understand coverage and basis before relying on results.
Inputs: no named parameters.
caselaw_list_sourcesA
Provenance and legal-basis metadata for the case-law source (SAOS). Call FIRST to understand what this case-law server covers.
Inputs: no named parameters.
check_constitutional_statusA
Find Polish Constitutional Tribunal (TK) judgments that cite a given statutory provision. Provide document_id (pl-du-YYYY-NNN) or journal_year + journal_entry, optionally an article and title_hint. Returns TK judgments with confirmed_reference (verified via referenced regulations). IMPORTANT: a citing TK judgment does NOT by itself mean the provision was struck down — read the operative part. Live from SAOS; not legal advice.
Inputs: limit, article, title_hint, document_id, +2 more.
find_judgments_for_provisionA
Find Polish judgments that cite a given statutory provision. Provide either document_id (pl-du-YYYY-NNN, e.g. pl-du-1997-553 for the Criminal Code) or journal_year + journal_entry, optionally an article (e.g. "art. 267") and title_hint to sharpen the text search. Each result has confirmed_reference=true when the full judgment actually cites the provision (verified via referenced regulations), false when it is only a text match. Live from SAOS; not legal advice.
Inputs: limit, article, title_hint, document_id, +2 more.
get_judgmentA
Fetch the full text and metadata of a single Polish court judgment by its SAOS id (use the id returned by search_case_law). Includes full text, judges, decision, summary, legal bases, and referenced_regulations mapped to ELI ids (pl-du-YYYY-NNN) plus articles_refs in the artNNNparN scheme. Live from SAOS; not legal advice.
Inputs: id (required).
list_courtsA
List the Polish court types available for the court_type filter in search_case_law.
Inputs: no named parameters.
search_case_lawA
Search Polish court judgments (orzecznictwo) live from the SAOS API (saos.org.pl). Returns matching judgments with snippets (>>> <<< around matches), court, case number, and date. Use get_judgment to fetch the full text of a result. Data is sourced live from SAOS, separate from statutory law. Not legal advice; verify against official court portals.
Inputs: query (required), sort, limit, date_to, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes: search, fetch by id, list courts, and specialized statutory-citation lookups are easy to tell apart. The main ambiguity is between caselaw_about and caselaw_list_sources, which both describe provenance, coverage, and source metadata.
The dominant pattern is verb_noun: search_case_law, get_judgment, list_courts, find_judgments_for_provision, check_constitutional_status. The tools caselaw_about and caselaw_list_sources break this pattern with a caselaw_ prefix and a non-verb name, but the inconsistency is minor and the names remain readable.
Seven tools is well within the ideal range for a focused legal-research server. Each tool supports a distinct part of the caselaw workflow without unnecessary duplication.
The server covers the core case-law lifecycle: discovering court types, searching judgments, fetching full texts, looking up citations by statutory provision, checking constitutional-court rulings, and inspecting source provenance. No obvious dead-end or missing operation is apparent for its stated purpose.
Maintenance
Related MCP Connectors
MCP for CourtListener: US federal and state opinions, dockets, judges, plus eCFR regulations.
Experimental read-only MCP over metadata of Ukrainian court decisions (DSA/EDRSR open data).
Polish statutes (Dziennik Ustaw, ELI) and court rulings (SAOS) for AI agents. Runs on Apify.
CourtListener MCP — Free Law Project's CourtListener API (v4).
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
- AlicenseAqualityAmaintenanceMCP server for searching Swiss court decisions from federal and cantonal courts via entscheidsuche.ch. Enables full-text search, law reference lookup, and filtering by canton, court level, and date without API keys.820 PyPI1MIT
- AlicenseAqualityCmaintenanceMCP server for Polish administrative case-law (NSA + regional administrative courts, CBOSA) with ECLI and verifiable citations.3111 npmMIT
- AlicenseAqualityBmaintenanceMCP server for Polish case-law (SAOS) — Supreme Court, Constitutional Tribunal, common courts and KIO — with ECLI and verifiable citations.3125 npm2MIT