stwhas-strompreise
by f2daz
README.md
# stwhas-strompreise
Real-time electricity spot prices from **Stadtwerk Hassfurt GmbH** for Claude.
Provides hourly EPEX spot prices for the **haStrom flex** and **haStrom flex pro** tariffs. Day-ahead prices for the next day are available after 14:00 CET.
Two integration options:
| Option | Best for |
|---|---|
| **[Claude Skill](#option-1-claude-skill)** | Claude.ai (Pro/Team/Enterprise) |
| **[MCP Server](#option-2-mcp-server)** | Claude Code, Claude Desktop |
## Option 1: Claude Skill
Download [`skill/SKILL.md`](skill/SKILL.md) and upload it to Claude:
1. Go to **Claude.ai** > **Settings** > **Customize** > **Skills**
2. Upload the `SKILL.md` file
3. Enable the skill
4. Ask Claude about electricity prices
The skill teaches Claude how to fetch prices directly from the API using Python — no server or installation needed.
## Option 2: MCP Server
### Claude Code
```bash
claude mcp add stwhas-strompreise -- uvx stwhas-strompreise-mcp
```
### Claude Desktop
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"stwhas-strompreise": {
"command": "uvx",
"args": ["stwhas-strompreise-mcp"]
}
}
}
```
### MCP Tools
| Tool | Description |
|---|---|
| `get_electricity_prices` | Formatted hourly prices with min/max/avg summary |
| `get_electricity_prices_raw` | Raw JSON API response for programmatic use |
**Parameters:**
- **tariff**: `"flex"`, `"flexpro"`, or `"both"` (default: `"both"`)
- **start_date**: Historical start date, format `YYYYMMDD` (optional)
- **end_date**: Historical end date, format `YYYYMMDD` (optional)
## Tariffs
**haStrom flex** — Energy price has a floor (~16.78 ct/kWh) and a cap (~25.82 ct/kWh). Lower risk, predictable costs.
**haStrom flex pro** — Direct EPEX pass-through with a very low floor (~3.45 ct/kWh) and no cap. Higher savings potential during low-price hours (midday solar surplus).
## Price fields
| Field | Description |
|---|---|
| EPEX raw | Raw EPEX spot market price excl. VAT |
| Energy | Energy price incl. VAT (tariff-specific) |
| Total | Total price incl. taxes, grid fees, margin, VAT |
All prices in **ct/kWh**.
## Data source
Public Stadtwerk Hassfurt API at `http://eex.stwhas.de/api/spotprices`. No API key required.
## Example
```
> What are today's electricity prices?
Data for 2026-03-12:
**haStrom flex**
Min energy price: 16.78 ct/kWh
Max energy price: 25.82 ct/kWh
...
Hour | EPEX raw | Energy | Total
---------- | --------- | --------- | ---------
00:00 | 10.018 | 16.784 | 28.890
01:00 | 9.204 | 16.784 | 28.890
...
Min: 28.890 | Max: 31.880 | Avg: 29.121 ct/kWh
```
## License
MIT
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo recent community issues