
MaStR MCP Server
io.github.UliRCSPublished by GitHub account UliRCSv1.0.1Updated Oct 24, 2026
MCP server for the German Marktstammdatenregister (MaStR) energy market register
Overview
Lets an assistant query the German Marktstammdatenregister energy market register for power and gas units, market actors, and grid connections.
- What you can do
- Provides 21 tools over the German MaStR energy register: seven public JSON search tools for power generation, power consumption, gas production, gas consumption, market actors, and grid connections, plus a connection test. With credentials, 14 additional SOAP tools add full unit details, filtered searches, market actor lookup, catalogs, balancing areas, grid connection points, recent changes, and API quota. Searches support filter operators such as equality, contains, prefix, and null checks across 20 energy carriers.
- When to use it
- Useful when an assistant needs German energy market data: plant details, capacity and postcode searches, market actors, grid connection points, or delta syncs of recent register changes. The public tools work without an account for general searches; credentials are only needed for detail queries and the extra SOAP tools.
- Requirements
- Local Python process, Python 3.10 or newer, and uv or pip. Credentials are optional: MASTR_USER (market actor number) and MASTR_TOKEN (web service token) are read from a .env file in the project directory, OS environment variables, or the client config env block. Network access to the MaStR web service is required; TLS 1.2 only.
Installation
In SourceWeft
- Open MaStR MCP Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit 7e24b6b
Tools
0Version history
1- v1.0.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts