Schema-aware, read-only CLI and MCP access to European climate data in EEA Discodata
Project description
eea-climate-data-mcp
Schema-aware, read-only access to European climate data published through the public Discodata service of the European Environment Agency (EEA).
This MVP is a conditional go. It supports the verified GHG Inventory and Policies and Measures databases. A current projections database was not visible in Discodata metadata during the 2026-07-19 spike, so WEM/WAM comparison is not claimed.
[!IMPORTANT] This is an independent, unofficial client. The EEA and reporting countries remain the authoritative sources.
[!WARNING] This repository is an experimental proof of concept, not a production service. Interfaces, upstream schemas, and the undocumented execution allowlist may change. See
TODO.md.
Install
Install the CLI and MCP server as isolated commands:
uv tool install eea-climate-data-mcp
eu-climate --help
Development checkout:
uv sync --extra test
uv run eu-climate databases list
uv run eea-climate-data-mcp
The MCP command uses stdio transport. No credentials are required.
Claude Code:
claude mcp add --scope user eu-climate -- uvx eea-climate-data-mcp
Codex CLI:
codex mcp add eu-climate -- uvx eea-climate-data-mcp
CLI examples
uv run eu-climate series emissions --country DE --sector total \
--accounting-scope without_lulucf --start-year 1990
uv run eu-climate sectors search transport
uv run eu-climate series emissions --country HU --sector 1.A.3 --start-year 1990
uv run eu-climate measures list --country Hungary --status Implemented --sector Transport
uv run eu-climate measures get --country Hungary --measure-id 4
uv run eu-climate tables describe \
--database GHG_Inventory --version latest --table ghg_value
uv run eu-climate values distinct \
--database GHGPAMS --version latest \
--table annexIX_flat_view_PaMs_elasticsearch --column Country
uv run eu-climate sql validate --query-file examples/country_inventory_counts.sql
uv run eu-climate sql run --query-file examples/country_inventory_counts.sql \
--max-rows 100 --page-size 100
All execution paths use the same service and SQL guardrails. Queries must be one
parsed SELECT, fully qualify every table as [database].[version].[table], use
allowlisted databases and versions, and remain within the requested bound. DDL, DML,
CTEs, SELECT INTO, system schemas, and unaliased computed columns are rejected.
Verified source model
| Domain | Database | Country field | Live coverage | Status |
|---|---|---|---|---|
| National GHG inventory | GHG_Inventory.latest |
country_code |
31 countries plus EUA |
reported_actual |
| Policies and Measures | GHGPAMS.latest |
Country |
30 countries | reported_policy_estimate |
| GHG projections | Not found in live metadata | — | — | Outside MVP |
Country identifiers differ between datasets: inventory uses codes such as DE, FR,
and HU, while Policies and Measures uses labels such as Germany, France, and
Hungary. Use metadata discovery or values distinct before constructing cross-domain
queries. EUA is an aggregate, not a country.
latest is mutable. Use a concrete version or revision for reproducible analysis when
the upstream exposes one. The latest inventory year is a published reporting year, not
a real-time emissions figure.
The get_emissions_series MCP tool and series emissions CLI command resolve the
appropriate inventory variable and sort results client-side because upstream rejects
ORDER BY on some ghg_value queries. sector accepts total or an IPCC sector
code at any depth (1, 1.A, 1.A.3); discover codes with
search_emission_sectors/describe_emission_sector (sectors search|describe).
Parent sectors already include their children — never sum a sector with its parent
or children.
The list_measures/get_measure tools (measures list|get CLI) expose the Policies
and Measures database as a searchable descriptive catalogue. Structured ex-ante and
ex-post effect values are sparse (several countries, including Hungary, report none),
so get_measure returns explicit quantification semantics — reported vs
not_reported — and missing values must not be read as zero impact. The catalogue is
deliberately not a ranking or impact-estimation source. Every result includes a query hash, retrieval
time, table references, reporting status, source links, and warnings.
Machine-readable output goes to stdout and diagnostics to stderr. Exit codes:
| Code | Meaning |
|---|---|
0 |
Success |
2 |
Invalid or unsafe query/argument |
3 |
Upstream unavailable or invalid response |
4 |
Metadata object not found |
docs/RECIPES.md contains six reproducible investigation recipes (trend, sectoral change, road-transport contribution, PaMs reporting completeness, sector quantification gaps, trend × measure stock) with exact commands, formulas, query hashes, and caveats.
See docs/SPIKE-REVIEW.md for evidence, limitations, and next scope. The original Hungary-focused brief is retained as historical context in docs/SPIKE-hun-climate-policy-mcp.md.
Development
uv run pytest
uv run ruff format --check src tests
uv run ruff check src tests
uv run mypy src tests
uv run python scripts/live_smoke.py
The live smoke suite is intentionally small and read-only.
Release
Maintainers release from a clean, synchronized main branch:
scripts/release patch
The helper bumps the version, commits and pushes it, then creates a GitHub Release. The release workflow builds the distributions and publishes them to PyPI through trusted publishing.
Configuration
| Variable | Default | Purpose |
|---|---|---|
EEA_CLIMATE_DISCODATA_URL |
https://discodata.eea.europa.eu |
Upstream service |
EEA_CLIMATE_TIMEOUT_SECONDS |
30 |
Request timeout, capped at 120 seconds |
EEA_CLIMATE_MAX_PAGE_SIZE |
1000 |
Local page-size ceiling |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eea_climate_data_mcp-0.1.0.tar.gz.
File metadata
- Download URL: eea_climate_data_mcp-0.1.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3acd5084a1f9bd93704e72943196c41529030b47eb6b844a66fd99698175480f
|
|
| MD5 |
57cac619d24a72dd6f0cf9a0f027c59c
|
|
| BLAKE2b-256 |
055e30eab8480ef319e74d5834bed8de5feacbf688164f88324521b6331fd315
|
Provenance
The following attestation bundles were made for eea_climate_data_mcp-0.1.0.tar.gz:
Publisher:
release.yml on kalcifield/eea-climate-data-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eea_climate_data_mcp-0.1.0.tar.gz -
Subject digest:
3acd5084a1f9bd93704e72943196c41529030b47eb6b844a66fd99698175480f - Sigstore transparency entry: 2203142259
- Sigstore integration time:
-
Permalink:
kalcifield/eea-climate-data-mcp@a9a144e6df3984597ba5cc9c84980ee52cfa9203 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kalcifield
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9a144e6df3984597ba5cc9c84980ee52cfa9203 -
Trigger Event:
release
-
Statement type:
File details
Details for the file eea_climate_data_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: eea_climate_data_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f71da44582af6b83ac9e6233dd57c31d422c1a3528b79fab2a6c9a6cf202ee1
|
|
| MD5 |
6b3f64a63f74bd518a9eb0ad3ddf1ff1
|
|
| BLAKE2b-256 |
6e33f65ac7f3842b118212dcd8ef64a624a198f06631d3c64d2882edbf006ba6
|
Provenance
The following attestation bundles were made for eea_climate_data_mcp-0.1.0-py3-none-any.whl:
Publisher:
release.yml on kalcifield/eea-climate-data-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eea_climate_data_mcp-0.1.0-py3-none-any.whl -
Subject digest:
4f71da44582af6b83ac9e6233dd57c31d422c1a3528b79fab2a6c9a6cf202ee1 - Sigstore transparency entry: 2203142307
- Sigstore integration time:
-
Permalink:
kalcifield/eea-climate-data-mcp@a9a144e6df3984597ba5cc9c84980ee52cfa9203 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kalcifield
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9a144e6df3984597ba5cc9c84980ee52cfa9203 -
Trigger Event:
release
-
Statement type: