swiss-energy-mcp
Click on "Install 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., "@swiss-energy-mcpWhat power plants are within 20 km of Bern?"
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.
π¨π Part of the Swiss Public Data MCP Portfolio
β‘ swiss-energy-mcp
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.
Overview
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?"
Related MCP server: swiss-statistics-mcp
Features
π 10 ready-to-use tools covering all major energy data layers from SFOE/BFE
β‘ Power plants β all types: photovoltaic, hydro, wind, biomass, nuclear, with optional category filter
π¨ Wind turbines β detailed data incl. manufacturer, model, hub height, annual production
π§ Hydropower plants β type, status, turbine capacity, expected annual output
βοΈ PV large installations β project name, capacity, annual/winter production, altitude
πΏ Biogas plants β plant name, output
ποΈ EnergiestΓ€dte β municipalities with the Swiss "Energiestadt" label (score, year awarded, audits)
π Solar roof potential β suitability category, area, orientation, and slope per roof segment
π Location energy profile β combines 5 layers into a single overview for any Swiss location
ποΈ SFOE dataset search β full-text search across SFOE publications on opendata.swiss
β Status check β verifies availability of both upstream APIs
βοΈ Dual transport β stdio for Claude Desktop, Streamable HTTP for cloud deployment
Prerequisites
Python 3.11+
uv(recommended) orpip
Installation
Claude Desktop (stdio transport)
Add to your claude_desktop_config.json:
{
"mcpServers": {
"swiss-energy-mcp": {
"command": "uvx",
"args": ["swiss-energy-mcp"]
}
}
}Config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Local development
git clone https://github.com/malkreide/swiss-energy-mcp.git
cd swiss-energy-mcp
uv sync
uv run swiss-energy-mcpCloud / HTTP transport (Streamable HTTP)
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."
Quickstart
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.Available Tools
Tool | Description |
| All electricity generation plants within a radius (optional category filter) |
| Wind turbines with manufacturer, model, hub height |
| Hydropower plants with capacity and expected output |
| Large PV installations with annual/winter production |
| Biogas plants |
| Municipalities with "Energiestadt" label |
| Solar suitability of roof segments at a location |
| Combined energy profile (5 layers) for a location |
| Full-text search over SFOE datasets on opendata.swiss |
| Check availability of GeoAdmin and opendata.swiss APIs |
All tools accept WGS84 coordinates (lat/lon). Conversion to Swiss LV95 is handled internally.
Example Use Cases
Query | Tool |
"Power plants near Bern (20 km radius)?" |
|
"Wind turbines in the Jura?" |
|
"Is ZΓΌrich an Energiestadt?" |
|
"Solar potential of rooftops near lat=47.37, lon=8.54?" |
|
"Full energy profile for Lucerne region?" |
|
"SFOE datasets on hydropower?" |
|
β More use cases by audience β
Data Sources
Source | URL | Auth |
GeoAdmin REST API (swisstopo) |
| None |
opendata.swiss CKAN API |
| None |
BFE Layers used:
ch.bfe.elektrizitaetsproduktionsanlagench.bfe.windenergieanlagench.bfe.statistik-wasserkraftanlagench.bfe.photovoltaik-grossanlagench.bfe.biogasanlagench.bfe.energiestaedtech.bfe.solarenergie-eignung-daecher
Configuration
All variables use the SWISS_ENERGY_ prefix and are validated at startup.
Environment variable | Default | Description |
|
| Transport mode: |
|
| Host for HTTP transport. Bind |
|
| Port for HTTP transport |
|
| Comma-separated allowed CORS origins (HTTP transport) |
|
| Log level: |
|
| Upstream HTTP timeout in seconds |
See .env.example for a template.
MCP Protocol Version
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.
MCP Primitives
The server uses all three MCP primitives:
Tools β 10 read-only tools (see above). Every search tool returns an
EnergyResponseenvelope: structuredresultsplus a Markdownsummary, explicitsource/licenseattribution, and amatch_typefield.Resource β
energy://layers, the static catalogue of BFE GeoAdmin layers.Prompt β
energy_site_assessment, a guided location-analysis template.
Development Phase
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.
Safety & Limits
Aspect | Details |
Access | Read-only ( |
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 |
Architecture
βββββββββββββββββββ βββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β 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 β
βββββββββββββββββββββββββββββInfrastructure Components
Component | Metaphor | Function |
| Switchboard | Handles HTTP requests, coordinate conversion, error handling |
LV95 converter | Translator | Converts WGS84 (lat/lon) to Swiss coordinate system |
| Storefront | Exposes all 10 tools via FastMCP |
Project Structure
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 versionKnown Limitations
GeoAdmin radius search: Maximum search radius depends on layer density; very large radii may return partial results
Solar potential: Layer
ch.bfe.solarenergie-eignung-daechercovers building footprints β not all roof types are classifiedEnergiestadt: Only municipalities with active label are included; historical entries may be incomplete
opendata.swiss CKAN: Full-text search covers metadata only, not document contents
Testing
# 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"Changelog
See CHANGELOG.md
Contributing
See CONTRIBUTING.md (π©πͺ Deutsch)
Security
See SECURITY.md (π©πͺ Deutsch) for the security policy and posture summary, and docs/security.md for the full technical security model.
License
MIT License β see LICENSE
Author
Hayal Oezkan Β· malkreide
Credits & Related Projects
Data: SFOE/BFE via GeoAdmin β Swiss Federal Office of Energy
Data: opendata.swiss β Swiss Open Government Data portal
Protocol: Model Context Protocol β Anthropic / Linux Foundation
Related: swiss-road-mobility-mcp β MCP server for Swiss mobility data
Related: zurich-opendata-mcp β MCP server for Zurich city open data
Portfolio: Swiss Public Data MCP Portfolio
Installation
Run via uv's uvx β no clone or manual install needed. Add to your MCP client config (mcpServers for Claude Desktop, Cursor and Windsurf; use a top-level servers key for VS Code in .vscode/mcp.json):
{
"mcpServers": {
"swiss-energy-mcp": {
"command": "uvx",
"args": [
"swiss-energy-mcp"
]
}
}
}This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/malkreide/swiss-energy-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server