Skip to main content
ClaudeWave
cyanheads avatar
cyanheads

eia-energy-mcp-server

View on GitHub

Browse and query the U.S. Energy Information Administration API v2 — electricity, petroleum, natural gas, coal, forecasts, and more via MCP. STDIO or Streamable HTTP.

MCP ServersOfficial Registry2 stars1 forksTypeScriptNOASSERTIONUpdated today
ClaudeWave Trust Score
80/100
Trusted
Passed
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
  • Documented (README)
Flags
  • !Licence file present but not machine-readable
Last scanned: 9/20/2026
Install in Claude Code / Claude Desktop
Method: Manual
Claude Code CLI
git clone https://github.com/cyanheads/eia-energy-mcp-server
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "eia-energy": {
      "command": "node",
      "args": ["/path/to/eia-energy-mcp-server/dist/index.js"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Clone https://github.com/cyanheads/eia-energy-mcp-server and follow its README for install instructions.
Use cases

MCP Servers overview

<div align="center">
  <h1>@cyanheads/eia-energy-mcp-server</h1>
  <p><b>Browse and query the U.S. Energy Information Administration API v2 — electricity, petroleum, natural gas, coal, forecasts, and more via MCP. STDIO or Streamable HTTP.</b>
  <div>4 core tools + 3 DataCanvas tools</div>
  </p>
</div>

<div align="center">

[![Version](https://img.shields.io/badge/Version-0.4.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/eia-energy-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/eia-energy-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/eia-energy-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)

[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/eia-energy-mcp-server/releases/latest/download/eia-energy-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=eia-energy-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvZWlhLWVuZXJneS1tY3Atc2VydmVyIl0sImVudiI6eyJFSUFfQVBJX0tFWSI6InlvdXItYXBpLWtleSJ9fQ==) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22eia-energy-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads/eia-energy-mcp-server%22%5D%2C%22env%22%3A%7B%22EIA_API_KEY%22%3A%22your-api-key%22%7D%7D)

[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)

</div>

<div align="center">

**Public Hosted Server:** [https://eia-energy.caseyjhand.com/mcp](https://eia-energy.caseyjhand.com/mcp)

</div>

---

## Overview

Energy data from the U.S. Energy Information Administration (EIA) API v2 — electricity, petroleum, natural gas, coal, and forecasts. Browse the dataset taxonomy, search it by natural language, and query time-series data with facet filters, then stage large result sets as a SQL-queryable DataCanvas table. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.

### Tools

| Tool | Description |
|:-----|:------------|
| `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, STEO series names, and facet values. |
| `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. |

The three `eia_dataframe_*` tools are registered only when `CANVAS_PROVIDER_TYPE=duckdb` is set; `eia_dataframe_drop` additionally requires `EIA_DATAFRAME_DROP_ENABLED=true`. A default deployment lists the first four tools.

## Capability reference

### `eia_browse_routes` <sub>tool</sub>

- Omit `path` for the 14 top-level categories (electricity, petroleum, natural-gas, coal, international, total-energy, steo, aeo, ieo, seds, crude-oil-imports, nuclear-outages, densified-biomass, co2-emissions); pass a path to drill into subcategories
- Each child carries `isLeaf` — leaf routes are queryable via `eia_describe_route` / `eia_query_route`; non-leaf routes have further children to browse
- `steo` is a flat leaf with 1,469 named series and no sub-routes
- Accepts `route` as an alias for `path`; supplying both is rejected. Leading, trailing, and doubled slashes are stripped before resolving
- `route_not_found` when the path does not exist in the taxonomy

---

### `eia_describe_route` <sub>tool</sub>

- Returns facets (with valid values), data column names/units, frequency options, and date range for a leaf `route`; accepts `path` as an alias, but not alongside `route`
- Each facet is capped at `EIA_FACET_VALUE_CAP` values (default 50), with `value_count` and `values_truncated`; page one facet with `facet` + `values_offset`
- A `values_offset` past a facet's last value returns an empty window plus a `notice` naming the facet and its `value_count`, rather than reading as an exhausted enumeration
- Errors: `route_not_found`, `route_not_queryable` (category node, not a leaf), `facet_not_found`, `rate_limited` (retryable)

---

### `eia_search_routes` <sub>tool</sub>

- Fuzzy match over route names/descriptions, STEO's 1,469 series names, and facet values; `limit` caps results (default 10, max 30)
- `score` runs 0 (exact) to 1 (no match); above 0.72 is a weak match — narrow the query or use `eia_browse_routes`
- Matching facet-value or STEO results carry `filter_hint`, a ready-to-use filter object for `eia_query_route`
- The first call after server start waits 24–30 s (never more than 45 s) for the index to warm; every later call is served from the in-process index in milliseconds
- `indexComplete` / `indexGaps` report whether the corpus was complete when scored — check before trusting a short result set

---

### `eia_query_route` <sub>tool</sub>

- Takes `route` (or alias `path`, never both), facet filters keyed by facet ID (from `eia_describe_route`), plus optional `columns`, `frequency`, `start`/`end`, and `sort`
- `offset`/`length` page the inline preview (`length` default 100, max 5000 per EIA's per-request ceiling); `total` reports the full match count
- Data values arrive as strings; per-column units appear as inline `{col}-units` fields
- `stage: true` pages past the preview and stages the accumulated rows as a DataCanvas `df_<id>` table (bounded by `EIA_CANVAS_MAX_ROWS`, default 25000) for `eia_dataframe_query`; omitted, the call costs one upstream request regardless of `total`
- Errors: `route_not_found`, `route_not_queryable`, `invalid_facet` / `invalid_column` / `invalid_frequency` / `invalid_sort` / `invalid_period`, `no_data` (inverted date range), `rate_limited` (retryable)

---

### `eia_dataframe_describe` <sub>tool</sub>

- Lists DataCanvas dataframes staged by prior `eia_query_route` calls with `stage: true`; only registered when `CANVAS_PROVIDER_TYPE=duckdb`
- Omit `name` to list every active dataframe for the tenant; pass `name` to check one — a miss comes back as `found: false` alongside `active_names`, never as an empty list
- Each entry reports `source_tool`, `query_params`, `created_at`, `expires_at`, `row_count`, `truncated` / `max_rows`, and `column_schema`
- Listing does not extend a dataframe's expiry — only an `eia_dataframe_query` statement referencing it does
- `canvas_unavailable` when no canvas is configured

---

### `eia_dataframe_query` <sub>tool</sub>

- Runs one read-only SQL SELECT against `df_<id>` tables; writes, DDL, `DROP`, `COPY`, `PRAGMA`, `ATTACH`, and system catalogs (`information_schema`, `pg_catalog`, `sqlite_master`, `duckdb_*`) are rejected
- `row_limit` (default 1000, max 10000) hard-caps materialized rows — rows past it are dropped uncounted, so `totalRows` becomes the cap, not a true total; `preview` separately narrows the inline slice without affecting the count
- `register_as` persists the result as a new dataframe with a fresh expiry; the name must be unused
- EIA data columns are VARCHAR — cast with `CAST(col AS DOUBLE)` for arithmetic
- Errors: `canvas_unavailable`, `system_catalog_access`, `missing_table`, `non_select_statement`, `invalid_sql`, `register_as_clash`

---

### `eia_dataframe_drop` <sub>tool</sub>

- Drops a dataframe by `name`; idempotent — returns `dropped: false` when nothing matched
- Only registered when `EIA_DATAFRAME_DROP_ENABLED=true` and `CANVAS_PROVIDER_TYPE=duckdb`
- Manual cleanup only — the per-dataframe expiry (default 24 h, extended by every referencing query) handles cleanup in normal operation
- `canvas_unavailable` when no canvas is configured

## Features

Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): stdio and Streamable HTTP transports, pluggable auth (`none` / `jwt` / `oauth`), swappable storage (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`), structured logging with optional OpenTelemetry tracing.

EIA-specific:

- Full coverage of EIA API v2's 14 top-level dataset categories, via an in-process route tree cache built once on first use
- Fuzzy search index (Fuse.js) covers route names/descriptions, all 1,469 STEO series names, and facet values for natural-language discovery
- Per-route facet metadata is fetched by fan-out (`Promise.all`) and cached, so `eia_query_route` filters are validated without re-fetching
- A route whose metadata could not be fetched is held as an incomplete stub — reported through `eia_search_routes` rather than silently dropped — and re-fetched on the next `eia_browse_routes` call that reaches it
- DataCanvas (DuckDB) staging is opt-in per call; the three dataframe tools are gated at registration so a canvas-less deployment lists no tool it cannot serve
ai-agentbuncoalcyanheadseiaelectricityenergy-apienergy-datamcpmcp-servermodel-context-protocolnatural-gaspetroleumsteotypescriptus-energy

What people ask about eia-energy-mcp-server

What is cyanheads/eia-energy-mcp-server?

+

cyanheads/eia-energy-mcp-server is mcp servers for the Claude AI ecosystem. Browse and query the U.S. Energy Information Administration API v2 — electricity, petroleum, natural gas, coal, forecasts, and more via MCP. STDIO or Streamable HTTP. It has 2 GitHub stars and its last recorded update is dated 2026-09-19.

How do I install eia-energy-mcp-server?

+

You can install eia-energy-mcp-server by cloning the repository (https://github.com/cyanheads/eia-energy-mcp-server) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is cyanheads/eia-energy-mcp-server safe to use?

+

Our security agent has analyzed cyanheads/eia-energy-mcp-server and assigned a Trust Score of 80/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.

Who maintains cyanheads/eia-energy-mcp-server?

+

cyanheads/eia-energy-mcp-server is maintained by cyanheads. The last recorded GitHub activity is dated 2026-09-19, with 7 open issues.

Are there alternatives to eia-energy-mcp-server?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy eia-energy-mcp-server to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: cyanheads/eia-energy-mcp-server
[![Featured on ClaudeWave](https://claudewave.com/api/badge/cyanheads-eia-energy-mcp-server)](https://claudewave.com/repo/cyanheads-eia-energy-mcp-server)
<a href="https://claudewave.com/repo/cyanheads-eia-energy-mcp-server"><img src="https://claudewave.com/api/badge/cyanheads-eia-energy-mcp-server" alt="Featured on ClaudeWave: cyanheads/eia-energy-mcp-server" width="320" height="64" /></a>

More MCP Servers

eia-energy-mcp-server alternatives