Repository avatar
Other Tools
v0.1.0
active

ares-mcp

io.github.iquest/ares-mcp

Read-only access to ARES, the Czech register of economic entities. No credentials.

Documentation

ares-gov-cz-mcp

A read-only MCP server for ARES, the Czech register of economic entities. It lets an AI assistant look up companies by IČO, search by name and other criteria, and read the source registers behind ARES. It needs no credentials.

It targets ARES REST API version 1.4 and covers all 26 operations of that API through 8 tools. Results keep ARES's own (Czech) field names.

Install and start

Requires uv. Run it from PyPI, with no checkout (uv downloads and caches it):

uvx ares-gov-cz-mcp    # serves MCP over stdio

To run the latest unreleased code from GitHub instead (this also needs git):

uvx --from git+https://github.com/iquest/ares-mcp ares-gov-cz-mcp

To work on the code, clone it (Python 3.10+):

git clone https://github.com/iquest/ares-mcp.git && cd ares-mcp
uv sync
uv run python -m ares_mcp

Connect an MCP client

Add this to the client's MCP configuration:

{
  "mcpServers": {
    "ares": {
      "command": "uvx",
      "args": ["ares-gov-cz-mcp"]
    }
  }
}

For Claude Code: claude mcp add ares -- uvx ares-gov-cz-mcp

To pin a version, use "ares-gov-cz-mcp==0.1.0". To update, run uvx --refresh ares-gov-cz-mcp. To run a local checkout instead, use uv --directory /absolute/path/to/ares-mcp run python -m ares_mcp as the command.

Tools

All tools are read-only.

ToolWhat it doesExample call
get_entityBasic record of one entity by IČO{"ico": "27082440"}
search_entitiesSearch entities by name, address, legal form, ... (paged){"filter": {"obchodniJmeno": "Seznam"}, "count": 5}
get_register_recordRecord of one entity in one source register{"register": "vr", "ico": "27082440"}
search_registerSearch one source register (paged){"register": "vr", "filter": {"ico": ["27082440"]}}
search_code_listsFind valid codes for filters (paged){"filter": {"kodCiselniku": "PravniForma"}}
search_addressesResolve a partial address to standardised candidates{"filter": {"textovaAdresa": "Praha, Hlavní 1"}}
search_notification_batchesList notification batches (paged){"filter": {"datovyZdroj": "vr"}, "count": 10}
get_notification_batchFetch one notification batch{"data_source": "vr", "batch_number": "7"}

Registers: vr, res, rzp, nrpzs, rpsh, rcns, szr, rs, ros, ceu.

  • An IČO may contain spaces or lack leading zeros: "123456" is looked up as 00123456.
  • Searches return total, start, count, items and next_start. Pass next_start as start to get the next page. next_start is null on the last page. ARES does not page the notification batch list, so the server pages it locally and total is its length.
  • count defaults to 20 and is at most 100.
  • ARES refuses any search that matches more than 1000 results. Narrow the filter.
  • search_code_lists needs at least one filter field. search_addresses sends typStandardizaceAdresy, default VYHOVUJICI_ADRESY (the other value is UPLNA_STANDARDIZACE).

Errors

A failed call returns an MCP tool error whose text contains one tag:

TagMeaning
[not_found]ARES has no such record
[invalid_input]Bad input (IČO, register, paging) or ARES rejected the request
[registry_unavailable]Timeout, connection error, rate limit or ARES server error. Retry later
[registry_refused]ARES refused the request (HTTP 401 or 403)

The SDK puts the tool name in front of the tag. Raw ARES error payloads are never forwarded. If a typed field gets the wrong JSON type (for example start as text), the SDK rejects the call before the tool runs and the error has no tag.

Configuration

Set these environment variables in the client's server entry (all optional):

VariableDefaultMeaning
ARES_BASE_URLhttps://ares.gov.cz/ekonomicke-subjekty-v-be/restARES API base URL
ARES_TIMEOUT_SECONDS10Total timeout per request
ARES_MAX_CONCURRENCY5Most requests in flight at once
ARES_DEFAULT_COUNT20Page size when count is omitted
ARES_MAX_COUNT100Largest accepted count

GET requests are retried once on a connection error or HTTP 502/503. POST requests are never retried.

Develop

uv run ruff check .
uv run pytest tests/unit tests/contract      # no network
uv run pytest -m live                        # real ARES; see below

Live tests need tests/fixtures/expected-entities.json to hold at least 20 IČOs with their name and legal form, copied by hand from the public ARES website. Do not generate them from the API.

tests/fixtures/ares-openapi.json is a snapshot of the ARES OpenAPI document. A test checks that every operation in it is reachable through one of the 8 tools.

Release

Pushing a tag vX.Y.Z runs .github/workflows/release.yml. It checks that the tag, pyproject.toml and server.json carry the same version, runs ruff and the offline tests, builds, publishes to PyPI (trusted publishing), then publishes server.json to the MCP Registry (GitHub OIDC). To release, change the version in pyproject.toml and in both places in server.json, commit, then tag and push.

One-time setup:

  • On pypi.org, add a pending trusted publisher: project ares-gov-cz-mcp, owner iquest, repository ares-mcp, workflow release.yml, environment pypi.
  • In the GitHub repository settings, create an environment named pypi.
  • The <!-- mcp-name: ... --> line at the top of this file proves to the registry that the PyPI package belongs to io.github.iquest/ares-mcp. Keep it in sync with server.json.
PYPI
ares-gov-cz-mcp
Install Command
pip install ares-gov-cz-mcp