Swiss energy data via SFOE/BFE and GeoAdmin REST APIs
Valid MCP server (1 strong, 3 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.
5 files analyzed Β· 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-malkreide-swiss-energy-mcp": {
"args": [
"swiss-energy-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
π¨π Part of the Swiss Public Data MCP Portfolio
MCP server for Swiss energy data from the Federal Office of Energy (SFOE/BFE) via GeoAdmin REST API and opendata.swiss β no API key required.
swiss-energy-mcp gives AI assistants structured, location-based access to Switzerland's energy infrastructure. Built on open geodata from the Swiss Federal Office of Energy (SFOE/BFE) via the GeoAdmin REST API and the opendata.swiss catalogue β completely authentication-free.
The server is part of a growing portfolio of Swiss open data MCP servers. Think of it as the energy atlas counterpart to swiss-road-mobility-mcp: while the latter maps mobility, this server maps where Switzerland produces electricity, where solar potential exists, and which municipalities hold the "Energiestadt" label.
Anchor demo query: "Which power plants are within 20 km of the school in WΓ€denswil β and is the municipality an Energiestadt?"
uv (recommended) or pipAdd to your claude_desktop_config.json:
{
"mcpServers": {
"swiss-energy-mcp": {
"command": "uvx",
"args": ["swiss-energy-mcp"]
}
}
}
Config file locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsongit clone https://github.com/malkreide/swiss-energy-mcp.git
cd swiss-energy-mcp
uv sync
uv run swiss-energy-mcp
For use via claude.ai in the browser (e.g. on managed workstations without local software):
SWISS_ENERGY_TRANSPORT=http uvx swiss-energy-mcp
π‘ "stdio for the developer laptop, HTTP for the browser."
Once connected in Claude Desktop, try:
What power plants are within 20 km of Bern?
Show me all wind turbines in the Jura region.
Is ZΓΌrich an Energiestadt? What's their score?
What is the solar potential of rooftops near lat=47.37, lon=8.54?
Give me a full energy profile for the region around Lucerne.
Find SFOE datasets about hydropower.
| Tool | Description |
|---|---|
energy_find_power_plants | All electricity generation plants within a radius (optional category filter) |
energy_find_wind_turbines | Wind turbines with manufacturer, model, hub height |
energy_find_hydro_plants | Hydropower plants with capacity and expected output |
energy_find_pv_installations | Large PV installations with annual/winter production |
energy_find_biogas_plants | Biogas plants |
energy_find_energy_cities | Municipalities with "Energiestadt" label |
energy_solar_potential | Solar suitability of roof segments at a location |
energy_location_profile | Combined energy profile (5 layers) for a location |
energy_search_bfe_datasets | Full-text search over SFOE datasets on opendata.swiss |
energy_check_status | Check availability of GeoAdmin and opendata.swiss APIs |
All tools accept WGS84 coordinates (lat/lon). Conversion to Swiss LV95 is handled internally.
| Query | Tool |
|---|---|
| "Power plants near Bern (20 km radius)?" | energy_find_power_plants |
| "Wind turbines in the Jura?" | energy_find_wind_turbines |
| "Is ZΓΌrich an Energiestadt?" | energy_find_energy_cities |
| "Solar potential of rooftops near lat=47.37, lon=8.54?" | energy_solar_potential |
| "Full energy profile for Lucerne region?" | energy_location_profile |
| "SFOE datasets on hydropower?" | energy_search_bfe_datasets |
β More use cases by audience β
| Source | URL | Auth |
|---|---|---|
| GeoAdmin REST API (swisstopo) | api3.geo.admin.ch | None |
| opendata.swiss CKAN API | opendata.swiss/api/3/action | None |
BFE Layers used:
ch.bfe.elektrizitaetsproduktionsanlagench.bfe.windenergieanlagench.bfe.statistik-wasserkraftanlagench.bfe.photovoltaik-grossanlagench.bfe.biogasanlagench.bfe.energiestaedtech.bfe.solarenergie-eignung-daecherAll variables use the SWISS_ENERGY_ prefix and are validated at startup.
| Environment variable | Default | Description |
|---|---|---|
SWISS_ENERGY_TRANSPORT | stdio | Transport mode: stdio or http |
SWISS_ENERGY_HOST | 127.0.0.1 | Host for HTTP transport. Bind 0.0.0.0 only inside a container. |
SWISS_ENERGY_PORT | 8000 | Port for HTTP transport |
SWISS_ENERGY_CORS_ORIGINS | https://claude.ai | Comma-separated allowed CORS origins (HTTP transport) |
SWISS_ENERGY_LOG_LEVEL | INFO | Log level: DEBUG / INFO / WARNING / ERROR |
SWISS_ENERGY_HTTP_TIMEOUT | 20 | Upstream HTTP timeout in seconds |
See .env.example for a template.
This server targets the MCP protocol version shipped with the pinned mcp
SDK (mcp[cli] >= 1.20.0). SDK updates arrive monthly via Dependabot;
protocol-version changes are recorded in CHANGELOG.md.
The server uses all three MCP primitives:
EnergyResponse envelope: structured results plus a Markdown summary,
explicit source / license attribution, and a match_type field.energy://layers, the static catalogue of BFE GeoAdmin layers.energy_site_assessment, a guided location-analysis template.The server is in Phase 1 (read-only). See docs/roadmap.md for the phased architecture and docs/security.md for the egress allow-list, SSRF protection and trifecta assessment.
| Aspect | Details |
|---|---|
| Access | Read-only (readOnlyHint: true) β the server cannot modify or delete any data |
| Personal data | No personal data β all sources are aggregated, public infrastructure data |
| Rate limits | Built-in per-query caps (max 50 search results, default 5 km radius) |
| Timeout | 20 seconds per API call |
| Authentication | No API keys required β both APIs are publicly accessible |
| Licenses | All data under open licenses via opendata.swiss (OGD) |
| Terms of Service | Subject to ToS of the respective data sources: GeoAdmin, opendata.swiss, SFOE/BFE |
βββββββββββββββββββ βββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β Claude / AI ββββββΆβ Swiss Energy MCP ββββββΆβ SFOE / BFE Open Data β
β (MCP Host) βββββββ (MCP Server) βββββββ β
βββββββββββββββββββ β β β GeoAdmin REST API β
β 10 Tools β β (api3.geo.admin.ch) β
β Stdio | HTTP β β β
β β β opendata.swiss CKAN β
β server.py (FastMCP) β β (opendata.swiss) β
β api_client.py β ββββββββββββββββββββββββββββ
β LV95 conversion β
β GeoAdmin queries β
βββββββββββββββββββββββββββββ
| Component | Metaphor | Function |
|---|---|---|
api_client.py | Switchboard | Handles HTTP requests, coordinate conversion, error handling |
| LV95 converter | Translator | Converts WGS84 (lat/lon) to Swiss coordinate system |
server.py | Storefront | Exposes all 10 tools via FastMCP |
swiss-energy-mcp/
βββ src/
β βββ swiss_energy_mcp/
β βββ server.py # FastMCP setup, lifespan, entry point
β βββ settings.py # Typed configuration (pydantic-settings)
β βββ logging_config.py # Structured JSON logging to stderr
β βββ api_client.py # HTTP client, egress guard, LV95 conversion
β βββ models.py # Pydantic input/output models
β βββ formatting.py # Markdown summary builders
β βββ resources.py # Layer-catalogue resource + prompt
β βββ tools/ # One module per tool group
β βββ installations.py # power, wind, hydro, PV, biogas
β βββ places.py # solar, Energiestadt, location profile
β βββ catalog.py # dataset search, status
βββ tests/
β βββ test_unit.py # Pure-unit tests (coords, formatting, egress)
β βββ test_tools.py # Tool tests with respx-mocked APIs
β βββ test_live.py # Live integration tests (marked `live`)
βββ docs/ # roadmap.md, security.md
βββ Dockerfile # Multi-stage build, non-root user
βββ pyproject.toml
βββ CHANGELOG.md
βββ CONTRIBUTING.md # Contribution guide (English)
βββ CONTRIBUTING.de.md # Contribution guide (German)
βββ SECURITY.md # Security policy (English)
βββ SECURITY.de.md # Security policy (German)
βββ LICENSE
βββ README.md # This file (English)
βββ README.de.md # German version
ch.bfe.solarenergie-eignung-daecher covers building footprints β not all roof types are classified# Unit tests (no API key required)
PYTHONPATH=src pytest tests/ -m "not live"
# Live integration tests (network access required)
PYTHONPATH=src pytest tests/ -m "live"
See CHANGELOG.md
See CONTRIBUTING.md (π©πͺ Deutsch)
See SECURITY.md (π©πͺ Deutsch) for the security policy and posture summary, and docs/security.md for the full technical security model.
MIT License β see LICENSE
Hayal Oezkan Β· malkreide
Be the first to review this server!
by Modelcontextprotocol Β· Developer Tools
Read, search, and manipulate Git repositories programmatically
by Modelcontextprotocol Β· Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno Β· Developer Tools
Toleno Network MCP Server β Manage your Toleno mining account with Claude AI using natural language.