- Home
- MCP servers
- MCP Energy Hub
MCP Energy Hub
- python
1
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"karthikravva-mcp-energy-hub": {
"command": "python",
"args": [
"/absolute/path/to/mcp-energy-hub/mcp_server.py"
],
"env": {
"EIA_API_KEY": "YOUR_API_KEY"
}
}
}
}MCP Energy Hub is an enterprise-grade server that gives AI agents real-time visibility into US power grid carbon intensity and generation mix, enabling carbon-aware compute scheduling for greener, more cost-efficient AI workloads.
How to use
You use MCP Energy Hub by connecting your AI agent or MCP client to the MCP Energy Hub server, then calling the 8 energy intelligence tools to identify green regions for your compute. The server exposes real-time grid metrics, forecasts, and actionable guidance so your workloads can run when renewables are high and carbon intensity is lowest. Use the tools to monitor current grid conditions, forecast trends, and select the best region for your compute without manual guesswork.
How to install
Prerequisites and setup steps ensure you can run the MCP Energy Hub locally or in your environment.
# Prerequisites
- Python 3.11+
- Access to an EIA API Key (free tier)
# Clone the project
git clone https://github.com/karthikravva/MCP-Energy-Hub.git
cd MCP-Energy-Hub
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment (example)
cp .env.example .env
# Edit .env and add your EIA_API_KEY value
If you plan to run the standalone MCP server, you can use the local Python-based entry point shown in the provided configuration.
## Additional content
Connecting the server to Claude Desktop or other MCP clients requires specifying the MCP server in your client configuration. The example below shows how to point a client to run the MCP Energy Hub as a stdio-based server and how to pass the EIA API key securely.
{ "mcpServers": { "energy_hub": { "command": "python", "args": ["/absolute/path/to/mcp-energy-hub/mcp_server.py"], "env": { "EIA_API_KEY": "your-api-key-here" } } } }
To connect Claude Desktop, place this in your Claude MCP settings (claude_desktop_config.json) and provide your API key in the environment field.
Available tools
get_grid_realtime
Fetches live real-time grid metrics including current load, generation mix, and regional indicators to assess immediate grid conditions.
get_grid_carbon
Returns carbon intensity data (kg CO2/MWh) for a region and provides a recommended action based on current and near-term grid carbon.
get_grid_forecast
Provides load and carbon forecasts to help plan future workloads around expected grid conditions.
list_grid_regions
Lists all grid regions available in the MCP Energy Hub coverage.
get_data_centers
Retrieves information about data centers tracked by the system for energy context and auditing.
get_data_center_energy
Provides energy consumption estimates for data centers to support auditing and optimization.
get_ai_impact
Calculates AI compute KPIs to measure AI workloads’ share of grid load and influence.
get_best_region_for_compute
Finds the greenest region for a given compute task, ranking regions by carbon intensity and renewable share to optimize for carbon and cost.