Eia Energy MCP Server logo

Eia Energy MCP Server

Browse EIA datasets, query energy data with filters, and run read-only SQL over staged results through MCP.

Install Eia Energy MCP Server

Run the project’s own setup commands, in order.

Setup steps from the project

eia-energy-mcp-server installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Start the server
    MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 EIA_API_KEY=your-key bun run start:http
    
  2. 2. Install
    git clone https://github.com/cyanheads/eia-energy-mcp-server.git
    
  3. 3. Run
    cd eia-energy-mcp-server
    
  4. 4. Install
    bun install
    
  5. 5. Configure
    cp .env.example .env
    
  6. 6. Start the server
    bun run rebuild
    

Overview

eia-energy-mcp-server connects MCP clients to the U.S. Energy Information Administration API v2 for electricity, petroleum, natural gas, coal, and forecast data. It helps agents discover dataset routes, inspect facets and columns, search series and values, then retrieve filtered time-series data. Results can optionally be staged as DataCanvas dataframes for schema inspection and read-only SQL queries. Use it when an agent needs structured EIA data rather than a fixed, single-purpose energy lookup.

Use cases

  • Find EIA routes for a named energy series or facet value
  • Inspect route metadata before constructing a filtered query
  • Retrieve electricity, petroleum, gas, coal, or forecast time series
  • Run read-only SQL analysis over staged EIA results

Key features

  • Browse the EIA v2 dataset taxonomy
  • Search routes, series IDs, columns, and facet values
  • Query leaf routes with facets, dates, and column selection
  • Stage query results as DataCanvas dataframes
  • Run read-only SQL over staged data

Tools7

What Eia Energy MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~233 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 24d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
Last commit20d agoMost recent push to the default branch.
Tools exposed7Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Eia Energy MCP Server works

What eia-energy-mcp-server does

eia-energy-mcp-server exposes the EIA API v2 through MCP. It covers energy datasets including electricity, petroleum, natural gas, coal, forecasts, STEO, SEDS, and Monthly Energy Review series. Agents can navigate the EIA taxonomy, search for routes or series, inspect a route's metadata, and fetch data using filters and selected columns.

The server also supports an in-memory DataCanvas workflow. A query can stage its result as a dataframe, after which an agent can inspect the dataframe schema and provenance, run a read-only SQL SELECT, or release the dataframe to recover memory.

How it works

Route discovery starts at the EIA taxonomy root or at a supplied path. Browse results identify child routes and indicate which ones are leaves. Leaf routes can be described to obtain facets, valid values, columns, frequencies, and date ranges before querying.

Search accepts natural-language terms and identifiers across route metadata, data columns, facet values, and named energy series. It can resolve legacy API v1 identifiers such as PET.RWTC.W to the corresponding route and filters. Query calls then apply facet filters, date ranges, and column selection to an EIA leaf route.

The server is available over standard input/output or Streamable HTTP. A hosted endpoint is available at https://eia-energy.caseyjhand.com/mcp.

Setup and configuration

Local MCP configurations can run the package with npx and provide an EIA API key through EIA_API_KEY. The project also publishes a Docker image and provides install flows for Claude Desktop, Cursor, and VS Code.

DataCanvas is enabled by default. Setting CANVAS_PROVIDER_TYPE=none disables the dataframe tools; the Claude Desktop bundle uses that setting, so those tools are not callable or listed there. Dropping dataframes requires the additional setting EIA_DATAFRAME_DROP_ENABLED=true. The facet-value window defaults to 50 and can be adjusted with EIA_FACET_VALUE_CAP.

Tools and capabilities

  • eia_browse_routes lists top-level EIA categories or the children of a supplied route.
  • eia_describe_route reports facets, valid values, data columns, frequencies, and date ranges for a leaf route. Large facet lists can be filtered and paged.
  • eia_search_routes searches route names, descriptions, columns, series names and IDs, and facet values, including terms such as Henry Hub, WTI, and Cushing.
  • eia_query_route retrieves filtered data and can stage the result for SQL analysis.
  • eia_dataframe_describe lists active staged dataframes with their schemas and provenance.
  • eia_dataframe_query executes a read-only SQL SELECT against staged dataframes.
  • eia_dataframe_drop removes a staged dataframe when dataframe dropping is enabled.

Route tools accept path and, where supported, route as aliases. Paths are normalized, and endpoint URLs such as /data or /facet are rejected in favor of the route path.

Limitations and notes

EIA requests have a 45-second per-attempt limit and share a 56-second deadline across retries and chained requests. The server distinguishes rate limiting, transport failures, upstream outages, invalid responses, and timeouts so clients can choose a recovery action.

Facet metadata may be truncated or unavailable for a particular response and can require subsequent paging or retrying. A route's reported date range applies to its default frequency; another frequency may cover a different period. Dataframe tools consume memory while their staged results remain active, so unused dataframes should be dropped when that operation is enabled.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Eia Energy MCP Server

eia-energy-mcp-server is an MCP server that connects AI clients to the U.S. Energy Information Administration API v2. Its main tools browse and search EIA routes, describe route metadata, query filtered energy data, and optionally stage results in DataCanvas for schema inspection and read-only SQL analysis.

Install it through an MCP client using the package with `npx`, then provide `EIA_API_KEY`. The project also offers install flows for Claude Desktop, Cursor, and VS Code, plus a Docker image and a hosted Streamable HTTP endpoint.

Yes, eia-energy-mcp-server has a Cursor installation flow. Configure the server with the package command and an `EIA_API_KEY`, or connect Cursor to the hosted MCP endpoint.

Yes, it can run read-only SQL `SELECT` statements against DataCanvas dataframes created by `eia_query_route`. Use `eia_dataframe_describe` to inspect staged schemas and provenance, and `eia_dataframe_drop` to release a dataframe when dropping is enabled.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewEia Energy MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/eia-energy-mcp-server?style=directory)](https://allmcps.com/mcp/eia-energy-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/eia-energy-mcp-server"><img src="https://allmcps.com/api/badge/eia-energy-mcp-server?style=directory" alt="Eia Energy MCP Server on AllMCPs" /></a>