# OpenEI MCP

> OpenEI lets your agent query the National Utility Rate Database for US electricity rates. You can check tariffs by street address or GPS coordinates and segment results by residential, commercial, or industrial use. Use it to model energy costs, analyze solar ROI, or compare utility charges across different locations.

## Overview
- **Category:** business-intelligence
- **Price:** Free
- **Tags:** utility-rates, electricity-tariffs, energy-analysis, solar-data, tariff-structure

## Description

You're dealing with US electricity rates? You need OpenEI. This MCP Server connects your agent straight to the National Utility Rate Database—it’s where all the official utility tariffs live. Forget digging through PDFs or outdated spreadsheets; you just tell your AI client what you need, and it handles the whole complicated rate lookup process. 

**Finding Rates by Location**

If you know exactly where you are, you don't gotta guess. You can use `get_rates_by_address` to input a simple street address; the server figures out which utility serves that location and lists all applicable rates right there. If you prefer GPS coordinates, just feed those into `get_rates_by_coordinates`. This gives your agent an instant list of residential, commercial, and industrial tariffs for that exact spot. You can also run a broader check using `get_utility_rates`, which lets you filter by rate sector—residential, commercial, or industrial—if you just have the general area.

**Deep Diving into Specific Sectors**

You'll pull dedicated structures when you need to model specific operations. For homes, you use `get_residential_rates`. This tool pulls all home electricity tariffs, covering everything from tiered rate plans and time-of-use schedules to rates designed for EV charging options. If you’re working on a business site, the `get_commercial_rates` function gives you access to general service, large power, and time-of-use commercial tariffs based on location or address. For heavy manufacturing analysis and load forecasting, you'll grab industrial electricity rates using `get_industrial_rates`. These are critical for understanding high-consumption cost centers.

**Utility Research and Mapping Service Areas**

You might not know who serves the site yet. You can start by listing all available utility companies in a region with `list_utilities`, letting you filter results by state, country, or company name to map out service territories. If you only catch part of a business name, no sweat—you use `search_utilities_by_name` to find the matching utility and its ID number. Once you have the company ID, `get_utility_detail` gives you the full rundown: their service territory boundaries, contact info, and even what mix of power sources they’re using. You'll also pull specific details on a single tariff structure using `get_rate_detail`, which returns the complete cost breakdown—that means fixed charges, demand charges, and how seasonal variations impact the bill.

**Modeling Energy Costs and Feasibility Data**

When you run these rates through your agent, you're not just getting a list of numbers. You're building models. The data allows you to analyze complex rate structures like time-of-use periods and demand charges for accurate cost modeling. For site proposals or solar ROI calculations, the available tariffs let you get quotes tailored specifically for net metering and energy efficiency analysis. By combining location searches with sector-specific rates, you'll walk away knowing exactly what a client's utility costs are across residential, commercial, and industrial uses anywhere in the country.

## Tools

### get_commercial_rates
Gets all available commercial tariffs (general service, large power, time-of-use) for a location using lat/lon or address.

### get_industrial_rates
Retrieves industrial electricity rates, which are useful for heavy manufacturing cost analysis and load forecasting.

### get_rate_detail
Returns the complete rate structure—including fixed charges, demand charges, and seasonal variations—for a specific utility tariff ID.

### get_utility_rates
Finds applicable rates for any location (by address or coordinates) and allows filtering by rate sector: residential, commercial, or industrial.

### get_rates_by_address
Takes a street address as input to identify the serving utility and return all applicable rates at that exact location.

### get_rates_by_coordinates
Accepts GPS coordinates to automatically find and list available residential, commercial, and industrial tariffs for that spot.

### get_residential_rates
Retrieves all home electricity tariffs, covering tiered rates, time-of-use plans, and EV charging options.

### get_utility_detail
Provides detailed info on a utility company, including its service territory, contact details, and generation mix.

### list_utilities
Lists utility companies in the database, allowing you to filter results by state, country, or company name.

### search_utilities_by_name
Finds matching utility companies and their IDs when you only know part of the business name.

## Prompt Examples

**Prompt:** 
```
What are the residential electricity rates at 1617 Cole Blvd, Golden, CO?
```

**Response:** 
```
I found 5 residential rate options at that address served by Xcel Energy. The standard residential rate is $0.142/kWh with a tiered structure. There's also a time-of-use plan with peak hours at $0.198/kWh and off-peak at $0.089/kWh. Here are the complete rate details.
```

**Prompt:** 
```
Show me all utilities in California and their average commercial rates.
```

**Response:** 
```
I found 127 utilities in California. The largest include PG&E (avg $0.231/kWh), SCE (avg $0.218/kWh), and SDG&E (avg $0.267/kWh). California has some of the highest electricity rates in the US. Here's the complete list with rate averages.
```

**Prompt:** 
```
Get the complete rate structure for commercial time-of-use rates from PG&E.
```

**Response:** 
```
I retrieved the complete PG&E E-19 commercial time-of-use rate structure. It has 4 seasonal periods (Summer Peak, Summer Off-Peak, Winter Peak, Winter Off-Peak) with energy charges ranging from $0.147 to $0.326/kWh. Demand charges are $18.76/kW in summer and $12.54/kW in winter. Here's the full breakdown.
```

## Capabilities

### Identify rates by location
Find all available tariffs—residential, commercial, and industrial—by providing a street address or GPS coordinates.

### Model specific rate types
Pull dedicated rate structures for commercial operations (`get_commercial_rates`) or heavy manufacturing facilities (`get_industrial_rates`).

### Deep-dive into tariff structure
Get the full cost breakdown of any identified rate ID, including demand charges and time-of-use periods.

### Research utility companies
Search for specific power companies or list all utilities serving an area to map service territories.

### Calculate solar feasibility data
Get rate quotes tailored for calculating ROI and net metering, perfect for site proposals.

## Use Cases

### Calculating ROI for a new commercial client.
A facility manager needs to bid on a warehouse project. They use `get_rates_by_address` first, confirming the utility and general rates. Then, they call `get_commercial_rates` and follow up with `get_rate_detail` to nail down demand charges for their final proposal.

### Mapping out a new solar installation territory.
A consultant needs to check 50 potential sites. Instead of manual lookups, they use the agent with `get_rates_by_coordinates` across all points. This quickly flags if any area uses specialized tariffs or requires deep investigation.

### Understanding why a factory's bill is so high.
An operations engineer gets an unexpected utility bill. They feed the location data into `get_utility_rates` and then use `get_rate_detail` to see if they are being charged maximum demand rates or missing seasonal variations.

### Comparing local residential options.
A homeowner wants to go solar but isn't sure about the best plan. They ask for `get_residential_rates` by their address, allowing them to compare tiered plans and time-of-use structures side-by-side.

## Benefits

- Stop guessing on site bids. Use `get_rates_by_address` to get instant, accurate rate quotes for solar ROI calculations right from the client's street address.
- Understand complex industrial billing. `get_industrial_rates` provides critical data points like demand charges and power factor adjustments needed for heavy manufacturing models.
- Compare rates across sectors effortlessly. Instead of running separate queries, use `get_utility_rates` to pull residential, commercial, and industrial tariffs from one location lookup.
- Get the full story on a tariff. When you nail down a rate ID, always run `get_rate_detail`. This tool gives you the complete breakdown—fixed charges, seasonal shifts, everything.
- Research without limits. Use `list_utilities` or `search_utilities_by_name` to map out which utilities actually serve a region before running cost models.

## How It Works

The bottom line is: OpenEI lets your AI client pull complex, location-specific energy cost data into plain conversation.

1. First, tell your agent where you need rates. Give it an address (e.g., '123 Main St') or coordinates (lat/lon).
2. Next, specify what kind of rate structure you want: residential, commercial, or industrial. The tool finds the serving utility and returns initial options.
3. Finally, if you need details like demand charges or time-of-use periods, ask your agent to run a deep dive using `get_rate_detail` on the specific tariff ID.

## Frequently Asked Questions

**How do I find rates for both residential and commercial use with OpenEI?**
You can run `get_utility_rates` and specify both sectors. Alternatively, you can run `get_residential_rates` and then separately call `get_commercial_rates` using the same location data.

**Can I use OpenEI to check rates just by coordinates?**
Yes. Use `get_rates_by_coordinates`. This tool automatically identifies the serving utility and returns applicable tariffs for residential, commercial, and industrial uses at that GPS point.

**What is the best way to get full tariff details using OpenEI?**
You must use `get_rate_detail`. This tool requires a specific rate ID you find first (e.g., from `get_utility_rates`) and then gives the exhaustive breakdown of all charges.

**Does OpenEI cover multiple utilities in one search?**
Yes. You can use `list_utilities` or `search_utilities_by_name` first to map out which companies exist in a region, and then run specific rate lookups against them.

**How do I properly authenticate OpenEI when connecting to my AI client?**
You must provide your unique OpenEI API Key during setup. Your agent uses this key to authorize every request, ensuring you access the National Utility Rate Database securely and keep usage tracked.

**If I only know a general area, how can I use OpenEI to find potential utilities?**
Use the `list_utilities` tool. You can filter results by state or country to get a list of available companies and their service territories, which is useful for initial research.

**What happens if I run OpenEI's rate tools with an invalid address?**
The server will return a specific geocoding error. Your AI client should catch this error and prompt you to try coordinates or search by utility name instead.

**What data does the `get_utility_detail` tool provide beyond basic contact info?**
It returns comprehensive details, including the utility's service territory, owned generation resources, and a summary of all associated rates. This helps you understand their full operational scope.

**How do I find electricity rates for my address?**
Use the `get_rates_by_address` tool with your full street address. The API will geocode your location and return all applicable utility rates (residential, commercial, industrial). For example, enter '1617 Cole Blvd, Golden, CO 80401' to see rates from Xcel Energy and other providers serving that area.

**What's the difference between residential, commercial, and industrial rates?**
Residential rates (sector 1) are for homes and typically have simple tiered or time-of-use structures. Commercial rates (sector 2) serve businesses and include general service and large power tariffs with demand charges. Industrial rates (sector 3) are for heavy manufacturing with the lowest per-kWh costs but complex demand and power factor adjustments. Use the specific sector tools or filter with the sector parameter.

**Can I get complete rate structures with time-of-use details?**
Yes. Set the detail parameter to 'full' when calling get_utility_rates or get_rate_detail. This returns the complete tariff structure including energyratestructure (time-of-use periods and seasonal blocks), demandratestructure, fixed charges, minimum charges, and tax adjustments. Essential for accurate solar ROI calculations and detailed energy cost modeling.