
Eia Energy Mcp Server
Connects Claude to the U.S. Energy Information Administration's v2 API with seven tools covering the full query workflow. Browse the 14 top-level dataset categories (electricity, petroleum, natural gas, coal, forecasts), search 1,469 STEO series by fuzzy text, describe route schemas with facet vocabularies, then pull filtered data by state, sector, or date range. Query results spill to DuckDB tables when they exceed page limits, so you can run SQL over large datasets. Handles the EIA's string-formatted numerics and per-row unit fields. Useful when you need structured energy data for analysis, dashboards, or policy research without manually navigating the API docs.
- GitHub stars
- 3
- tools
- 6
- auth
- Required
- transport
- STDIO, HTTP
- env vars
- 14
- last updated
- Nov 4, 2026
Install
From registry metadata$ npx add-mcp https://eia-energy.caseyjhand.com/mcp --name eia-energyRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http eia-energy https://eia-energy.caseyjhand.com/mcpRun in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 6 toolsVerified live against the running server on Nov 6, 2026.
eia_browse_routesLists 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 quer...1 params
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 quer...
pathstringeia_describe_routeReturns 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...4 params
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...
facetstringroute*stringvalues_offsetintegervalues_querystringeia_search_routesFuzzy 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 it...2 params
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 it...
limitnumberquery*stringeia_query_routeFetches 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 numeri...10 params
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 numeri...
columnsarrayendstringfiltersobjectfrequencystringlengthnumberoffsetintegerroute*stringsortarraystagebooleanstartstringeia_dataframe_describeList canvas dataframes (df_<id>) 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...1 params
List canvas dataframes (df_<id>) 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...
namestringeia_dataframe_queryRun 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...4 params
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...
previewnumberregister_asstringrow_limitnumbersql*stringSponsors
Configuration
EIA_API_KEY*Free API key from api.eia.gov. Required — all requests use this as the api_key query parameter.
EIA_DATASET_TTL_SECONDSdefault: 86400Sliding per-dataframe TTL in seconds, extended by every query that references the dataframe. At most 31536000 (365 days).
EIA_DATAFRAME_DROP_ENABLEDdefault: falseSet to 'true' to expose eia_dataframe_drop for manual canvas cleanup. Has no effect with CANVAS_PROVIDER_TYPE=none.
EIA_CANVAS_MAX_ROWSdefault: 25000Cumulative row ceiling for eia_query_route DataCanvas staging on a stage: true call. Five requests at EIA's 5000-row-per-request ceiling. At most 250000.
EIA_FACET_VALUE_CAPdefault: 50Facet values eia_describe_route returns per facet before truncating. Page past it with the tool's facet and values_offset inputs, or narrow a facet with values_query. At most 1000.
EIA_CLAMP_LIMITSdefault: trueLower an over-cap eia_query_route length, eia_dataframe_query row_limit or preview, or eia_search_routes limit to its cap with a notice. 'false' advertises and enforces each cap as a schema maximum instead.
CANVAS_PROVIDER_TYPEdefault: duckdbDataCanvas provider. 'duckdb', the default, registers eia_dataframe_describe and eia_dataframe_query and lets eia_query_route stage rows when called with stage: true; eia_dataframe_drop also requires EIA_DATAFRAME_DROP_ENABLED=true. 'none' disables DataCanvas.
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_TRANSPORT_TYPEdefault: httpSelects the HTTP transport.
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_PUBLIC_URLPublic origin override for deployments behind a TLS-terminating reverse proxy (e.g. https://mcp.example.com).
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.
Readme
@cyanheads/eia-energy-mcp-server
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.
Details
- Repository
- github.com/cyanheads/eia-energy-mcp-server
- Package
@cyanheads/eia-energy-mcp-server- Transport
- STDIO, HTTP
- Auth
- Required
- Registry
- MCP registry, active
- Resources
- 1
- Tools verified
- Nov 6, 2026
More from cyanheads
- Ensembl Mcp Server3
- Noaa Marine Mcp Server3
- Openstates Mcp Server3
- Treasury Fiscaldata Mcp Server3
- Usgs Water Mcp Server3
- Wikidata Mcp Server3
- Worldbank Mcp Server3
- Mcp Ts Core153
- Arxiv Mcp Server7
- Bluesky Mcp Server2
- Fbi Crime Mcp Server2
- Fema Mcp Server2
- Imf Mcp Server2
- Nonprofit Explorer Mcp Server2
- Onebusaway Mcp Server2
- Openfec Mcp Server2
- Openfoodfacts Mcp Server2
- Reliefweb Mcp Server2
- Smithsonian Mcp Server2
- Stackexchange Mcp Server2
- Wsdot Mcp Server2
- Oecd Mcp Server4
- Socrata Mcp Server4
- Census Mcp Server3