Skip to main content
Glama

REE MCP Server

by ESJavadex

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
REE_API_TOKENNoYour REE API token for accessing the Spanish electrical grid data

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
list_all_indicatorsResource providing the complete list of all REE indicators. Returns: JSON string with all indicator metadata.

Tools

Functions exposed to the LLM to take actions

NameDescription
get_indicator_data

Get time-series data for a specific electricity indicator.

Retrieves historical data for any REE indicator (demand, generation, prices, etc.) for a specified date range. Returns the data with statistical summary.

Args: indicator_id: The indicator ID (e.g., 1293 for real demand, 549 for nuclear) start_date: Start datetime in ISO format (YYYY-MM-DDTHH:MM) end_date: End datetime in ISO format (YYYY-MM-DDTHH:MM) time_granularity: Time aggregation level (raw, hour, day, fifteen_minutes)

Returns: JSON string with indicator metadata, time-series values, and statistics.

Examples: Get hourly real demand for Oct 8, 2025: >>> await get_indicator_data(1293, "2025-10-08T00:00", "2025-10-08T23:59", "hour")

Get 5-minute wind generation data: >>> await get_indicator_data(2038, "2025-10-08T00:00", "2025-10-08T03:00", "raw")
list_indicators

List all available electricity indicators from REE.

Returns metadata for all 1,967+ available indicators including their IDs, names, units, frequencies, and geographic scopes.

Args: limit: Maximum number of indicators to return (default: all) offset: Number of indicators to skip for pagination (default: 0)

Returns: JSON string with list of indicator metadata.

Examples: Get first 50 indicators: >>> await list_indicators(limit=50, offset=0)

Get all indicators: >>> await list_indicators()
search_indicators

Search for indicators by keyword in their names.

Searches through all available indicators and returns those matching the keyword in their name or short name.

Args: keyword: Keyword to search for (e.g., "demanda", "precio", "solar") limit: Maximum number of results (default: 20)

Returns: JSON string with matching indicator metadata.

Examples: Find all demand-related indicators: >>> await search_indicators("demanda", limit=10)

Find price indicators: >>> await search_indicators("precio") Find solar generation indicators: >>> await search_indicators("solar")
get_demand_summary

Get a summary of electricity demand for a specific date.

Convenience tool that fetches key demand indicators (real demand, forecast, max/min) for a given date.

Args: date: Date in YYYY-MM-DD format (default: 2025-10-08)

Returns: JSON string with demand summary.

Examples: Get today's demand summary: >>> await get_demand_summary("2025-10-11")

get_generation_mix

Get the electricity generation mix at a specific time.

Returns the power generation breakdown by source (nuclear, wind, solar, etc.) for a specific hour.

Args: date: Date in YYYY-MM-DD format hour: Hour in HH format (00-23, default: 12)

Returns: JSON string with generation mix by source.

Examples: Get generation mix at noon on Oct 8: >>> await get_generation_mix("2025-10-08", "12")

Get overnight generation mix: >>> await get_generation_mix("2025-10-08", "02")
get_international_exchanges

Get international electricity exchanges at a specific time.

Returns import/export data by country (Andorra, Morocco, Portugal, France) with net balance calculations.

Args: date: Date in YYYY-MM-DD format hour: Hour in HH format (00-23, default: 12)

Returns: JSON string with imports, exports, and net balance by country.

Examples: Get exchanges at noon on Oct 8: >>> await get_international_exchanges("2025-10-08", "12")

Get overnight exchanges: >>> await get_international_exchanges("2025-10-08", "02")
get_renewable_summary

Get renewable energy generation summary at a specific time.

Aggregates wind, solar PV, solar thermal, and hydro generation with renewable percentage calculations.

Args: date: Date in YYYY-MM-DD format hour: Hour in HH format (00-23, default: 12)

Returns: JSON string with renewable generation breakdown and percentages.

Examples: Get renewable summary at noon: >>> await get_renewable_summary("2025-10-08", "12")

Get overnight renewable summary: >>> await get_renewable_summary("2025-10-08", "02")
get_carbon_intensity

Get carbon intensity over time (gCO2/kWh).

Calculates CO2 emissions per unit of electricity generated. Lower values indicate cleaner energy mix.

Args: start_date: Start datetime in ISO format (YYYY-MM-DDTHH:MM) end_date: End datetime in ISO format (YYYY-MM-DDTHH:MM) time_granularity: Time aggregation (raw, hour, day, fifteen_minutes)

Returns: JSON string with carbon intensity time series and statistics.

Examples: Get hourly carbon intensity for a day: >>> await get_carbon_intensity("2025-10-08T00:00", "2025-10-08T23:59", "hour")

Get daily carbon intensity for a week: >>> await get_carbon_intensity("2025-10-01T00:00", "2025-10-07T23:59", "day")
compare_forecast_actual

Compare forecasted vs actual electricity demand.

Calculates forecast accuracy metrics (error, MAE, RMSE) for demand predictions.

Args: date: Date in YYYY-MM-DD format

Returns: JSON string with forecast comparison and accuracy metrics.

Examples: Compare forecast accuracy for Oct 8: >>> await compare_forecast_actual("2025-10-08")

get_grid_stability

Get grid stability metrics at a specific time.

Analyzes synchronous generation (provides inertia) vs variable renewables (no inertia) to assess grid stability risk.

Args: date: Date in YYYY-MM-DD format hour: Hour in HH format (00-23, default: 12)

Returns: JSON string with grid stability analysis.

Examples: Get grid stability at noon: >>> await get_grid_stability("2025-10-08", "12")

Check overnight stability: >>> await get_grid_stability("2025-10-08", "02")
get_generation_mix_timeline

Get generation mix over time for a full day or period.

Returns generation breakdown by source across multiple time points, useful for visualizing energy transition patterns.

Args: date: Date in YYYY-MM-DD format time_granularity: Time aggregation (hour or day, default: hour)

Returns: JSON string with generation mix timeline.

Examples: Get hourly generation mix for a day: >>> await get_generation_mix_timeline("2025-10-08", "hour")

Get daily generation mix for a month: >>> await get_generation_mix_timeline("2025-10-01", "day")
get_price_analysis

Get electricity price analysis over time.

Analyzes SPOT market prices with statistics and multi-country comparison.

Args: start_date: Start datetime in ISO format (YYYY-MM-DDTHH:MM) end_date: End datetime in ISO format (YYYY-MM-DDTHH:MM)

Returns: JSON string with price data and analysis.

Examples: Get hourly prices for a day: >>> await get_price_analysis("2025-10-08T00:00", "2025-10-08T23:59")

Get prices for a week: >>> await get_price_analysis("2025-10-01T00:00", "2025-10-07T23:59")
get_storage_operations

Get pumped storage operations for a day.

Shows pumping consumption (storing energy) and turbining (releasing energy) to identify arbitrage opportunities and storage efficiency.

Args: date: Date in YYYY-MM-DD format

Returns: JSON string with storage operations and efficiency metrics.

Examples: Get storage operations for Oct 8: >>> await get_storage_operations("2025-10-08")

get_peak_analysis

Get peak demand analysis over a period.

Analyzes daily maximum and minimum demand to identify patterns and calculate load factors.

Args: start_date: Start date in YYYY-MM-DD format end_date: End date in YYYY-MM-DD format

Returns: JSON string with peak demand analysis.

Examples: Get peak analysis for a week: >>> await get_peak_analysis("2025-10-01", "2025-10-07")

Get peak analysis for a month: >>> await get_peak_analysis("2025-10-01", "2025-10-31")

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/ESJavadex/ree-mcp'

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