elicznik-mcp
elicznik-tauron
非官方的 CLI 和 MCP 服务器,用于 Tauron eLicznik 门户 (https://elicznik.tauron-dystrybucja.pl)。通过命令行获取用电量、发电量和电表读数,或通过 Model Context Protocol 将其暴露给 AI 智能体。
与 Tauron 无关联。使用门户所用的同一个内部 Web API。
功能
登录:通过 Keycloak 表单 POST 完成(无需浏览器);会话 Cookie 缓存到磁盘并自动刷新。
CLI(
elicznik):列出计量点、获取能耗数据和登记读数。MCP 服务器(
elicznik-mcp,stdio):以工具形式向 OpenCode 或 Claude 等 MCP 客户端公开相同的数据。
可用数据:
数据 | 粒度 |
用电量 / 发电量 / 净 | 小时、天、月、年 |
每小时费率区( | 小时 |
累计电表读数 | 天 |
Related MCP server: Enapter MCP Server
环境要求
Python 3.10+ 和 uv。
设置
uv sync --extra mcp
cp .env.example .env # then fill in your credentials.env:
ELICZNIK_USERNAME=your-login-or-email
ELICZNIK_PASSWORD=your-password
# Optional: pick a specific metering point if you have more than one
# ELICZNIK_SITE=5842033_61898031_5842033会话 Cookie 缓存到 elicznik_session.json(已被 git 忽略),因此只需登录一次;当会话过期时,客户端会自动重新认证。
CLI
# List metering points
uv run elicznik meters
# Hourly consumption for a day (defaults: today, metric=consumption, resolution=hour)
uv run elicznik energy --metric consumption --from 2026-08-24 --to 2026-08-24
# Daily / monthly / yearly totals
uv run elicznik energy --metric consumption --resolution day --from 2026-08-01 --to 2026-08-26
uv run elicznik energy --metric consumption --resolution month --from 2026-01-01 --to 2026-08-26
uv run elicznik energy --metric generation --resolution year --from 2026-01-01 --to 2026-08-26
# Output formats: table (default), csv, json
uv run elicznik energy --metric consumption --resolution day --from 2026-08-01 --to 2026-08-26 --format json
# Cumulative meter register readings (billing readings)
uv run elicznik readings --from 2026-08-01 --to 2026-08-26
uv run elicznik readings --from 2026-08-01 --to 2026-08-26 --generation # returned energy指标:consumption、generation、net_consumption、net_generation。
MCP 服务器
该服务器提供四个工具:
list_meters— 列出计量点get_energy(metric, start_date, end_date, resolution)— 获取单个指标,包含总计和每个计量点的值get_readings(start_date, end_date, resolution)— 获取每个计量点的全部四个指标get_meter_readings(start_date, end_date, generation)— 获取累计电表读数
OpenCode
添加到 ~/.config/opencode/opencode.json:
{
"mcp": {
"elicznik": {
"type": "local",
"command": ["uv", "run", "--directory", "/home/paszymaja/github_projects/elicznik-tauron", "elicznik-mcp"],
"enabled": true
}
}
}Claude for Desktop
添加到 claude_desktop_config.json:
{
"mcpServers": {
"elicznik": {
"command": "uv",
"args": ["--directory", "/ABSOLUTE/PATH/TO/elicznik-tauron", "run", "elicznik-mcp"]
}
}
}服务器从项目目录中的 .env 读取凭据(或从 ELICZNIK_USERNAME / ELICZNIK_PASSWORD 环境变量读取)。
Docker
容器镜像已发布到 GitHub Container Registry(ghcr.io/paszymaja/elicznik-tauron)。凭据从 ELICZNIK_USERNAME / ELICZNIK_PASSWORD 环境变量读取(无需 .env);会话缓存写入 /tmp(临时)。
# CLI
docker run --rm \
-e ELICZNIK_USERNAME -e ELICZNIK_PASSWORD \
ghcr.io/paszymaja/elicznik-tauron:latest meters
docker run --rm \
-e ELICZNIK_USERNAME -e ELICZNIK_PASSWORD \
ghcr.io/paszymaja/elicznik-tauron:latest \
energy --metric consumption --resolution day --from 2026-08-01 --to 2026-08-26
# MCP server over stdio (note the -i flag for stdin)
docker run -i --rm \
-e ELICZNIK_USERNAME -e ELICZNIK_PASSWORD \
ghcr.io/paszymaja/elicznik-tauron:latest mcp要在本地构建镜像:
docker build -t elicznik-tauron .开发
uv sync --extra mcp
uv run pytest备注
门户的 TLS 服务器协商的密码套件会被 Python 默认的 OpenSSL 策略拒绝;客户端挂载了一个
DEFAULT@SECLEVEL=1适配器作为变通方案(见session.py)。逐小时 CSV 时间戳标记的是结束小时;客户端会将它们规范化为与图表 API 约定一致的整点开始时间戳。
时间戳使用本地时区(Europe/Warsaw),不含时区偏移。
许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI agents and LLMs access to the Nikola TEST MCP API through standardized MCP tools for seamless integration and interaction.-

Enapter MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceMCP server providing tools for AI-agents to interact with Enapter EMS.Apache 2.0- FlicenseNot gradedqualityCmaintenanceA read-only MCP server that exposes European day-ahead electricity prices for ~41 bidding zones via tools like hourly prices, cheapest hours, current price, and cross-zone summary, enabling AI agents to query energy market data.1-
- FlicenseNot gradedqualityDmaintenanceExposes Garmin Connect health data (steps, sleep, HR, HRV, stress, activities, etc.) as tools for MCP-compatible clients like Claude.-