mcp-dpe-fr
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-dpe-fr Which départements have the highest share of F-G rated homes?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-dpe-fr
A read-only Model Context Protocol server over the French DPE (Diagnostic de Performance Énergétique) open data published by ADEME: 16 million energy diagnostics of existing dwellings issued since July 2021. It lets an assistant answer questions such as "which départements have the most F-G rated homes?" with numbers it can cite.
6 task-oriented tools, all read-only, aggregates only.
No API key, no account, no database: it queries the public ADEME API, which aggregates server-side.
stdio by default, streamable HTTP optional.
Offline test suite and a 19-question evaluation set with independently computed answers.
Install
One command, nothing to clone (needs uv):
uvx mcp-dpe-frUntil the package is on PyPI, run it from the repository:
uvx --from git+https://github.com/julianorg-alt/mcp-dpe-fr mcp-dpe-frClaude Code
claude mcp add dpe-fr -- uvx mcp-dpe-frClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"dpe-fr": { "command": "uvx", "args": ["mcp-dpe-fr"] }
}
}HTTP
uvx mcp-dpe-fr --transport streamable-http --port 8000 # endpoint: http://127.0.0.1:8000/mcpIt binds to localhost and has no authentication. The data is public, but put it behind your own reverse proxy with authentication and a request quota before exposing it.
Related MCP server: data-iledefrance
Tools
Tool | Answers |
| INSEE code of a commune from its name, with its number of DPE. |
| Count and share per label A to G, share of A-B and of F-G ("passoires thermiques"). |
| Mean, P10, median, P90 of primary energy (kWh/m²/yr), greenhouse gases (kg CO2e/m²/yr) or living area. |
| Rank départements, régions or communes by F-G share, A-B share or mean primary energy. |
| Main energy source (electricity, gas, oil, wood, district heating...). |
| Number of DPE and label mix per year or month. |
The five statistical tools share the same optional filters: one geographic scope (department,
region, commune_insee or postal_code), building_type, construction_period,
construction_year_min/max, climate_zone, dpe_date_from/to. Every response ends with a source
block (dataset, licence, latest DPE date) for the model to cite.
Examples
Which départements have the highest share of F-G homes? →
dpe_rank_territories
[{"rank": 1, "code": "23", "name": "Creuse", "dwellings": 23112, "value": 32.7},
{"rank": 2, "code": "15", "name": "Cantal", "dwellings": 24910, "value": 29.4},
{"rank": 3, "code": "48", "name": "Lozère", "dwellings": 11099, "value": 28.3}]What share of homes in Finistère heat with oil? →
dpe_heating_energy_mix(department: "29"): 9.3 %.
Has the share of F-G diagnoses fallen in Paris since 2021? →
dpe_trend(department: "75"): 30.4 % in 2021, 24.9 % in 2022, 18.4 % in 2023, 13.3 % in 2024.
Privacy by design
The DPE dataset contains postal addresses, building names and coordinates of individual dwellings. This server never requests those fields: it only calls aggregation endpoints and never the row endpoint. In addition:
inputs are enumerated or strictly patterned (INSEE codes, ISO dates, fixed lists); no free text reaches the upstream query;
a scope with fewer than 10 dwellings is refused, and any count under 10 is shown as
<10;commune names are the only text returned besides labels and energy types.
The data is already public; the point is that an assistant cannot be used to look up a given household's diagnosis through this server. A test checks that no recorded upstream call touches an address, coordinate or DPE-number field.
Limits
What the numbers mean. The dataset counts diagnoses, not homes: a dwelling can appear several times, and sales and rentals trigger diagnoses, so the sample is biased toward transactions. It is not a census of the housing stock.
dpe_trendshows the mix of diagnoses issued.Data quality. Values are declared by diagnosticians and contain outliers; prefer the median. A few commune names are misspelled in the source. Percentiles are approximate (computed by the upstream search engine): repeated calls can differ by about 1 %.
Paris is split by arrondissement (75101-75120); use
department: "75"for the city.Commune ranking covers the 200 communes with the most DPE in the department.
Rate limiting. The client sends at most 5 requests/s (burst 5, 4 in parallel), retries 429/5xx with backoff (honouring
Retry-After), and caches identical queries for 5 minutes. A typical tool call is 2 to 4 upstream requests, about 1 to 2 s. There is no per-user quota in HTTP mode.Errors are returned as MCP tool errors written for the model (what was wrong, what to do next); internal errors are logged on stderr and never forwarded.
Dataset: DPE Logements existants (depuis juillet 2021), existing dwellings only (not new-build, not tertiary buildings).
Development
uv sync
uv run pytest -q # 45 tests, offline, about 4 s
uv run python evals/run_eval.py --mode replay # evaluation on recorded responses (offline)
uv run python evals/run_eval.py --mode live # same questions against the real API
uv run python evals/run_eval.py --mode record # refresh cassette and expected valuesEvaluation set
evals/questions.json holds 19 questions in the style a user would ask, each tied to a tool call.
The reference answer is recomputed with raw HTTP calls that share no code with the tools
(counting rows, dividing, taking the argmax), so a bug in a tool cannot validate itself. Questions
cover counts, shares, medians and percentiles, rankings (département, région, commune), energy mix,
year filters, commune lookup, and one refusal (scope under 10 dwellings). Live run: 19/19 in 9 s.
Tolerance is 0 for counts and codes, 0.05 point for shares, 0.5 to 3.5 units for percentiles.
Tests
Unit tests (input validation, privacy suppression), client tests (retry, 429, 400, cache, rate
limit), MCP protocol tests through an in-memory client, and the whole evaluation replayed from
tests/cassettes/eval.json. CI runs them on Python 3.10, 3.12 and 3.13, plus gitleaks on the full
history and a weekly live evaluation to catch upstream changes.
Data licence
Data: ADEME, "DPE Logements existants (depuis juillet 2021)", published on
data.ademe.fr under the Licence Ouverte / Open
Licence version 2.0 (Etalab). Attribution is required: cite ADEME as the source and the date of
extraction. The recorded responses in tests/cassettes/ are aggregates derived from that data and
carry the same licence.
The code is MIT-licensed (see LICENSE). Not affiliated with ADEME.
Available Tools
6 toolsdpe_energy_statsARead-onlyIdempotent
Mean, 10th/50th/90th percentile of an energy, emissions or surface indicator for a scope. Use for "what is the median consumption of houses built before 1948 in Lozère?". Prefer the median: a few declared values are data-entry outliers.
Inputs: indicator (required), region, department, dpe_date_to, +8 more. Returns: object
dpe_find_communeARead-onlyIdempotent
Find the INSEE code of a French commune from its name, with how many DPE it has. Use this before any commune-level question. Paris is split into arrondissements (75101-75120); use department='75' for the whole city. Returns up to 10 matches ranked by number of DPE.
Inputs: name (required), department. Returns: object
dpe_heating_energy_mixARead-onlyIdempotent
Main energy source of dwellings (electricity, natural gas, heating oil, wood, district heating...) with counts and shares. Use for "how many homes still heat with oil in Finistère?".
Inputs: region, department, dpe_date_to, postal_code, +7 more. Returns: object
dpe_label_distributionARead-onlyIdempotent
How many dwellings get each energy label (A to G), plus the share of A-B and of F-G ('passoires thermiques'). Use for questions like "what share of homes in Gironde are F or G?". At most one of department, region, commune_insee, postal_code; no geography means all of France. Counts are DPE issued since July 2021, not the housing stock.
Inputs: region, department, dpe_date_to, postal_code, +7 more. Returns: object
dpe_rank_territoriesARead-onlyIdempotent
Rank départements, régions or communes by share of F-G dwellings, share of A-B, or mean primary energy. Use for "which departments have the most passoires thermiques?". region may narrow a department ranking; group_by=region takes no geography.
Inputs: metric (required), group_by (required), limit, order, +10 more. Returns: object
dpe_trendARead-onlyIdempotent
Number of DPE issued and label mix per year or month (from 2021-07 by default). Use for "has the share of F-G diagnoses fallen since 2022 in Paris?". It shows diagnoses issued, which is not the evolution of the housing stock.
Inputs: region, interval, department, dpe_date_to, +8 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct analytical role: lookup, distribution, descriptive stats, ranking, heating mix, and time trend. There is some conceptual overlap between label distribution, ranking by label share, and trend label mix, but the descriptions clarify the intended scope and grouping.
All tools consistently use the dpe_ prefix and snake_case, making them easy to scan as a family. The suffixes mix verb_noun and noun_phrase patterns (e.g. dpe_find_commune vs dpe_energy_stats), but the deviations are minor and readable.
Six tools is well-scoped for a focused DPE analytics server. Each tool covers a meaningful question type without redundant surface area.
The set covers discovery, aggregation, statistics, ranking, heating mix, and trends, which supports most DPE analysis workflows. Minor gaps include no explicit metadata tool for listing available departments/regions or a direct record-level lookup, but agents can work around these.
Maintenance
Related MCP Connectors
French real estate data: cadastre, DVF sales, DPE, energy audits, price estimates, parcel context
French property market data — 17M+ DVF sales, 22M+ DPE energy ratings, 20M+ building records.
French energy data, electricity and gas consumption, tariff scenarios and public discovery tools.
Open registry of 1.14M+ rooftop-solar detections across France, queryable by natural language.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAnalyzes French real-estate market using open data sources like DVF transactions, DPE certificates, and risk data.MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching and querying Île-de-France open data datasets (transport, environment, economy, etc.) via natural language or direct tool calls.61 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides tools to search, inspect, and query energy open data from ODRE (electricity & gas production, consumption, grid load, renewables) using natural language or direct tool calls.57 npmMIT
- FlicenseAqualityDmaintenanceProvides AI agents with real-time access to French real estate transaction data, price per square meter, and property estimates using official open DVF data, with no API key required.4-