Skip to main content

regon-mcp

A Model Context Protocol server that gives AI assistants clean, typed access to the Polish REGON business register (GUS BIR1). Look up any Polish company by NIP, REGON, or KRS and get back structured data — name, address, legal form, activity codes — without touching the underlying SOAP API.

The official GUS BIR1 API is a WCF SOAP service with WS-Addressing, MTOM multipart responses, an HTTP-header session token, and XML-nested-inside-XML result payloads. regon-mcp hides all of that behind a handful of simple tools.

Built and maintained by Smart Mobile House — secure AI implementation for enterprise.

Background and design notes: the regon-mcp write-up.

Tools

Tool Description
search_by_nip(nip) Look up an entity by 10-digit NIP (tax id).
search_by_regon(regon) Look up an entity by 9- or 14-digit REGON.
search_by_krs(krs) Look up an entity by 10-digit KRS (court register).
search_bulk(identifiers, id_type) Look up up to 20 entities of one type at once.
get_full_report(regon, report_type) Fetch a detailed report for one entity.
list_report_types() List valid report names, with guidance on which to use.

Every response includes a source block that names the register (REGON / GUS), the environment, and a UTC retrieved_at timestamp — so downstream use can cite the data correctly, as GUS requires.

Quick start

No install needed — run it straight from the repo with uv:

uvx --from git+https://github.com/SmartMobileHouse/regon-mcp regon-mcp

By default it uses the public test key against the anonymized GUS test database, so it runs with zero setup. For live data, request a free USER_KEY from regon_bir@stat.gov.pl and set the environment variables below.

Use it in Claude Desktop / Claude Code

Add to your MCP config (e.g. claude_desktop_config.json or a project .mcp.json):

{
  "mcpServers": {
    "regon": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/SmartMobileHouse/regon-mcp", "regon-mcp"],
      "env": {
        "REGON_API_KEY": "your-user-key",
        "REGON_ENV": "prod"
      }
    }
  }
}

During development, point it at a local checkout instead:

{
  "mcpServers": {
    "regon": {
      "command": "uvx",
      "args": ["--from", "/absolute/path/to/regon-mcp", "regon-mcp"],
      "env": { "REGON_API_KEY": "abcde12345abcde12345" }
    }
  }
}

Configuration

Variable Default Description
REGON_API_KEY public test key Your GUS BIR USER_KEY.
REGON_ENV test test (anonymized data) or prod (live data).
REGON_TIMEOUT 30 HTTP timeout in seconds.

Use REGON_ENV=prod only with a real USER_KEY; the test key works only against the test environment.

Development

git clone https://github.com/SmartMobileHouse/regon-mcp
cd regon-mcp
uv sync                 # create the venv and install deps
uv run pytest           # offline tests: validation, parsing, mocked client,
                        # and an in-memory MCP tool-discovery smoke test.
                        # (network tests are deselected by default)
uv run regon-mcp        # run the server over stdio

# Live tests against the GUS endpoint (deselected unless opted in):
REGON_RUN_NETWORK=1 uv run pytest -m network            # session lifecycle (test env)
REGON_PROD_KEY=<your-key> uv run pytest -m network      # positive-control on live data

The client is a small hand-rolled SOAP layer over httpx (see src/regon_mcp/client.py) — no heavyweight SOAP stack, no runtime WSDL fetch.

Notes & limitations

  • The GUS test database is anonymized and returns little or no entity data. Meaningful results require a production USER_KEY with REGON_ENV=prod.
  • Respect the GUS terms of use and rate limits. This project is an independent open-source client and is not affiliated with or endorsed by GUS.
  • Data belongs to GUS. When you present it, cite REGON / GUS with the retrieval date (surfaced in every response's source block).

License

MIT © Smart Mobile House

Metadata

Release files for regon-mcp 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for regon-mcp 0.2.3
File Size Uploaded Provenance Actions
regon_mcp-0.2.3.tar.gz 84.0 kB With provenance Details for regon_mcp-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for regon-mcp 0.2.3
File Interpreter ABI Platform Actions
regon_mcp-0.2.3-py3-none-any.whl Python 3 none any Details for regon_mcp-0.2.3-py3-none-any.whl

Total release size: 99.9 kB

Release files / regon_mcp-0.2.3.tar.gz

Download URL regon_mcp-0.2.3.tar.gz
Size 84.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9ed0cb1a533a09ffe44dc5315bd3c730a033ef1a86f72697758b3ad1c0ff1f6d
BLAKE2b-256 checksum
How to use checksums
d31317b280dfcf62110891be779e35ef62c5eaae93b203991a3475e1150c564e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / regon_mcp-0.2.3-py3-none-any.whl

Download URL regon_mcp-0.2.3-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38164d135e581dbf90d694cb1bc5190deea3c7330bb74087f9ab9e90a3ea9be3
BLAKE2b-256 checksum
How to use checksums
bd396ba8830950a656768ea247fcae1cb8b8104d623ee0f79cd1c89f5cc6cdcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for regon-mcp 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for regon_mcp-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page