md24de-mcp

md24de-mcp

Unofficial MCP server for the messdienst24.de utility portal, providing tools to retrieve heating and hot-water consumption data, download PDF reports, and compare usage trends.

Category
访问服务器

README

md24de-mcp

Latest release Python 3.13+ License: MIT Quality Gate Coverage

Unofficial Model Context Protocol (MCP) server for the messdienst24.de utility-consumption portal.

Wraps python-md24de to expose heating and hot-water consumption data as MCP tools that any MCP-compatible AI client can invoke.

Disclaimer — This project is not affiliated with, endorsed by, or in any way officially connected with messdienst24.de or its operators. Use at your own risk.


Tools

Tool Description
get_last_available_month Returns the year/month for which the portal currently provides data
get_consumption_report Returns the full heating and hot-water consumption report
save_pdf Downloads the monthly consumption PDF and saves it to disk

get_last_available_month

Returns { "year": int, "month": int }.

get_consumption_report

Returns structured consumption data with the following shape:

{
  "year": 2025,
  "month": 4,
  "object_info": { "object_number": "…", "address": "…" },
  "heating": {
    "your_kwh": 123.4,
    "average_kwh": 150.0,
    "vs_average": "less",
    "vs_previous_month": "more",
    "vs_previous_year": null,
    "history": [
      { "year": 2025, "month": 4, "your_kwh": 123.4, "average_kwh": 150.0 },
      { "year": 2025, "month": 3, "your_kwh": 140.0, "average_kwh": 160.0 }
    ]
  },
  "hot_water": { "…": "…" }
}

Comparison values are "less", "more", "equal", or null when unavailable.

save_pdf

Saves the PDF to disk and returns:

{
  "saved_to": "/Users/you/Downloads/verbrauch-2025-04.pdf",
  "filename": "verbrauch-2025-04.pdf",
  "year": 2025,
  "month": 4,
  "size_bytes": 123456
}

The optional directory parameter controls where the file is saved (default: ~/Downloads).


Example prompts

Once connected to Claude Desktop, you can ask:

  • "How much heating energy did I use last month?"
  • "Am I using more or less heating than comparable households?"
  • "Show me my hot-water consumption trend over the past months."
  • "Compare my heating usage to last year's same month."
  • "Give me a summary of my energy consumption."
  • "Save my monthly consumption PDF to my Downloads folder."
  • "Save my monthly consumption PDF to my Desktop."
  • "Which month's data is currently available on messdienst24.de?"

Client lifecycle and caching

Each tool creates a fresh Md24deClient, performs the minimum required requests, then closes the connection. This avoids server-side session timeouts for long-running processes.

Results are cached in memory for a configurable TTL (default 30 minutes):

Tool Caches
get_last_available_month available month
get_consumption_report available month + consumption report
save_pdf available month + PDF bytes

Configuration

All configuration is provided via environment variables.

Variable Required Default Description
MD24DE_TENANT Short portal ID (the md= part of the login URL, e.g. xy)
MD24DE_USERNAME Portal login username
MD24DE_PASSWORD Portal login password
MD24DE_TIMEOUT 30.0 HTTP request timeout in seconds
MD24DE_CACHE_TTL 1800 Cache time-to-live in seconds
LOG_LEVEL WARNING Python logging level (DEBUG, INFO, WARNING, ERROR)

Installation

This package is not published on PyPI. The recommended way to install it for use with Claude Desktop or other MCP clients is pipx, which installs the md24de-mcp command globally while keeping its dependencies isolated:

pipx install "git+https://github.com/volsch/md24de-mcp.git@vX.Y.Z"

Or with uv:

uv tool install "git+https://github.com/volsch/md24de-mcp.git@vX.Y.Z"

Both put md24de-mcp on your PATH so MCP clients can launch it by name.

To upgrade to a newer version, replace vX.Y.Z and run pipx upgrade md24de-mcp or uv tool upgrade md24de-mcp.


Running

export MD24DE_TENANT=xy
export MD24DE_USERNAME=your_user
export MD24DE_PASSWORD=your_pass

md24de-mcp

MCP client configuration

Claude Desktop

1. Install the server (see Installation above, e.g. with pipx):

pipx install "git+https://github.com/volsch/md24de-mcp.git@vX.Y.Z"

2. Add it to the Claude Desktop config. Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "md24de": {
      "command": "md24de-mcp",
      "env": {
        "MD24DE_TENANT": "xy",
        "MD24DE_USERNAME": "your_user",
        "MD24DE_PASSWORD": "your_pass"
      }
    }
  }
}

Replace xy, your_user, and your_pass with your actual messdienst24.de credentials. The tenant ID is the md= value from your portal login URL (e.g. https://messdienst24.de/?md=xy).

3. Restart Claude Desktop.

4. Verify the connection. A 🔧 icon in the chat input bar confirms the server is connected. Click it to see the list of available tools (get_last_available_month, get_consumption_report, save_pdf).

5. Try an example prompt (see Example prompts above), e.g.:

"How much heating energy did I use last month?"

Logging

The server uses Python's standard logging module under the md24de_mcp logger hierarchy and registers a NullHandler so no output appears unless the calling process configures logging explicitly.

Set the LOG_LEVEL environment variable to control verbosity:

{
  "mcpServers": {
    "md24de": {
      "command": "md24de-mcp",
      "env": {
        "MD24DE_TENANT": "xy",
        "MD24DE_USERNAME": "your_user",
        "MD24DE_PASSWORD": "your_pass",
        "LOG_LEVEL": "DEBUG"
      }
    }
  }
}

Debug messages include cache hits/misses, available month/year values, and byte counts. The underlying md24de library also emits debug messages (HTTP status codes, parsed dates). Credentials (username, password) are never written to any log message.


Development

git clone https://github.com/volsch/md24de-mcp.git
cd md24de-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

Run the test suite:

pytest

Type-check:

pyright src/

Lint and format:

ruff check src/ tests/
ruff format src/ tests/

Legal

Legal context for the data

The monthly consumption report accessed through this server is the unterjährige Verbrauchsinformation (UVI) — a legally mandated document under §6a of the German Heating Cost Ordinance (Heizkostenverordnung, HeizkostenV). Under §6b HeizkostenV, consumption data may only be collected and used for billing purposes and to fulfil the legal information obligations. This server retrieves your own data from the portal provided for exactly that purpose.

Unofficial project

This server is not an official product of messdienst24.de. It was built by observing the portal's web interface for personal and educational use. It does not circumvent any technical protection measures and only uses credentials that the account holder provides themselves.

Credentials and privacy

Your username and password are passed directly to the messdienst24.de servers over HTTPS via the underlying python-md24de library. This server does not store or log credentials. However, any direct or indirect dependency — such as HTTP client internals, logging back-ends, or network proxies configured in your environment — is outside this server's control and may handle the data differently.

Consumption data fetched from the portal is held in memory only for the duration of the cache TTL and is never written to disk by this server.

No warranty

The portal's HTML structure can change at any time without notice, which may break the underlying library. The software is provided "as is" — see the LICENSE for full terms.

Terms of service

Before using this server, ensure your use complies with the messdienst24.de terms of service. Automated access may be restricted by those terms.

License

MIT © 2026 Volker Schmidt

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选