zerez-mcp
by the78mole
README.md
# zerez-mcp
[](https://github.com/the78mole/zerez-mcp/actions/workflows/ci.yml)
[](https://github.com/the78mole/zerez-mcp/actions/workflows/pypi.yml)
[](https://pypi.org/project/zerez-client/)
[](https://pypi.org/project/zerez-client/)
[](LICENSE)
[](https://scorecard.dev/viewer/?uri=github.com/the78mole/zerez-mcp)
[](https://renovatebot.com)
[](https://github.com/astral-sh/uv)
[](https://github.com/astral-sh/ruff)
[](https://mypy-lang.org/)
A typed Python client and command line tool for **ZEREZ**, the German central register of unit
and component certificates (*Zentrales Register für Einheiten- und Komponentenzertifikate*,
<https://www.zerez.net/units-and-certificates>). Look up a unit by its ZEREZ ID and get its
certificate, grid codes and technical data (power, currents, short-circuit and flicker values),
or search the register by manufacturer, model, category, energy source or power.
The same calls are available as an **MCP server** for assistants such as Claude (stdio, see below).
- **Search units** like the table on zerez.net (`search_units`), with text, category, energy
source, norm, status and power filters, or a raw GraphQL filter.
- **Unit details** by ZEREZ ID or UUID (`get_unit`): overview plus all publicly visible technical
fields, discovered by schema introspection.
- **Certificates** by certificate code, unit ZEREZ ID, certificate number or UUID
(`get_certificates`), with norms, software versions, documents, linked units and the revision
chain (`get_certificate_chain`).
- **Download certificate documents** (PDF) with unique file names (`download_certificate_files`).
- **Explore the backend**: raw GraphQL queries and type introspection.
> This project is not affiliated with the operator of ZEREZ. It uses the same public, anonymous
> API as the zerez.net website. Please query it considerately.
## Installation
```bash
uv tool install zerez-client # the `zerez` command
uvx --from zerez-client zerez … # or run it without installing
uv add zerez-client # as a library in a uv project
```
The PyPI package is `zerez-client`, the Python module `zerez`, the command `zerez`.
## Command line
The CLI output is German, like the labels on zerez.net.
```bash
zerez search Multiplus 5000 # keywords, all must match
zerez search -m SMA --category INVERTER --norm 4105 --take 50
zerez search --energy PV_WITH_STORAGE --min-power 3 --max-power 10
zerez unit ZE-KAXY-Z16S-0001 # overview and technical data
zerez unit ZE-KAXY-Z16S-0001 --all --json
zerez cert ZE-KAXY-Z16S --chain # certificate with revision chain
zerez download ZE-KAXY-Z16S -o ./pdf # certificate documents (PDF)
zerez norms
zerez schema UnitOverviewFilterInput # explore the schema
zerez query '{ unitOverview(take: 1) { totalCount } }' # raw GraphQL
```
`--json` works with every command.
## Library
```python
from zerez import ZerezClient
with ZerezClient() as z:
page = z.search_units(manufacturer="Deye", take=10)
unit = z.get_unit("ZE-KAXY-Z16S-0001") # {"overview": ..., "technical": ...}
certs = z.get_certificates("ZE-KAXY-Z16S")
```
## MCP server
The package contains an [MCP](https://modelcontextprotocol.io) server, so that assistants such as
Claude can query the register. It runs over **stdio** and needs the optional dependency `mcp`:
```bash
uv tool install 'zerez-client[mcp]'
zerez mcp # or: zerez-mcp
```
Claude Code:
```bash
claude mcp add zerez -- uvx --from 'zerez-client[mcp]' zerez-mcp
```
Claude Desktop (`claude_desktop_config.json`):
```json
{
"mcpServers": {
"zerez": {
"command": "uvx",
"args": ["--from", "zerez-client[mcp]", "zerez-mcp"]
}
}
}
```
All tools are read-only:
| Tool | Purpose |
| --- | --- |
| `search_units` | search units by keywords (AND), manufacturer, model, category, energy source, grid code, status, power |
| `get_unit` | overview and technical data of a unit by ZEREZ ID or UUID |
| `get_certificates` | certificates with grid codes, software versions, documents and linked units |
| `get_certificate_chain` | revision and extension chain of a certificate |
| `get_document_links` | signed, short-lived download links of the certificate PDFs |
| `list_norms` | grid codes known to the register |
Raw GraphQL and schema introspection are not exposed as tools. An HTTP transport is planned.
## The ZEREZ backend
zerez.net is a single-page app on top of a **HotChocolate GraphQL gateway**:
```
POST https://app-zerez-weeu-gatewaysvc-prod-01.azurewebsites.net/graphql/
Content-Type: application/json
```
- Read queries work **without authentication**, and introspection is enabled.
- The overview table uses `unitOverview(skip, take, where, order)` (type `UnitOverview`).
- `unit(id: UUID!)` returns the technical data of a unit (type `Unit`, about 90 fields).
- `certificates(where, ...)` returns certificates with norms, software versions, documents and
units. Selecting `certificateBridgeUnits { unit }` fails unless `unitId` is selected as well.
- `certificateFileStorageLocation` is a **signed, short-lived** path `api/PublicDownload/...`
relative to the gateway that returns the PDF.
- Matrix and inertia parameters are released per role and are `null` for anonymous clients.
- Missing dates come back as `1900-01-01...`; the client turns them into `None`.
- Power values are in kW.
### ZEREZ ID
| Format | Meaning |
| --- | --- |
| `ZE-XXXX-XXXX-0001` | unit (`unitCode`) |
| `ZE-XXXX-XXXX` | certificate (`certificateCode`); its units append `-0001`, `-0002`, ... |
The first group of four is the code of the certificate holder (`tenantCode`).
## Development
zerez-mcp uses [uv](https://docs.astral.sh/uv/), Ruff, mypy (strict) and pytest.
```bash
uv sync
uv run pytest # unit tests against a mocked backend
uv run pytest -m live # against the real ZEREZ backend
uv run pre-commit install # once, sets up the Git hook
uv run pre-commit run --all-files
```
See [CONTRIBUTING.md](CONTRIBUTING.md) for commit conventions.
## Releases
Every commit on `main` is released: the version is calculated from the Conventional Commit
message (`feat:` bumps the minor version, `!` the major version, everything else the patch
version), the commit must pass CI, then it is uploaded to PyPI with Trusted Publishing and
published as a [GitHub Release](https://github.com/the78mole/zerez-mcp/releases) with generated
notes. See [`pypi.yml`](.github/workflows/pypi.yml) and [CHANGELOG.md](CHANGELOG.md).
## License
zerez-mcp is licensed under the [MIT License](LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues