KR

KRS Poland MCP Server — National Court Register Access

Search Polish KRS records via the MCP server to verify businesses, foundations, and other legal entities quickly and securely.

Quick Install
npx -y @pkolawa/krs-poland-mcp-server

Overview

KRS Poland MCP Server provides a lightweight HTTP/MCP-compatible backend for searching and retrieving records from Poland’s National Court Register (Krajowy Rejestr Sądowy, KRS). It is designed to be used as a tool for large language models (LLMs) or other services that need reliable, programmatic access to company, foundation, or other legal-entity data from the Polish register.

By exposing KRS data through a Model Context Protocol (MCP) interface, the server makes it straightforward to register the data source as a tool for LLMs, add context to prompts, or integrate KRS lookups into verification, KYC, due-diligence, or CRM workflows. The project is available on GitHub: https://github.com/pkolawa/krs-poland-mcp-server

Features

  • MCP-compatible interface to expose KRS records to LLMs and tools
  • Full-text and structured search across KRS entries (names, KRS numbers, tax IDs)
  • Lookup by unique identifiers (KRS number, NIP, REGON)
  • JSON responses suitable for programmatic processing
  • Docker and configuration-driven deployment for local or server use
  • Lightweight: intended to be easy to run alongside other tooling

Installation / Configuration

Clone the repository and run with Docker (recommended):

git clone https://github.com/pkolawa/krs-poland-mcp-server.git
cd krs-poland-mcp-server

# Build a local Docker image
docker build -t krs-mcp-server .

# Run the container, mapping port and mounting data directory
docker run -d --name krs-mcp \
  -p 5003:5003 \
  -v /path/to/krs-data:/app/data \
  -e PORT=5003 \
  -e KRS_DATA_PATH=/app/data \
  krs-mcp-server

Example docker-compose.yml:

version: "3.8"
services:
  krs-mcp:
    image: krs-mcp-server:latest
    ports:
      - "5003:5003"
    volumes:
      - ./data:/app/data
    environment:
      - PORT=5003
      - KRS_DATA_PATH=/app/data
      - API_KEY=replace-with-secure-key

Environment variables commonly used:

  • PORT — HTTP bind port (default 5003)
  • KRS_DATA_PATH — path to local KRS data files or index
  • API_KEY — optional API key to protect endpoints
  • LOG_LEVEL — verbosity for logs (info/debug)

If the project provides a build step (Node/Python), follow the repository README to install dependencies and run locally:

# (example for Node-based server)
npm install
npm run build
npm start

Available Resources

  • GitHub repository: https://github.com/pkolawa/krs-poland-mcp-server
  • Data directory: mount your official KRS extracts or pre-built index into KRS_DATA_PATH
  • API documentation: check the repo’s README or /docs route (if provided) for endpoint details
  • MCP discovery endpoint: the server exposes the MCP-compatible discovery manifest so LLMs can register it as a tool (look for a well-known or manifest endpoint in the repo)

Use Cases

  1. Verify a company before signing a contract

    • Query by company name or KRS number to obtain registered address, share capital, board members, and registration status.
    • Example (curl search by name):
      curl -G "http://localhost:5003/search" --data-urlencode "q=Example Sp. z o.o."
      
    • Example (lookup by KRS number):
      curl "http://localhost:5003/lookup/0000123456"
      
  2. Enrich CRM or contact data

    • Match incoming leads to official KRS entries (NIP or REGON) and augment records with legal form and registration data for segmentation and reporting.
  3. KYC and due diligence automation

    • Integrate KRS lookups into onboarding pipelines to automatically fetch current registration status and key people for risk checks.
  4. Legal research and document generation

    • Use MCP integration with an LLM to fetch structured KRS facts and include them when drafting notices, contracts, or filings.

Example Response (JSON)

A typical lookup result returned as JSON might look like:

{
  "krs": "0000123456",
  "name": "Example Spółka z ograniczoną odpowiedzialnością",
  "nip": "1234567890",
  "regon": "012345678",
  "address": "ul. Przykładowa 1, 00-000 Warszawa",
  "status": "active",
  "registered": "2010-05-03",
  "representatives": [
    { "name": "Jan Kowalski", "role": "President" }
  ]
}

Notes:

  • Exact endpoints and field names depend on the server version; consult the repository docs for the precise API contract.
  • Protect the server behind authentication or network controls if exposing production KRS data.

If you need more detailed examples (client libraries, MCP manifest format, or sample LLM tool registration), see the repository and its documentation for the latest information and compatibility notes.