Imported from matematicsolutions/mcp-saos (
AGENTS.md). Install upstream withnpx skills add matematicsolutions/mcp-saos. Copyright stays with the author.
AGENTS.md - mcp-saos
An agents.md standard file (Linux Foundation / Agentic AI Foundation) - the canonical instructions for AI agents working with this repository. Read natively by Cursor, Codex (OpenAI), Jules (Google), Devin / Windsurf, Aider, Amp, Factory, GitHub Copilot.
Project goal
An MCP (Model Context Protocol) server for case law of the Polish common courts, the Sad Najwyzszy (Supreme Court), the Trybunal Konstytucyjny (Constitutional Tribunal), and the KIO (National Appeal Chamber) - via the public SAOS (System Analizy Orzeczen Sadowych - the courts' public case-law database) API, https://saos.org.pl.
One of MateMatic's 5 Polish-law connectors: mcp-saos (this one), mcp-nsa, mcp-isap, mcp-krs, mcp-eu-sparql.
The connector plugs in via mcp-servers.json in any protocol-compliant client (Claude Code, Patron, Cursor, Codex, Continue, etc.).
MateMatic context (HARD CONSTRAINTS)
The repo is run by MateMatic Solutions. The connector is trust infrastructure - it serves any LegalTech product that needs citations from Polish case law, in any jurisdiction.
- Every tool call MUST return
structuredContent.citationswith: judgment title, canonical URL (SAOS), court, date, case number. This is the product contract. - No caching of client data - the connector is stateless and does not log queries.
- No content modification - we return exactly what the SAOS API returns, with no "enhancement" / summarization. Modification = loss of evidentiary value.
MCP tools (tools contract)
| Tool | Key parameters | Returns |
|---|---|---|
search |
query, court_type?, date_from?, date_to? |
list of judgments with metadata + citations |
get_judgment |
judgment_id |
full judgment text + metadata + citations |
search_by_case |
case_number (case signature) |
all judgments for a given case number |
Full schema description: src/index.ts + MCP documentation in README.md.
Build and test
npm install # Node 20+
npm run build # tsc -> dist/
npm start # node dist/index.js (stdio transport)
npm run dev # ts-node src/index.ts (development)
Manual test via the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js
Code rules
- TypeScript strict. No
anyin new code. @modelcontextprotocol/sdk^1.12.0 - the MCP SDK; do not change the version without checking compatibility with Patron and other clients.- No Polish characters in commit messages.
- Bump CHANGELOG.md on EVERY tool contract change (SEMVER MAJOR).
- No node_modules / dist in commits (they are in
.gitignore).
What NOT to do (hard rules)
- Do NOT add tools that send user data to external APIs other than SAOS. The connector must be single-source (SAOS); every additional source = a separate MCP repo.
- Do NOT modify the returned judgment text - it is primary, integral data.
- Do NOT cache queries containing PII - the connector is stateless. Caching happens at the client level (Patron) with a retention policy.
- No breaking changes without a MAJOR bump in
package.jsonand CHANGELOG.
Sources of truth (reading order)
- README.md - installation and call examples
- CHANGELOG.md - version history
src/index.ts- tools implementation + schema- SAOS API documentation - upstream contract
Agent compatibility
The AGENTS.md standard. For Claude Code there is an additional CLAUDE.md file.
The connector is agent-agnostic (MCP) - it plugs into Claude Code, Patron, Cursor, Codex, Continue, Cline, and any protocol-compliant client.
License
MIT - see LICENSE. You may embed it in any commercial / open source product without restrictions.
Citation: MateMatic Solutions (2026), mcp-saos - MCP server for Polish SAOS case law, https://github.com/matematicsolutions/mcp-saos, MIT.