Browse and query the EIA API v2 β electricity, petroleum, natural gas, coal, forecasts via MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
Public Hosted Server: https://eia-energy.caseyjhand.com/mcp
Four route tools cover the two-phase EIA workflow β find the right dataset route, then pull the data. Three DataCanvas tools add SQL over staged results and are listed only where a canvas is configured (CANVAS_PROVIDER_TYPE=duckdb); eia_dataframe_drop needs its own opt-in on top. A default deployment therefore advertises four tools, all of them working:
| Tool | Description |
|---|---|
eia_browse_routes | Lists child routes under a given path in the EIA dataset taxonomy. Start at root to see top-level categories, then drill into subcategories and leaf routes. |
eia_describe_route | Returns metadata for a leaf route: available facets with valid values, data column names, frequency options, units, and date range. Call before eia_query_route to understand filter options. Facet values come back capped, with facet and values_offset to page one facet. |
eia_search_routes | Fuzzy text search across route names, descriptions, category labels, STEO series names, and facet values. Resolves natural-language queries like "electricity retail sales by state" or a fuel type like "wind" to matching route paths. |
eia_query_route | Fetches data from a leaf route with optional facet filters, date range, frequency, and column selection. Returns a preview; pass stage: true to also page past it and stage the matching rows as a DataCanvas table for SQL analysis. |
eia_dataframe_describe | Lists active DataCanvas dataframes created by prior eia_query_route calls that passed stage: true. Only exposed when a canvas is configured. Shows table name, column names and types, row count, expiry, and the query that produced it. A handle that is not staged comes back as a miss alongside the handles that are. |
eia_dataframe_query | Runs a read-only SQL SELECT across DataCanvas dataframes, referenced by their df_<id> table names. Only exposed when a canvas is configured. |
eia_dataframe_drop | Drops a DataCanvas dataframe, freeing its memory. Only exposed when a canvas is configured and EIA_DATAFRAME_DROP_ENABLED=true. |
eia_browse_routesWalk the EIA dataset taxonomy from root to leaf.
eia_describe_routeSTEO (Short-Term Energy Outlook) is a flat leaf with 1,469 named series β no sub-routeseia_describe_routeFull schema for a leaf route. Required before constructing facet filters.
EIA_FACET_VALUE_CAP values, alongside value_count and values_truncated. Pass facet with values_offset to page one facet past the cap β the cap shapes this tool's response only, and the in-process cache keeps every valuecontent[] renders every value structuredContent carries, so both name the same next callvalues_offset applies to every facet in the response. One past a facet's last value empties that facet's window and returns a notice naming the facet and its value_count, so an overshoot never reads like a fully enumerated facetcontent[] a value reads as id=name (alias), with the alias left off when it only restates the pair β EIA supplies (IN) Indiana beside IN=Indiana on most values. An alias that adds something, such as Region: (MAT) Middle Atlantic, still prints, and the alias field itself is unchangedname is labelled from its alias, then from its id β the id is what filters, so the value is kept. A value EIA sends without an id is dropped, having nothing to filter witheia_search_routes and eia_browse_routes resolve the route path; this tool provides the filter vocabularyeia_search_routesFuzzy search across the in-memory route index.
filter_hint to pass straight to eia_query_routescore runs 0 (exact) to 1 (no match), lower is better; above 0.72 the match is unreliable and the query is worth narrowing. bun run eval:search scores a labelled query battery against a live corpus, which is where that number comes fromindexComplete reports whether the answer was ranked against the whole corpus; when it is false, indexGaps names the routes and index passes that are missing, so a short result set is never mistaken for a settled oneeia_query_routePull data from a leaf route.
{ "stateid": "TX", "sectorid": ["RES", "COM"] })eia_describe_routeoffset/length (max 5,000 rows per page); total row count in response{col}-units fields per row/electricity/retail-sales/ resolves to the same route, and the response echoes the canonical form backstage: true: further pages are fetched and the accumulated rows are staged as a dataset (df_<id>) for SQL, bounded by EIA_CANVAS_MAX_ROWS. The response note names how many rows actually reached the table. Left off (the default), a query costs one upstream request however large the match is, and the note names stage: true as the way to reach the rest.Built on @cyanheads/mcp-ts-core:
none, jwt, oauthin-memory, filesystem, Supabase, Cloudflare KV/R2/D1EIA-specific:
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/eia-energy-mcp-server)<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>