
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 分