Swedish Energy Regulation MCP
# Swedish Energy Regulation MCP
<!-- ANSVAR-CTA-BEGIN -->
> ### ▶ Try this MCP instantly via Ansvar Gateway
> **50 free queries/day · no card required · OAuth signup at [ansvar.eu/gateway](https://ansvar.eu/gateway)**
>
> One endpoint, one OAuth signup, access from any MCP-compatible client.
### Connect
**Claude Code** (one line):
```bash
claude mcp add ansvar --transport http https://gateway.ansvar.eu/mcp
```
**Claude Desktop / Cursor** — add to `claude_desktop_config.json` (or `mcp.json`):
```json
{
"mcpServers": {
"ansvar": {
"type": "url",
"url": "https://gateway.ansvar.eu/mcp"
}
}
}
```
**Claude.ai** — Settings → Connectors → Add custom connector → paste `https://gateway.ansvar.eu/mcp`
First request opens an OAuth flow at [ansvar.eu/gateway](https://ansvar.eu/gateway). After signup, your client is bound to your account; tier (free / premium / team / company) determines fan-out, quota, and which downstream MCPs are reachable.
---
## Self-host this MCP
You can also clone this repo and build the corpus yourself. The schema,
fetcher, and tool implementations all live here. What is not in the repo is
the pre-built database — TDM and standards-licensing constraints on the
upstream sources mean we host the corpus on Ansvar infrastructure rather
than redistribute it as a public artifact.
Build your own: run this repo's ingestion script (entry-point varies per
repo — typically `scripts/ingest.sh`, `npm run ingest`, or `make ingest`;
check the repo root).
<!-- ANSVAR-CTA-END -->
MCP server for Swedish energy sector regulations -- Ei market rules, Svenska kraftnat grid codes, Energimyndigheten policy, Elsakerhetsverket safety rules.
[](https://opensource.org/licenses/Apache-2.0)
Covers four Swedish energy regulators with full-text search across regulations, grid codes, and regulatory decisions. All data is in Swedish.
Built by [Ansvar Systems](https://ansvar.eu) -- Stockholm, Sweden
---
## Regulators Covered
| Regulator | Role | Website |
|-----------|------|---------|
| **Energimarknadsinspektionen (Ei)** | Energy market regulation, network tariffs, consumer protection, licence conditions | [ei.se](https://ei.se) |
| **Svenska kraftnat** | Electricity transmission, grid codes, balancing market, frequency regulation, ancillary services | [svk.se](https://svk.se) |
| **Energimyndigheten** (Swedish Energy Agency) | Energy policy, renewable energy, energy efficiency, climate reporting, R&D | [energimyndigheten.se](https://energimyndigheten.se) |
| **Elsakerhetsverket** (Electrical Safety Authority) | Electrical installation safety, product safety, authorization requirements | [elsakerhetsverket.se](https://elsakerhetsverket.se) |
---
## Tools
| Tool | Description |
|------|-------------|
| `se_energy_search_regulations` | Full-text search across energy regulations from Ei, Energimyndigheten, and Elsakerhetsverket |
| `se_energy_get_regulation` | Get a specific regulation by reference string (e.g., `EIFS 2022:1`) |
| `se_energy_search_grid_codes` | Search Svenska kraftnat grid codes, balancing rules, and market regulations |
| `se_energy_get_grid_code` | Get a specific grid code document by database ID |
| `se_energy_search_decisions` | Search Ei tariff decisions, revenue caps, and market rulings |
| `se_energy_about` | Return server metadata: version, regulators, tool list, data coverage |
| `se_energy_list_sources` | List data sources with record counts and provenance URLs |
| `se_energy_check_data_freshness` | Check data freshness and staleness status for each source |
Full tool documentation: [TOOLS.md](TOOLS.md)
---
## Data Coverage
| Source | Records | Content |
|--------|---------|---------|
| Ei | 70 regulations | Market regulation, network tariffs, consumer protection, licence conditions |
| Riksdagen | 53 regulations | Ellagen, naturgaslagen, fjarrvarmlagen, energy acts |
| Energimyndigheten | 48 regulations | Energy efficiency, renewable energy, energy statistics, climate policy |
| Elsakerhetsverket | 28 regulations | Electrical safety, product safety, installation rules |
| Svenska kraftnat | 63 grid codes | Balancing rules, frequency regulation, grid connection, ancillary services |
| Ei (decisions) | 39 decisions | Revenue caps, tariff determinations, methodology approvals, benchmarking |
| **Total** | **301 records** | ~396 KB database |
**Language note:** All regulatory content is in Swedish. Search queries work best in Swedish (e.g., `ellag`, `natavgift`, `intaktsram`, `balansansvar`).
Full coverage details: [COVERAGE.md](COVERAGE.md)
---
## Data Sources
See [sources.yml](sources.yml) for machine-readable provenance metadata.
---
## Docker
```bash
docker build -t swedish-energy-regulation-mcp .
docker run --rm -p 3000:3000 -v /path/to/data:/app/data swedish-energy-regulation-mcp
```
Set `SE_ENERGY_DB_PATH` to use a custom database location (default: `data/se-energy.db`).
---
## Development
```bash
npm install
npm run build
npm run seed # populate sample data
npm run dev # HTTP server on port 3000
```
---
## Further Reading
- [TOOLS.md](TOOLS.md) -- full tool documentation with examples
- [COVERAGE.md](COVERAGE.md) -- data coverage and limitations
- [sources.yml](sources.yml) -- data provenance metadata
- [DISCLAIMER.md](DISCLAIMER.md) -- legal disclaimer
- [PRIVACY.md](PRIVACY.md) -- privacy policy
- [SECURITY.md](SECURITY.md) -- vulnerability disclosure
---
## License
Apache-2.0 -- [Ansvar Systems AB](https://ansvar.eu)
See [LICENSE](LICENSE) for the full license text.
See [DISCLAIMER.md](DISCLAIMER.md) for important legal disclaimers about the use of this regulatory data.
---
[ansvar.ai/mcp](https://ansvar.ai/mcp) -- Full MCP server catalog
TDQS
Scored across 8 tools
The get/search pairs for regulations and grid codes are clearly separated by resource and identifier type, and the descriptions distinguish regulators (Ei/Energimyndigheten/Elsakerhetsverket vs Svenska kraftnat). There is mild potential confusion between search_regulations and search_grid_codes since grid codes are conceptually a form of regulation, and between search_decisions and search_regulations for Ei documents, but descriptions mostly resolve this.
All tools use a consistent se_energy_ prefix with snake_case verb_noun naming (get_regulation, search_grid_codes, check_data_freshness). The only deviation is se_energy_about, which lacks a verb, but it remains readable and predictable.
Eight tools is well-scoped for a regulatory research server, covering retrieval, search, and metadata/freshness without bloat. Each tool appears to earn its place.
The core workflow of search-then-get is covered for regulations and grid codes, plus decision search and data provenance tools. A notable gap is the absence of a get_decision tool to retrieve full text for a specific Ei decision found via search, which could cause a dead end.