# eia-energy-mcp-server [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/cyanheads/eia-energy-mcp-server  
**GitHub Stars:** 3  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/eia-energy-mcp-server

## Description
Browse and query the EIA API v2 — electricity, petroleum, natural gas, coal, forecasts via MCP.

## Tools
Capabilities this server exposes over MCP:

- **eia_browse_routes** — Lists child routes under a path in the EIA dataset taxonomy; omit `path` for the 14 top-level categories.
- **eia_describe_route** — Returns a leaf route's facets, valid values, data columns, frequencies, and date range.
- **eia_search_routes** — Fuzzy text search across route names, descriptions, data-column names, STEO, SEDS, and Monthly Energy Review series names and IDs, and facet values — including benchmark series such as Henry Hub, WTI, and Cushing. Resolves legacy APIv1 series IDs (`PET.RWTC.W`) to their route and filters.
- **eia_query_route** — Fetches data from a leaf route with facet filters, date range, and column selection; optionally stages results for SQL.
- **eia_dataframe_describe** — Lists active DataCanvas dataframes staged by `eia_query_route`, with schema and provenance.
- **eia_dataframe_query** — Runs a read-only SQL SELECT against staged DataCanvas dataframes.
- **eia_dataframe_drop** — Drops a DataCanvas dataframe, freeing its memory.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/cyanheads/eia-energy-mcp-server), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Start the server:

```sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 EIA_API_KEY=your-key bun run start:http
```

2. Install:

```sh
git clone https://github.com/cyanheads/eia-energy-mcp-server.git
```

3. Run:

```sh
cd eia-energy-mcp-server
```

4. Install:

```sh
bun install
```

5. Configure:

```sh
cp .env.example .env
```

6. Start the server:

```sh
bun run rebuild
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/eia-energy-mcp-server/readme_

