SAOS MCP

SAOS MCP

Provides access to Polish court judgments from the SAOS database. Enables search and retrieval of judgments with full-text search, filtering, and detailed case information.

Category
访问服务器

README

SAOS MCP - Polish Court Judgments

npm version License: Apache-2.0 MCP

An MCP server that connects Claude (and other AI clients) to SAOS - the official public database of Polish court judgments (System Orzecznictwa Sądów Powszechnych i Sądu Najwyższego).

Who is this for? Polish lawyers, legal researchers, and law students who want to search and analyze Polish court decisions directly inside Claude, Cursor, or any MCP-compatible AI client. No API key required - SAOS is a public database.


Features

  • Full-text search across hundreds of thousands of Polish judgments from courts of appeal, regional courts, and district courts
  • Filter by case number, judge name, court type, judgment type, and date range
  • Retrieve full judgments - metadata, operative part (sentencja), and complete reasoning (uzasadnienie)
  • Local file archive - in stdio mode, saves each retrieved judgment as a .md file for offline reference
  • In-memory cache (15 min TTL) to avoid redundant API calls
  • Timeout protection - 15-second abort signal on all API requests
  • Dual transport - stdio for local Claude Desktop use, HTTP for remote/hosted deployment

Dla polskich prawników

SAOS MCP pozwala Claude'owi przeszukiwać bazę orzeczeń sądowych i analizować je bezpośrednio w rozmowie. Nie musisz otwierać przeglądarki ani kopiować tekstów — wystarczy zapytać Claude'a.

Jak zacząć

Krok 1. Zainstaluj Node.js (wersja 20 lub nowsza). To jedyna techniczna rzecz do zrobienia.

Krok 2. Otwórz plik konfiguracyjny Claude Desktop:

  • Windows: naciśnij Win + R, wpisz %APPDATA%\Claude i otwórz plik claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Krok 3. Dodaj poniższy wpis do sekcji mcpServers (jeśli plik jest pusty, wklej całość):

{
  "mcpServers": {
    "SAOS": {
      "command": "npx",
      "args": ["-y", "@thescalablelegalmarketer/saos-mcp"]
    }
  }
}

Krok 4. Zapisz plik i zrestartuj Claude Desktop. Przy pierwszym uruchomieniu Claude automatycznie pobierze serwer.

Przykładowe zapytania

Znajdź w SAOS 3 orzeczenia z lat 2020-2025 dotyczące sporów
o nienależyte wykonanie umowy wdrożeniowej oprogramowania.
Dla każdego podaj:
- sentencję (dosłowny cytat)
- podstawę prawną
- główny argument sądu
Wyszukaj orzeczenia dotyczące praw autorskich do oprogramowania
stworzonego przez pracownika na rzecz pracodawcy. Jakie stanowisko
zajmowały sądy w kwestii własności kodu?

Uwaga: Orzeczenia w bazie SAOS mają zanonimizowane dane stron (zamiast nazwisk widnieje (...)). To cecha samej bazy danych, nie ograniczenie narzędzia.


Installation

Claude Desktop (recommended)

Prerequisites: Node.js 20+ must be installed on your machine.

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "SAOS": {
      "command": "npx",
      "args": ["-y", "@thescalablelegalmarketer/saos-mcp"]
    }
  }
}

Restart Claude Desktop. The server starts automatically - no separate process needed.

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Remote HTTP (self-hosted)

{
  "mcpServers": {
    "SAOS": {
      "url": "https://your-domain.com/mcp"
    }
  }
}

See Deployment for instructions on hosting your own instance.

From source (development)

git clone https://github.com/pawelojdowski/saos-mcp
cd saos-mcp
npm install
npm run build
{
  "mcpServers": {
    "SAOS": {
      "command": "node",
      "args": ["C:\\PATH\\TO\\saos-mcp\\dist\\index.js"]
    }
  }
}

Environment variable (stdio mode only):

  • SAOS_OUTPUT_DIR - directory for saved .md judgment files (default: ~/Documents/saos-orzeczenia)

Tools

saos_search_judgments

Search for judgments in the SAOS database. Results sorted by date (newest first). All parameters optional.

Parameter Type Description
query string Full-text search across all fields (content + metadata)
caseNumber string Exact case number, e.g. VIII GC 23/24
judgeName string Judge's full name
keyword string SAOS thematic keyword, e.g. odszkodowanie (damages)
ccCourtType string APPEAL / REGIONAL / DISTRICT
judgmentType string SENTENCE / DECISION / RESOLUTION
dateFrom string Format YYYY-MM-DD
dateTo string Format YYYY-MM-DD
pageSize number Max 20, default 10
pageNumber number Starting from 0

Tip: SAOS full-text search requires all keywords to appear in the text. Use multiple specific terms rather than quoted phrases, e.g. umowa wdrożeniowa oprogramowanie nienależyte wykonanie.


saos_get_judgment

Retrieve a full judgment by ID. Returns metadata, verbatim operative part (sentencja), and full reasoning (uzasadnienie). In stdio mode, also saves a .md file to SAOS_OUTPUT_DIR.

Parameter Type Description
id number Required. Judgment ID from saos_search_judgments results

saos_list_courts

Returns a list of common courts (ID, name, type). Use this to find court IDs for filtering.


Example prompt

Use SAOS to find 3 judgments from 2024–2025 concerning disputes over
defective implementation of ERP software contracts.
For each judgment call saos_get_judgment and provide:

1. Operative part - quote verbatim from the [VERBATIM QUOTE] section
2. Ratio decidendi - summarize the main reason for the ruling from the
   "Sąd zważył" section of the reasoning
3. Legal basis - which provisions did the court invoke

Development

npm run dev          # stdio server (TypeScript, no build needed)
npm run dev:http     # HTTP server on port 3000
npm run build        # type-check + esbuild bundle → dist/
npm run start        # run compiled stdio bundle
npm run start:http   # run compiled HTTP server

Deployment

Build and run with Docker:

docker build -t saos-mcp .
docker run -p 3000:3000 saos-mcp

MCP endpoint: http://localhost:3000/mcp Health check: http://localhost:3000/health

Deploy to Railway, Render, or Fly.io using the included Dockerfile.


Project structure

saos-mcp/
├── src/
│   ├── types.ts        ← SAOS API TypeScript interfaces
│   ├── api.ts          ← SAOS API client + in-memory cache
│   ├── format.ts       ← HTML parsing, text formatting, file saving
│   ├── server.ts       ← createMcpServer() factory - tool registration
│   ├── index.ts        ← stdio entry point
│   └── http-server.ts  ← HTTP entry point + /health endpoint
├── dist/               ← build output (gitignored)
│   ├── index.js        ← stdio bundle (with #!/usr/bin/env node shebang)
│   └── http-server.js  ← HTTP bundle
├── build.mjs           ← esbuild config (two outputs in parallel)
├── tsconfig.json       ← type-check only (noEmit), bundling via esbuild
├── server.json         ← MCP marketplace manifest
├── Dockerfile          ← multi-stage build → image with http-server.js
├── icon.svg
└── package.json

Known limitations

  • Partial coverage - SAOS indexes mainly courts of appeal and regional courts; district courts are less complete
  • Anonymized parties - the API returns (...) instead of party names; this is a feature of the SAOS database
  • decision field - available mainly for Supreme Court judgments; for common courts the operative part is extracted via HTML parsing
  • In-memory cache - 15 min TTL, resets on process restart
  • HTTP mode - does not save .md files (no access to the user's file system)

About SAOS

SAOS (System Analizy Orzeczeń Sądowych - System of Analysis of Court Judgments) is an open academic project led by the Interdisciplinary Centre for Mathematical and Computational Modelling (ICM) at the University of Warsaw, funded by the National Centre for Research and Development (grant IS-1/040/NCBR/2014).

The platform aggregates judgments from Polish common courts, administrative courts, the Supreme Court (Sąd Najwyższy), the Constitutional Tribunal (Trybunał Konstytucyjny), and the National Appeals Chamber (KIO). Data is imported automatically from official court portals. Personal data appearing in judgments is processed under GDPR Art. 6(1)(e) (public interest); responsibility for its publication rests with the source court systems.

The API is freely accessible with no authentication required.

Disclaimer: This tool is intended for legal research only and is not a substitute for professional legal advice. Always verify citations against primary sources before relying on them in legal proceedings.


License

Apache-2.0 © Paweł Ojdowski

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选