npm @matematicsolutions/mcp-krsstdioMITupdated 1mo ago
Published on npm + MCP Registry (io.github.matematicsolutions/mcp-krs). Run without cloning:
Was kannst du mit mcp krs machen?
mcp-krs
Installation (one command)
Published on npm + MCP Registry (io.github.matematicsolutions/mcp-krs). Run without cloning:
npx -y @matematicsolutions/mcp-krs
MCP 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).
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/sdk- Stdio 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.js
Wiring 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.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 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-krs (this repo) - Polish company registry (official MS API)
- mcp-saos - common courts, SN, TK, KIO
- mcp-nsa - NSA + 16 WSA administrative courts
- mcp-isap - Polish legislation (Dz.U. + M.P.)
- 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.
Installation
mcp krs zu deinem Client hinzufügen. Wähl den, den du nutzt.
claude mcp add mcp-krs -- npx -y @matematicsolutions/mcp-krscodex mcp add mcp-krs -- npx -y @matematicsolutions/mcp-krsamp mcp add mcp-krs -- npx -y @matematicsolutions/mcp-krs{
"mcpServers": {
"mcp-krs": {
"command": "npx",
"args": [
"-y",
"@matematicsolutions/mcp-krs"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-krs": {
"command": "npx",
"args": [
"-y",
"@matematicsolutions/mcp-krs"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp-krs","command":"npx","args":["-y","@matematicsolutions/mcp-krs"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp-krs": {
"command": "npx",
"args": [
"-y",
"@matematicsolutions/mcp-krs"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-krs": {
"command": "npx",
"args": [
"-y",
"@matematicsolutions/mcp-krs"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-krs": {
"command": "npx",
"args": [
"-y",
"@matematicsolutions/mcp-krs"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-krs": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@matematicsolutions/mcp-krs"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-krs": {
"command": {
"path": "npx",
"args": [
"-y",
"@matematicsolutions/mcp-krs"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @matematicsolutions/mcp-krsRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Unvollständig
- Dokumentation21/25
- Pflege19/25
- Vertrauen16/20
- Funktionsumfang0/15
- Installation12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 28 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Versionsverlauf
| Versionen | Veröffentlicht |
|---|---|
| 1.1.1Aktuell | 25. Juni 2026 |