mcp-nsa

mcp-nsa

MCP server for Polish administrative case-law (NSA + regional administrative courts, CBOSA) with ECLI and verifiable citations.

Category
Visit Server

README

mcp-nsa

MCP License: MIT Node

MCP server dla orzecznictwa polskich sądów administracyjnych (NSA + 16 WSA) przez CBOSA — Centralną Bazę Orzeczeń Sądów Administracyjnych (orzeczenia.nsa.gov.pl).

Po co

SAOS (System Analizy Orzeczeń Sądowych) nie indeksuje sądów administracyjnych. A to właśnie tam żyje merytoryczne orzecznictwo:

  • RODO / ochrona danych — decyzje Prezesa UODO zaskarżane do WSA, kasacje do NSA
  • Podatki — interpretacje indywidualne, decyzje organów podatkowych
  • Cła i akcyza
  • Zezwolenia administracyjne, koncesje
  • Kontrola działalności administracji publicznej

mcp-nsa zamyka tę lukę. Pokrycie: 427 000+ orzeczeń, od 2004 do dziś.

Tooly

  • search(query, caseNumber?, court?, dateFrom?, dateTo?, pageSize?, pageNumber?) — wyszukiwanie po słowach, sygnaturze, sądzie, dacie. Pobiera top-5 pełnych orzeczeń (sygnatura, sąd, data, skład, hasła, podst. prawna, fragment).
  • get_judgment(doc_id) — pełne orzeczenie po 10-znakowym hex doc_id (z URL CBOSA, np. 7E50984BB7).
  • search_by_case(caseNumber) — skrót: szukaj po sygnaturze (np. III OSK 1377/23, I SA/Gl 659/22).

Każda zwrotka zawiera structuredContent.citations z polami: title, url (CBOSA), case_number, court, judgment_date, decision_type, snippet, doc_id. Patron czyta to pole automatycznie i wystawia w panelu UI jako sekcję "Orzeczenia z CBOSA (NSA / WSA — sądy administracyjne)".

Stack

  • Node 18+
  • @modelcontextprotocol/sdk
  • Stdio transport
  • https + regex HTML parser (zero zewnętrznych dep poza SDK)
  • Throttle 500 ms między żądaniami (2 req/s)
  • SSL: rejectUnauthorized: false — chain CBOSA bywa niekompletny na niektórych maszynach; publiczne orzeczenia, bez PII, ryzyko MITM znikome wobec korzyści. Patrz: LDH issue #167.

Build + uruchomienie

npm install
npm run build
node dist/index.js   # uruchomi serwer na stdio

Wpięcie do Patrona

W patron/backend/mcp-servers.json (równolegle do mcp-saos i mcp-eu-sparql):

{
  "name": "nsa",
  "transport": "stdio",
  "command": "node",
  "args": ["C:/Users/<TWOJ-UZYTKOWNIK>/mcp-nsa/dist/index.js"],
  "enabled": true
}

Smoke test

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"s","version":"0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search","arguments":{"query":"RODO art 6","pageSize":10}}}' \
  | node dist/index.js

Powinno zwrócić ~1500 trafień + top-5 z polskimi sygnaturami NSA/WSA + URL CBOSA

  • structuredContent.citations.

Lineage

Implementacja przepisana do TypeScript na bazie kontraktu HTTP/HTML z legal-data-hunter/sources/PL/NSA (Python + BeautifulSoup, MIT). Nie importuje kodu źródłowego — odtwarza wzorzec zapytań i parsowanie HTML.

Licencja

MIT.

Part of the MateMatic legal stack

This server is one of five MCP connectors covering Polish jurisdiction + EU law, used by Patron (AGPL-3.0) and any other MCP-aware legal AI agent.

  • mcp-nsa (this repo) — NSA + 16 WSA administrative courts (CBOSA)
  • mcp-saos — common courts, SN, TK, KIO
  • mcp-isap — Polish legislation (Dz.U. + M.P.)
  • mcp-krs — Polish company registry (KRS)
  • mcp-eu-sparql — EU law + CJEU (EUR-Lex)

All five MCP servers share the same 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured