Mcp Krs

io.github.matematicsolutionsPublished by GitHub account matematicsolutionsv1.2.2Updated Oct 24, 2026

MCP server for the Polish KRS company registry via the official Ministry of Justice API.

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

Lets an assistant look up Polish KRS company registry data, including board composition and representation rules, via the Ministry of Justice API.

What you can do
Queries the official Polish National Court Register (KRS) through the Ministry of Justice API. Tools include get_entity for the current extract, get_entity_full for the full extract with entry history, and get_board for representation rules, board composition and commercial proxies. Responses include structured citation fields such as KRS number, name, NIP, REGON, legal form, status and registered court.
When to use it
Useful for legal, contract and due-diligence work where an assistant must check a Polish company's register data or determine whether a given person can sign for a company. Also suited to verifying counterparty details such as legal form, address, share capital and status.
Requirements
Runs locally as a Node.js process (Node 18 or later) started with npx from the npm package @matematicsolutions/mcp-krs over stdio. No accounts, API keys or environment variables are declared. Network access to the Ministry of Justice API is required.
Before you install
The server queries a live public registry and sends the requested KRS numbers to the Ministry of Justice API. Board member personal data is returned masked by the API; the server passes it through without unmasking. Requests are throttled to about two per second, so heavy use may be slow.

Installation

In SourceWeft

  1. Open Mcp Krs in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

mcp-krs

Installation (one command)

Published on npm + MCP Registry (io.github.matematicsolutions/mcp-krs). Run without cloning:

bash
npx -y @matematicsolutions/mcp-krs

MCP client configuration (stdio):

json
{ "mcpServers": { "mcp-krs": { "command": "npx", "args": ["-y", "@matematicsolutions/mcp-krs"] } } }

(Building from source - below.)

[MCP] [License: MIT] [Node]

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).

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) or S (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/sdk
  • Stdio transport
  • Throttle 500 ms (2 req/s) - the Ministry of Justice API is tolerant, but be polite

Build + run

bash
npm installnpm run buildnode dist/index.js

Wiring into Patron

In patron/backend/mcp-servers.json:

json
{  "name": "krs",  "transport": "stdio",  "command": "node",  "args": ["C:/Users/<YOUR-USER>/mcp-krs/dist/index.js"],  "enabled": true}

Smoke test

bash
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.js

Should 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.

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.

Source: README.md at commit ac5ee51

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

2
  1. v1.2.2LatestOct 13, 2026
  2. v1.1.1Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts