EIA logo

EIA

Live

U.S. Energy Information Administration API integration for comprehensive energy data including electricity, natural gas, coal, petroleum, and energy outlooks.

What is EIA?

U.S. Energy Information Administration (EIA) API integration provides access to official U.S. energy statistics, market analysis, and forecasting data. Query electricity retail sales, natural gas production and storage, coal consumption, petroleum imports/exports, Short-Term Energy Outlook (STEO), Annual Energy Outlook (AEO), International Energy Outlook (IEO), State Energy Data System (SEDS), CO2 emissions, nuclear outages, and total energy statistics. Access 200+ datasets with flexible filtering, date ranges, and pagination through both direct MCP tools and JavaScript/TypeScript code execution.

Available Tools

  • getRoutes
    Get available routes for a dataset or list all top-level routes. Discover available datasets and their structure. Call with no arguments to see all top-level categories (electricity, natural-gas, petroleum, coal, etc.).
  • getData
    Get data from any dataset route with filtering and pagination. Supports date ranges (start/end), facets for filtering, frequency (annual/monthly/quarterly/daily), sorting, and pagination (length/offset). This is the universal data retrieval function.
  • getFacets
    Get available filter options (facets) for a dataset. Discover what filters are available for a specific dataset before querying. Returns facet names and their descriptions.
  • getFacetDetails
    Get available values for a specific facet. See all possible filter values for a particular facet (e.g., state IDs, sector codes, fuel types). Essential for building accurate filtered queries.
  • getElectricityData
    Convenience function for electricity datasets including retail-sales, facility-fuel, operating-generator-capacity, state-electricity-profiles, and electric-power-operational-data. Simplifies electricity data queries.
  • getNaturalGasData
    Convenience function for natural gas datasets including summary, storage (underground/LNG), production, consumption, imports/exports, and price data. Supports nested routes for detailed categories.
  • getCoalData
    Convenience function for coal datasets including aggregate-production, consumption-and-quality, exports, imports, mine-production, price, shipments, and stocks data.
  • getPetroleumData
    Convenience function for petroleum datasets including crude-oil-imports, crude-oil-production, exports, imports, prices, product-supplied, refinery-operations, reserves, and weekly stocks data.
  • getSTEOData
    Get Short-Term Energy Outlook (STEO) data for near-term energy market forecasts and projections. Covers prices, supply, demand, and consumption projections for all major energy sources.
  • getAEOData
    Get Annual Energy Outlook (AEO) data for long-term energy projections (25+ years). Includes reference cases and alternative scenarios for comprehensive energy planning.
  • getIEOData
    Get International Energy Outlook (IEO) data for global energy projections. Covers international energy consumption, production, and trade by region and fuel type.
  • getSEDSData
    Get State Energy Data System (SEDS) data for state-level energy statistics. Comprehensive state-by-state energy production, consumption, prices, and expenditures.
  • getTotalEnergyData
    Get Total Energy data for overall U.S. energy statistics. Monthly and annual energy production, consumption, imports, exports, and stocks across all energy sources.
  • getCO2EmissionsData
    Get CO2 Emissions data including aggregates by sector and fuel type, carbon coefficients, and emissions intensities. Essential for carbon footprint and sustainability analysis.
  • getInternationalData
    Get International energy data covering global energy statistics by country and region. Production, consumption, reserves, and trade data for major energy sources worldwide.
  • getNuclearOutagesData
    Get Nuclear Outages data including facility-level outages, generator capacity factors, and U.S. nuclear aggregates. Track nuclear plant availability and maintenance schedules.
  • Code Execution
    Execute custom JavaScript/TypeScript code with full EIA connector access. Build complex queries, aggregate data across multiple datasets, perform calculations, create visualizations, and build custom workflows using all available EIA API methods.

Requirements

  • EIA API key
    Free API key from EIA Open Data (register at https://www.eia.gov/opendata/)
  • No subscription required
    EIA data is publicly available at no cost
  • Compatible AI agent
    Works with Claude, ChatGPT, and other MCP-compatible agents

Quick Setup Guide

Follow these steps to connect your AI agents to this connector

Sign up for PatchOps to access our MCP server management platform.

Register for a free API key at https://www.eia.gov/opendata/ - it only takes a minute and is completely free.

Navigate to the Dashboard and add your EIA API key to establish the connection.

Add the EIA MCP server URL to your AI agent's configuration file.

Begin asking your AI agent questions about U.S. energy statistics, market trends, and forecasts. Use direct MCP tools for standard queries or leverage code execution for complex data analysis and custom workflows.

Connect to Your AI Assistant

Choose your AI assistant below for specific setup instructions

Follow these steps to connect EIA to Claude:

Step 1: Open Claude Settings

Launch Claude → Click the profile button (bottom left) → Navigate to Settings

Step 2: Access Connectors

Scroll down to the Connectors tab → Navigate to the bottom → Click “Add Custom Connector”

Step 3: Name Your Connector

Enter any name you'd like for this connector

Step 4: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 5: Add the Connector

Paste the URL in the “Remote MCP Server URL” text box → Click Add

Step 6: Start Using

Your connector is now ready to use in Claude

Follow these steps to connect EIA to ChatGPT:

Step 1: Enable Developer Mode

Go to Settings → Connectors → Advanced → Enable Developer mode

Step 2: Create New Connector

Go back to Connectors page → Click “Create” (top right)

Step 3: Name Your Connector

Enter any name you'd like for this connector (descriptions are optional)

Step 4: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 5: Add the URL

Paste the URL in the “MCP Server URL” text box

Step 6: Set Authentication

Click the authentication dropdown → Select “No authentication” (PatchOps handles authentication internally)

Step 7: Create the Connector

Click “I understand and want to continue” checkbox → Press Create

Step 8: Using the Connector

Start a new chat → Click the + button (left of text box) → Open dropdown → Hover over three dots labeled “More” → Select your connector

Instructions for connecting EIA to GitHub Copilot:

Coming Soon

Detailed setup instructions for GitHub Copilot will be added here.

For other MCP-compatible platforms:

Step 1: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 2: Add to Configuration

Add this configuration to your MCP settings file. Replace the URL with your specific connector URL from the /mcp page:

"EIA-MCP": {
  "url": "https://...patchops.ai/mcp/...",
  "type": "http"
}

Example Configuration

Here’s an example using Cambria-MCP:

"Cambria-MCP": {
  "url": "https://cambria.patchops.ai/mcp/...",
  "type": "http"
}