Skip to main content
Glama

eia-energy-mcp-server

Server Details

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

If you are the author of this connector, you can claim ownership. Claimed connector authors can inspect health checks, view analytics, and manage their listing.
Status
Healthy
Uptime
100.0% over the last 24 hours
Last Tested
Transport
Streamable HTTP · MCP 2025-11-25
URL
Repository
cyanheads/eia-energy-mcp-server
GitHub Stars
3
Server Listing
@cyanheads/eia-energy-mcp-server
ChatGPT
–
Claude
–

TDQS

A4.4/5.0

Scored across 6 tools

Disambiguation4/5

The three discovery tools (browse, search, describe) target the same taxonomy but are cleanly separated by intent: browse walks the tree, search does fuzzy natural-language resolution, describe inspects a leaf's facets/columns. The two dataframe tools split cleanly into schema inspection versus SQL execution. Only minor overlap remains between search and browse for locating a route, which the descriptions mitigate by giving explicit handoff guidance.

Naming Consistency4/5

All six names share an `eia_` prefix and a verb_noun structure (browse_routes, describe_route, query_route, search_routes). The only wrinkle is the noun/verb ordering inconsistency between `eia_describe_route`/`eia_query_route` and `eia_dataframe_describe`/`eia_dataframe_query`. Still highly predictable and readable.

Tool Count5/5

Six tools map exactly onto the workflow stages: discover (browse/search/describe), fetch (query), and analyze (dataframe_describe/dataframe_query). Nothing feels redundant or missing at the structural level, and the count is well within the comfortable range.

Completeness4/5

The surface covers the full lifecycle from route discovery through metadata inspection, data fetching, staging, and SQL analysis, with paging handled via register_as plus LIMIT/OFFSET. Minor gaps: no explicit dataframe cleanup/drop or export tool, and no direct way to combine routes without staging first, though those are workable.

Available Tools

6 tools
eia_browse_routesBrowse EIA RoutesA
Read-only
Inspect

Lists child routes under a given path in the EIA dataset taxonomy. Start with no path to get the 14 top-level categories (electricity, petroleum, natural-gas, steo, aeo, ieo, seds, etc.), then drill into subcategories. Each result includes an isLeaf flag — leaf routes are queryable endpoints; non-leaf routes have children to browse. When isLeaf is true on the browsed path itself, switch to eia_describe_route. The first call after server start waits up to 20s for the route tree to warm, then answers from EIA directly.

Inputs: path. Returns: path, error, isLeaf, children

eia_dataframe_describeDescribe EIA DataframesA
Read-onlyIdempotent
Inspect

List canvas dataframes (df_) materialized by eia_query_route calls that passed stage: true, with provenance, expiry, row count, and column schema. Nothing is staged until such a call runs, so an empty list on a fresh session means no query has staged yet, not that staging failed. Drops entries for dataframes the canvas no longer holds before responding, so the list is always current. Pass a specific name to inspect one dataframe; omit to list all active dataframes for this tenant. A name that is not staged comes back as found=false alongside the handles that are, never as an empty list. Listing is not use: only an eia_dataframe_query statement naming a dataframe extends its expiry, so a dataframe polled with this tool and never queried still lapses on schedule.

Inputs: name. Returns: error, found, dataframes, active_names, +1 more

eia_dataframe_queryQuery EIA DataframesA
Read-onlyIdempotent
Inspect

Run a single-statement SELECT against canvas dataframes registered by eia_query_route calls that passed stage: true — a query that staged nothing leaves no table to select from. Standard DuckDB SQL — joins, aggregates, window functions, CTEs all supported. Reference dataframes by the df_ handles returned by eia_query_route or listed by eia_dataframe_describe. Read-only: writes, DDL, DROP, COPY, PRAGMA, ATTACH, file reads (read_* functions or a quoted file path), engine-setting functions (current_setting), and SQL built from a string (query_table) are rejected. System catalogs are denied: information_schema, pg_catalog, and the DuckDB internal metadata views (duckdb_tables, duckdb_columns, and the other duckdb_ views; sqlite_master and the other sqlite_ views; pragma_database_list; pg_class, pg_tables, and the other pg_ views) are refused as whole words anywhere in the statement outside string literals and comments, column aliases and CTE names included, as is any duckdb_() call. A register_as name spelled like one of them is refused, since no statement could select from a table so named. EIA data values are VARCHAR — use CAST(col AS DOUBLE) for arithmetic and aggregation. Optional register_as chains results as a new dataframe with a fresh expiry. Every dataframe named in the statement has its expiry extended by the query. Inline rows stop at preview; a result cut short says how to reach the rest, including paging a register_as table with LIMIT/OFFSET and no ORDER BY, which keeps the order the preview showed.

Inputs: sql (required), preview, row_limit, register_as. Returns: rows, error, notice, columns, +6 more

eia_describe_routeDescribe EIA RouteA
Read-only
Inspect

Returns metadata for a leaf route: available facets with their valid values, data column names and units, frequency options, and date range. Call this before eia_query_route to discover valid facet IDs, facet values, column IDs, and frequency codes. Each facet returns a capped window of its values with value_count and values_truncated alongside; pass facet and values_offset to page through the rest of one facet. To find a value by name in a large facet (plant, entity, and mine IDs run to thousands), pass values_query: each facet keeps only the values whose id, name, or alias contains it — on a balancing-authority facet, also a value whose ISO/RTO acronym does, so "ERCOT" finds ERCO — values_matched counts them, and values_offset pages the matches. A values_offset past the last value of a facet returns an empty window for it and a notice naming the count to page against. Facet values are fetched from separate EIA endpoints, merged, and cached per route for 24 hours, after which the next call fetches the route again; a facet whose values EIA did not return is left out of facets, named in unavailable_facets, and fetched again by the next call. When a refresh fails, the cached values are served instead, with a notice naming when they were fetched.

Inputs: route (required), facet, values_query, values_offset. Returns: error, route, facets, notice, +9 more

eia_query_routeQuery EIA Route DataA
Read-only
Inspect

Fetches data from a leaf route with optional facet filters, date range, frequency, and column selection. Use eia_describe_route first to discover valid facet IDs, facet values, column IDs, and frequency codes. Data values are strings in the response (EIA API returns all numeric values as strings, e.g. "9.13"); cast to DOUBLE in SQL when arithmetic is needed. Returns a preview inline and stages nothing by default — one upstream request, whatever total says. Pass stage: true to also page past the preview and stage the accumulated set as a DataCanvas table, then pass the returned dataset name to eia_dataframe_describe for its column names and eia_dataframe_query for SQL. Every dataset a tenant stages lands in the same canvas, so tables from different routes cross-join by name with nothing to thread between calls.

Inputs: route (required), end, sort, stage, +6 more. Returns: data, error, route, total, +19 more

eia_search_routesSearch EIA RoutesA
Read-only
Inspect

Fuzzy text search across route names, descriptions, category labels, and the names of the data columns a route publishes. Resolves natural-language queries like "electricity retail sales by state" or "natural gas imports" to matching route paths, and a measure named only by its column — "nameplate capacity", "gross generation" — to the route that publishes it. Multi-term queries are also matched term by term, so combining a commodity, a metric, and a sector — "electricity price residential", "coal generation industrial sector" — reaches the route carrying that data even when no single entry reads like the whole phrase. A query spelling the end of a route path in words — "retail sales" for electricity/retail-sales — ranks that route first. STEO, SEDS, and Monthly Energy Review (total-energy) series names are indexed so queries like "crude oil production forecast", "motor gasoline total consumption", or "primary energy consumption total" also resolve — a series also by its ID, such as "PATCPUSX", "MGTCB", or "TETCBUS" — and so are facet values, so a fuel type or sector term like "wind" or "anthracite coal" resolves to the route that exposes it, with filter_hint carrying the filter to pass on. That includes the series and product names of the daily and weekly petroleum and natural-gas routes and the RTO balancing authorities, so benchmarks like "Henry Hub", "WTI crude spot price", "Cushing", or "Electric Reliability Council of Texas" resolve before any describe; a balancing authority also answers to its EIA code or its ISO/RTO acronym ("ERCO", "ERCOT", "CAISO", "SPP"). A legacy APIv1 series ID as the EIA website and Excel add-in write them — "PET.RWTC.W", "ELEC.PRICE.TX-RES.M" — is resolved through the EIA series lookup into one result with its route, filter_hint, frequency, and columns, ready for eia_query_route, without waiting on the index. Results include isLeaf so you know whether to browse further or query directly. Results with score > 0.72 are weak matches — try a more specific query or use eia_browse_routes to explore the taxonomy. The first call after server start waits 20-40s while the index warms, and at most 45s; later calls answer from the built index. Check indexComplete before reading anything into a short or empty result set.

Inputs: query (required), limit. Returns: cap, error, shown, notice, +6 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides access to comprehensive U.S. and international energy data from the EIA API, including electricity, natural gas, petroleum, coal, renewables, CO2 emissions, and energy forecasts.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A FastMCP server that wraps the U.S. Energy Information Administration Open Data API v2, enabling natural-language queries for electricity, petroleum, and other energy statistics via tools like discover_eia_route and get_eia_data.
      -
    • F
      license
      A
      quality
      D
      maintenance
      An MCP server that exposes the U.S. Energy Information Administration (EIA) Open Data API, enabling LLMs to browse and query energy data across 17 datasets with generic, composable tools.
      4
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that wraps the U.S. Energy Information Administration's Open Data API, enabling assistants to fetch live energy data via natural language. It provides tools for querying series, browsing data routes, filtering facets, and running custom queries.
      MIT
    Try in Browser

    Glama MCP Gateway

    Add one secure layer between your agents and this server.