mcp-krs
This MCP server lets you query the Polish National Court Register (KRS) for company and organization data via the Ministry of Justice API.
Fetch current register extracts with full entity data: name, legal form, NIP, REGON, address, share capital, representation rules, board composition, commercial proxies, primary PKD code, status, and court.
Fetch full extracts including entry history: past changes, removals, and previous board compositions.
Fetch a quick board-only summary: management board, representation rules, and commercial proxies (prokurenci).
Look up by KRS number (1–10 digits, automatically zero-padded) in either the entrepreneurs register (P) or associations register (S).
Get citations with a Ministry of Justice search URL and key entity metadata for direct display in legal AI clients.
mcp-krs
Installation (one command)
Published on npm + MCP Registry (io.github.matematicsolutions/mcp-krs). Run without cloning:
npx -y @matematicsolutions/mcp-krsMCP client configuration (stdio):
{ "mcpServers": { "mcp-krs": { "command": "npx", "args": ["-y", "@matematicsolutions/mcp-krs"] } } }(Building from source - below.)
MCP server for the Krajowy Rejestr Sadowy / KRS (National Court Register) via the official, free
Ministerstwo Sprawiedliwosci (Ministry of Justice) API (api-krs.ms.gov.pl/api/krs).
Related MCP server: KRS Poland MCP Server
Why
A law firm asks about a counterparty -> Patron returns full register data: name, legal form, NIP, REGON, address, share capital, board composition, representation rules, commercial proxies (prokurenci), primary PKD code, status (active / liquidation / bankruptcy). Plus a URL to the Ministry of Justice search tool.
Critical for contract work: the question "can this person sign this contract
for company X on their own" reduces to two moves -
krs__get_board with the KRS number, then comparing the representation rules
against the signing party.
Tools
get_entity(krs, rejestr?)- current extract (full entity data).get_entity_full(krs, rejestr?)- full extract (with entry history).get_board(krs, rejestr?)- short form: representation only (rules + composition) + commercial proxies (prokurenci).
Parameters:
krs- 1-10 digits, leading zeros padded automatically (28860->0000028860).rejestr-P(entrepreneurs register, default) orS(associations register).
Every response contains structuredContent.citations with fields:
title, url (Ministry of Justice search), krs, nazwa, nip, regon,
forma_prawna, status, miejscowosc, sad_rejestrowy, rejestr.
Patron reads the field automatically and renders it in the UI panel as a "Krajowy Rejestr Sadowy (KRS - MS)" section.
Stack
Node 18+ (built-in
fetch)@modelcontextprotocol/sdkStdio transport
Throttle 500 ms (2 req/s) - the Ministry of Justice API is tolerant, but be polite
Build + run
npm install
npm run build
node dist/index.jsWiring into Patron
In patron/backend/mcp-servers.json:
{
"name": "krs",
"transport": "stdio",
"command": "node",
"args": ["C:/Users/<YOUR-USER>/mcp-krs/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":"get_board","arguments":{"krs":"28860"}}}' \
| node dist/index.jsShould return ORLEN SA, representation rules "two board members acting jointly", board composition, commercial proxies (prokurenci) + URL.
GDPR notes
The Ministry of Justice API returns masked personal data of board members in its responses (asterisks in surnames after the 2023 amendment). Patron passes this through raw and does not unmask it. For full surnames, the law-firm user opens the Ministry of Justice link in a browser after logging in.
Lineage
API contract from the official documentation MS api-krs.ms.gov.pl. TypeScript implementation from scratch.
License
MIT.
Part of MateMatic
This connector queries its source live. It is one of the Polish and EU source connectors bundled in PATRON and works with any MCP client.
Poland, one server for all sources: prawo-pl-mcp · each source on its own: mcp-saos · mcp-nsa · mcp-isap · mcp-krs (this repo) · mcp-eureka · kio-orzeczenia-mcp
European Union: mcp-eu-sparql (live) · mcp-eu-compliance (offline corpus)
A prepared corpus of Polish and EU law with a citation graph: Repertorium
mcp-saos, mcp-nsa, mcp-isap, mcp-krs and mcp-eu-sparql share one 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.
Available Tools
3 toolsget_boardARead-onlyIdempotent
SKROCONA wersja: tylko sklad zarzadu + sposob reprezentacji + prokurenci. Szybciej niz get_entity gdy potrzebujesz tylko 'kto reprezentuje X'. Bazuje na odpisie aktualnym.
Inputs: krs (required), rejestr.
get_entityARead-onlyIdempotent
Pobiera ODPIS AKTUALNY z Krajowego Rejestru Sadowego po numerze KRS. Zwraca pelne dane podmiotu: nazwa, forma prawna, NIP, REGON, adres, kapital zakladowy, reprezentacja (zarzad + sposob reprezentacji), prokurenci, glowny PKD, status (aktywny/likwidacja/upadlosc) + URL do wyszukiwarki KRS. Numer KRS uzupelnij zerami wiodacymi (lub podaj krotszy - zostanie wyrównany do 10 cyfr).
Inputs: krs (required), rejestr.
get_entity_fullARead-onlyIdempotent
Pobiera ODPIS PELNY z KRS (z historia wpisow - kazda zmiana, kazde wykreslenie, wszystkie poprzednie sklady zarzadu). Wieksza odpowiedz, uzywaj kiedy potrzebujesz historii zmian, nie tylko stanu aktualnego.
Inputs: krs (required), rejestr.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct use case: get_board for quick board composition summary, get_entity for current full entity data, and get_entity_full for historical records. There is no ambiguity or overlap between them.
All tool names follow a consistent get_ prefix pattern with snake_case (get_board, get_entity, get_entity_full), making the naming predictable and easy to understand.
Three tools is an appropriate number for a specialized KRS data retrieval server. Each tool serves a distinct purpose covering the main query needs without being excessive or too sparse.
The tools cover the main read operations for KRS entities (current data, full history, board summary). However, a search tool by name or NIP is missing, which would be a natural complement for a complete data retrieval surface.
Maintenance
Related MCP Connectors
Polish company records from the official KRS register API, with alerts on new registry entries.
Polish company registry: 4.4M firms, KRS/REGON data, VAT white list checks, financial statements
Polish company data from KRS: profiles, historical connections, financials, state aid.
Polish companies and people: KRS, CEIDG, financials, boards, VAT, sanctions. Free, no API key.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server providing AI assistants access to Polish public registries (KRS, CEIDG) and statistical data (GUS BDL) for querying companies, sole proprietorships, and regional statistics.7MIT
- AlicenseCqualityBmaintenanceEnables querying the Polish National Court Register (KRS) to retrieve current and historical entity data.2114 npm4MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for verifying Polish business entities from the National Court Register (KRS) and VAT White List. Allows querying by KRS, NIP, or REGON to retrieve official company data including name, address, board, and capital.Apache 2.0
- AlicenseAqualityCmaintenanceMCP server for Polish company registries that enables looking up companies by NIP or KRS using public government APIs with no authentication required.2MIT