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.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

regon_mcp-0.2.0.tar.gz (82.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

regon_mcp-0.2.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file regon_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: regon_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 82.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for regon_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 da27e4b1624f1561bdb2964b0237b1096f9d0d280d622a5be071ebeca7f48342
MD5 33734cb0da0a0779c5840fb9509879e7
BLAKE2b-256 8fae45197a7c7774b6a003942c74b886b68e1835f47697b424c11945effaf7e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for regon_mcp-0.2.0.tar.gz:

Publisher: publish.yml on SmartMobileHouse/regon-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file regon_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: regon_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for regon_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fbc76234fecd66fb7b0e38ba38cfc09cfd4f42e02570f0f6c30412a6c34683a
MD5 70e7b4273b7884778b9e5283b22551b5
BLAKE2b-256 1e5e2c456c123c73e930c33fa57a9bb3f24edfa867e69ce66e02475bb8f1123e

See more details on using hashes here.

Provenance

The following attestation bundles were made for regon_mcp-0.2.0-py3-none-any.whl:

Publisher: publish.yml on SmartMobileHouse/regon-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page