
MaStR MCP Server
io.github.UliRCS由 GitHub 账号 UliRCS 发布v1.0.1更新于 Oct 24, 2026
MCP server for the German Marktstammdatenregister (MaStR) energy market register
概览
让助手查询德国 Marktstammdatenregister 能源市场登记册中的发电与燃气机组、市场参与者和电网接入点数据。
- 可以做什么
- 提供 21 个工具访问德国 MaStR 能源登记册:7 个公开 JSON 搜索工具,覆盖发电、用电、燃气生产、燃气消费、市场参与者和电网接入点,另有连接测试。配置凭据后,额外 14 个 SOAP 工具可提供机组完整详情、筛选搜索、市场参与者查询、目录值、平衡区域、电网接入点、近期变更和 API 配额。搜索支持等于、包含、前缀、空值等过滤运算符,覆盖 20 种能源载体。
- 适用场景
- 适合需要德国能源市场数据的场景:机组详情、按容量和邮编搜索、市场参与者、电网接入点,或同步登记册近期变更。公开工具无需账号即可进行一般搜索;只有详情查询和额外 SOAP 工具需要凭据。
- 运行要求
- 本地 Python 进程,需 Python 3.10 或更高版本,以及 uv 或 pip。凭据可选:MASTR_USER(市场参与者编号)和 MASTR_TOKEN(Web 服务令牌)可从项目目录的 .env 文件、操作系统环境变量或客户端配置的 env 块读取。需要访问 MaStR Web 服务的网络连接,仅接受 TLS 1.2。
安装
在 SourceWeft 中
- 打开 控制台中的 MaStR MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MaStR MCP Server
An MCP server for the Marktstammdatenregister (MaStR) — the German energy market master data register operated by the Bundesnetzagentur (Federal Network Agency). Enables Claude Desktop, Cowork, and Claude Code to directly access the German energy plant registry.
Deutsche Version / German version
Features
21 Tools — 14 SOAP (with credentials), 7 Public (always available)
10 Filter Operators
20 Energy Carriers
All technology keywords are available in English (German aliases also work):
wind, solar, biomass, hydro, storage, geo, mine_gas, sewage_sludge,
solar_thermal, pressure_relief_gas/pressure_relief_water, natural_gas, hard_coal, lignite,
mineral_oil, other_gases, waste, heat, hydrogen, nuclear.
Without credentials, 7 public tools are available (search power generation, power consumption, gas production, gas consumption, market actors, grid connections + connection test). With credentials (.env), 14 additional SOAP tools are registered (detail queries, filtered searches, catalogs, balancing areas, etc.).
Installation
Prerequisites
- Python >= 3.10
uv(recommended) orpip- MaStR web service account (for SOAP API tools, optional): https://www.marktstammdatenregister.de
Step 1: Clone / copy project
Step 2: Install dependencies
With uv (recommended):
With pip:
Step 3: Store credentials in .env
The server automatically loads credentials from a .env file in the project directory (via python-dotenv). This is the recommended approach.
.env is excluded via .gitignore — your token will not end up in the repo.
Alternative: You can also set the variables as OS environment variables or in the env block of the Claude Desktop config — OS values take precedence.
Step 4: Test
Configuration for Claude Desktop / Cowork
Open the Claude Desktop configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
If .env is in the project directory, you can omit the env block:
Important: Adjust the path under --directory to the actual location on your system.
Configuration for Claude Code
Usage Examples
- "Show me the details of wind turbine SEE966095906064"
->
get_unit - "Find all solar plants in postcode 49074"
->
search_power_generation_public({'tech': 'solar', 'postcode': '49074'}) - "Wind turbines between 1200 and 3500 kW in postcode area 23..."
->
search_power_generation_public({'tech': 'wind', 'capacity>': 1200, 'capacity<': 3500, 'postcode:': '23'}) - "Wind turbines WITHOUT EEG key"
->
search_power_generation_public({'tech': 'wind', 'eeg_key?': ''}) - "All non-wind units in postcode 49074"
->
search_power_generation_public({'tech!=': '2497', 'postcode': '49074'}) - "Power-to-Gas hydrogen plants"
->
search_gas_production_public({'gas_technology': 'Power-to-Gas (Wasserstoff)'}) - "High-voltage consumers in Bavaria"
->
search_power_consumption_public({'bundesland': 'Bayern', 'voltage_level': 'Hochspannung'}) - "Gas consumers with H-Gas that generate electricity"
->
search_gas_consumption_public({'gas_quality': 'H-Gas', 'gas_for_power': True}) - "DSOs with more than 100,000 connected customers in Lower Saxony"
->
search_actors_public({'function': 'Stromnetzbetreiber', 'dso_large': True, 'bundesland': 'Niedersachsen'}) - "Grid connection points for power generation in postcode 49074 at medium voltage"
->
search_grid_connections_public('power_generation', {'postcode': '49074', 'voltage_level': 'Mittelspannung'}) - "Gas feed-in points with H-Gas"
->
search_grid_connections_public('gas_production', {'gas_quality': 'H-Gas'})
Project Structure
Security Notes
- The MaStR token is confidential — it belongs in
.env, never in the repo. - The server only performs read operations (no registrations or modifications)
- Daily limit: 100,000 SOAP API calls per user (public JSON is unlimited)
- Only TLS 1.2 connections are accepted
License
MIT
来源:README.md,提交 7e24b6b
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分