Skip to main content
Glama
Paszymaja

elicznik-mcp

by Paszymaja

elicznik-tauron

Tauron eLicznik ポータル用の非公式 CLI および MCP サーバーです (https://elicznik.tauron-dystrybucja.pl)。コマンドラインからエネルギー消費量、発電量、メーター指示値を取得したり、Model Context Protocol を介して AI エージェントに公開したりできます。

Tauron とは提携していません。ポータルが使用しているのと同じ内部 Web API を使用します。

特徴

  • ログイン — Keycloak フォーム POST による(ブラウザ不要)。セッション Cookie はディスクにキャッシュされ、自動的に更新されます。

  • CLIelicznik)— メーターの一覧表示、エネルギー情報の取得、指示値の登録ができます。

  • MCP サーバーelicznik-mcp、stdio)— 同じデータをツールとして MCP クライアント(OpenCode や Claude など)に公開します。

利用可能なデータ:

データ

粒度

消費 / 発電 / ネット

時間、日、月、年

時間ごとの料金帯(zone

時間

メーターの累積指示値

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 にキャッシュされるため(gitignore 済み)、ログインは一度だけです。セッションの有効期限が切れると、クライアントは自動的に再認証します。

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

メトリクス: consumptiongenerationnet_consumptionnet_generation

MCP サーバー

サーバーは次の4つのツールを公開します:

  • list_meters — 計量地点の一覧

  • get_energy(metric, start_date, end_date, resolution) — 1つのメトリクスを、合計値と地点ごとの値とともに取得

  • get_readings(start_date, end_date, resolution) — 地点ごとの全4メトリクス

  • 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

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides AI agents and LLMs access to the Nikola TEST MCP API through standardized MCP tools for seamless integration and interaction.
  • F
    license
    Not graded
    quality
    B
    maintenance
    A 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.

View all related MCP servers

Related MCP Connectors

  • MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

View all MCP Connectors

Latest Blog Posts

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/Paszymaja/elicznik-tauron'

If you have feedback or need assistance with the MCP directory API, please join our Discord server