{"name":"io.github.cyanheads/eia-energy-mcp-server","slug":"cyanheads-eia-energy-mcp-server","title":null,"description":"Browse and query the EIA API v2 — electricity, petroleum, natural gas, coal, forecasts via MCP.","url":"https://mcp.market/server/cyanheads-eia-energy-mcp-server","rating":null,"grade":"A","score":86,"certified":false,"status":"active","category":"other","tags":[],"presence":{"score":36,"stars":2,"forks":1,"downloads_week":194,"last_push_at":"2026-09-19T19:09:43.000Z","license":"NOASSERTION"},"uptime":{"percent":100,"checks":2,"ok":2,"last_checked_at":"2026-09-19T23:10:59.231Z","last_ok_at":"2026-09-19T23:10:59.231Z","latency_ms":286},"claimed":false,"transport":"mixed","callable_via_gateway":true,"default_price_micros":0,"repository":"https://github.com/cyanheads/eia-energy-mcp-server","website":null,"version":"0.4.2","remotes":[{"type":"streamable-http","url":"https://eia-energy.caseyjhand.com/mcp"}],"packages":[{"registryType":"npm","registryBaseUrl":"https://registry.npmjs.org","identifier":"@cyanheads/eia-energy-mcp-server","version":"0.4.2","runtimeHint":"bun","transport":{"type":"stdio"},"packageArguments":[{"value":"run","type":"positional"},{"value":"start:stdio","type":"positional"}],"environmentVariables":[{"description":"Free API key from api.eia.gov. Required — all requests use this as the api_key query parameter.","isRequired":true,"format":"string","name":"EIA_API_KEY"},{"description":"Sliding per-dataframe TTL in seconds, extended by every query that references the dataframe.","format":"string","default":"86400","name":"EIA_DATASET_TTL_SECONDS"},{"description":"Set to 'true' to expose eia_dataframe_drop for manual canvas cleanup. Also requires CANVAS_PROVIDER_TYPE=duckdb.","format":"string","default":"false","name":"EIA_DATAFRAME_DROP_ENABLED"},{"description":"Cumulative row ceiling for eia_query_route DataCanvas staging on a stage: true call. Five requests at EIA's 5000-row-per-request ceiling.","format":"string","default":"25000","name":"EIA_CANVAS_MAX_ROWS"},{"description":"Facet values eia_describe_route returns per facet before truncating. Page past it with the tool's facet and values_offset inputs.","format":"string","default":"50","name":"EIA_FACET_VALUE_CAP"},{"description":"Set to 'duckdb' to enable DataCanvas (Node.js only). Registers the three eia_dataframe_* tools and lets eia_query_route stage rows when called with stage: true.","format":"string","name":"CANVAS_PROVIDER_TYPE"},{"description":"Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').","format":"string","default":"info","name":"MCP_LOG_LEVEL"}]},{"registryType":"npm","registryBaseUrl":"https://registry.npmjs.org","identifier":"@cyanheads/eia-energy-mcp-server","version":"0.4.2","runtimeHint":"bun","transport":{"type":"streamable-http","url":"http://localhost:3010/mcp"},"packageArguments":[{"value":"run","type":"positional"},{"value":"start:http","type":"positional"}],"environmentVariables":[{"description":"Free API key from api.eia.gov. Required — all requests use this as the api_key query parameter.","isRequired":true,"format":"string","name":"EIA_API_KEY"},{"description":"Sliding per-dataframe TTL in seconds, extended by every query that references the dataframe.","format":"string","default":"86400","name":"EIA_DATASET_TTL_SECONDS"},{"description":"Set to 'true' to expose eia_dataframe_drop for manual canvas cleanup. Also requires CANVAS_PROVIDER_TYPE=duckdb.","format":"string","default":"false","name":"EIA_DATAFRAME_DROP_ENABLED"},{"description":"Cumulative row ceiling for eia_query_route DataCanvas staging on a stage: true call. Five requests at EIA's 5000-row-per-request ceiling.","format":"string","default":"25000","name":"EIA_CANVAS_MAX_ROWS"},{"description":"Facet values eia_describe_route returns per facet before truncating. Page past it with the tool's facet and values_offset inputs.","format":"string","default":"50","name":"EIA_FACET_VALUE_CAP"},{"description":"Set to 'duckdb' to enable DataCanvas (Node.js only). Registers the three eia_dataframe_* tools and lets eia_query_route stage rows when called with stage: true.","format":"string","name":"CANVAS_PROVIDER_TYPE"},{"description":"The hostname for the HTTP server.","format":"string","default":"127.0.0.1","name":"MCP_HTTP_HOST"},{"description":"The port to run the HTTP server on.","format":"string","default":"3010","name":"MCP_HTTP_PORT"},{"description":"The endpoint path for the MCP server.","format":"string","default":"/mcp","name":"MCP_HTTP_ENDPOINT_PATH"},{"description":"Public origin override for deployments behind a TLS-terminating reverse proxy (e.g. https://mcp.example.com).","format":"string","name":"MCP_PUBLIC_URL"},{"description":"Authentication mode to use: 'none', 'jwt', or 'oauth'.","format":"string","default":"none","name":"MCP_AUTH_MODE"},{"description":"Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').","format":"string","default":"info","name":"MCP_LOG_LEVEL"}]}],"tools":[{"name":"eia_browse_routes","description":"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.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"path":{"description":"Route path to browse (e.g. \"electricity\", \"petroleum/pri\"). Omit for root. Leading, trailing, and doubled slashes are stripped, so an EIA-doc spelling like \"/electricity/retail-sales/\" resolves to the same route.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false}},{"name":"eia_dataframe_describe","description":"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 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.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"description":"df_<id> handle to describe a single dataframe. Omit to list all active dataframes.","type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false}},{"name":"eia_dataframe_query","description":"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_<id> handles returned by eia_query_route or listed by eia_dataframe_describe. Read-only: writes, DDL, DROP, COPY, PRAGMA, ATTACH, and external-file table functions are rejected. System catalogs (information_schema, pg_catalog, sqlite_master, duckdb_*) are denied. 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.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"sql":{"type":"string","minLength":1,"description":"Single-statement SELECT against df_<id> tables. EIA data columns are VARCHAR — use CAST(col AS DOUBLE) for arithmetic. Example: SELECT period, CAST(value AS DOUBLE) AS val FROM df_XXXXX ORDER BY period"},"register_as":{"description":"When set, persist the result as a new dataframe with a fresh expiry. Use to chain analyses without re-running upstream queries. The name must be unused — reusing a staged name is rejected, and the fix is a different name, not dropping the existing dataframe. eia_dataframe_describe lists the names already taken.","type":"string","minLength":1},"preview":{"description":"Rows to include in the immediate response. Defaults to row_limit. Set lower when chaining via register_as and only a sample is needed inline.","type":"integer","minimum":0,"maximum":10000},"row_limit":{"default":1000,"description":"Hard cap on rows materialized in the response (default 1000, max 10000). Rows past the cap are dropped without being counted — the response then carries truncated: true and a totalRows equal to the cap rather than a true total. Pass register_as to materialize the whole result instead and get an exact count.","type":"integer","minimum":1,"maximum":10000}},"required":["sql"],"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false}},{"name":"eia_describe_route","description":"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. 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 and merged — results are cached per-route for the process lifetime to minimize API calls.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"route":{"type":"string","minLength":1,"description":"Leaf route path (e.g. \"electricity/retail-sales\", \"steo\"). Discoverable via eia_browse_routes or eia_search_routes. Leading, trailing, and doubled slashes are stripped, so an EIA-doc spelling like \"/electricity/retail-sales/\" resolves to the same route."},"facet":{"description":"Restrict the response to one facet by ID (e.g. \"stateid\"). Use with values_offset to page a facet whose values were truncated. Omit to get every facet.","type":"string","minLength":1},"values_offset":{"default":0,"description":"Index of the first facet value to return, applied to every facet in the response. Use the value named in a truncation hint to continue past the cap.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["route"],"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false}},{"name":"eia_query_route","description":"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_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.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"route":{"type":"string","minLength":1,"description":"Leaf route path (e.g. \"electricity/retail-sales\", \"steo\"). Discoverable via eia_browse_routes or eia_search_routes. Leading, trailing, and doubled slashes are stripped, so an EIA-doc spelling like \"/electricity/retail-sales/\" resolves to the same route."},"filters":{"description":"Facet filters keyed by facet ID (e.g. { \"stateid\": \"TX\", \"sectorid\": [\"RES\", \"COM\"] }). Use the facets[].id values returned by eia_describe_route as keys here.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},"columns":{"description":"Data column IDs to return (reduces payload). Defaults to all. IDs discoverable via eia_describe_route.","type":"array","items":{"type":"string"}},"frequency":{"description":"Aggregation frequency ID (e.g. \"monthly\", \"annual\"). Defaults to route default. Valid IDs from eia_describe_route.","type":"string"},"start":{"description":"Period start in the route date format (e.g. \"2020-01\" for monthly, \"2020\" for annual). Format from eia_describe_route.","type":"string"},"end":{"description":"Period end (same format as start).","type":"string"},"sort":{"description":"Result ordering.","type":"array","items":{"type":"object","properties":{"column":{"type":"string","description":"Column ID to sort by."},"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction."}},"required":["column","direction"],"description":"A sort criterion."}},"offset":{"default":0,"description":"Row offset into the matching set (default 0). An offset at or beyond total returns zero rows.","type":"integer","minimum":0,"maximum":9007199254740991},"length":{"default":100,"description":"Rows in the inline preview (default 100, max 5000 per EIA limit). With stage: true, staging is not bounded by this — it pages past the preview on its own.","type":"integer","minimum":1,"maximum":5000},"stage":{"default":false,"description":"Stage the matching rows as a DataCanvas table for SQL (default false). Off, the call makes one upstream request and returns the preview alone. On, the service pages past the preview up to EIA_CANVAS_MAX_ROWS and registers the accumulated rows, returning the handle in dataset — several extra upstream requests and seconds of latency on a large route, so turn it on when moving to analysis, not while exploring. Requires a canvas (CANVAS_PROVIDER_TYPE=duckdb); without one nothing is staged whatever this is set to.","type":"boolean"}},"required":["route"],"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false}},{"name":"eia_search_routes","description":"Fuzzy text search across route names, descriptions, and category labels. Resolves natural-language queries like \"electricity retail sales by state\" or \"natural gas imports\" to matching route paths. 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. STEO series names are indexed so queries like \"ethanol net imports\" or \"crude oil production forecast\" also resolve, 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. 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 24-30s while the index warms, and at most 45s; every later call returns in milliseconds. Check indexComplete before reading anything into a short or empty result set.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Free-text search terms to match against route names and descriptions."},"limit":{"default":10,"description":"Maximum results to return (default 10, max 30).","type":"integer","minimum":1,"maximum":30}},"required":["query"],"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false}}],"scan":{"score":86,"grade":"A","scanned_at":"2026-09-19T20:35:55.642Z","report":{"scannerVersion":"0.1.6","scannedAt":"2026-09-19T20:35:55.607Z","components":{"code":{"score":25,"max":25,"notes":["30 source files scanned","30 source files scanned"]},"reliability":{"score":20,"max":20,"notes":["remote reachable in 938ms"]},"poisoning":{"score":15,"max":15,"notes":["6 tool descriptions checked"]},"auth":{"score":3,"max":15,"notes":["open endpoint exposes 1 write-action tools with no auth"]},"maintenance":{"score":15,"max":15,"notes":["last push 0 days ago"]},"identity":{"score":8,"max":10,"notes":["registry namespace matches repository owner","GitHub account older than a year"]}},"findings":[{"id":"auth.open-write","severity":"high","component":"auth","title":"Write-action tools reachable without authentication"}],"inputs":{"probes":[{"url":"https://eia-energy.caseyjhand.com/mcp","reachable":true,"authRequired":false,"latencyMs":938,"serverInfo":{"name":"eia-energy-mcp-server","version":"0.4.2"}}],"packages":[{"registryType":"npm","identifier":"@cyanheads/eia-energy-mcp-server","version":"0.4.2","found":true,"license":"Apache-2.0","hasInstallScripts":false,"dependencyCount":5,"publishedAt":"2026-09-19T19:11:19.529Z","repositoryUrl":"git+https://github.com/cyanheads/eia-energy-mcp-server.git","weeklyDownloads":97},{"registryType":"npm","identifier":"@cyanheads/eia-energy-mcp-server","version":"0.4.2","found":true,"license":"Apache-2.0","hasInstallScripts":false,"dependencyCount":5,"publishedAt":"2026-09-19T19:11:19.529Z","repositoryUrl":"git+https://github.com/cyanheads/eia-energy-mcp-server.git","weeklyDownloads":97}],"repo":{"found":true,"owner":"cyanheads","repo":"eia-energy-mcp-server","archived":false,"pushedAt":"2026-09-19T19:09:43Z","stars":2,"forks":1,"openIssues":7,"ownerType":"User","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/10339515?v=4","ownerCreatedAt":"2014-12-29T13:01:12Z","license":"NOASSERTION"},"icon":{"url":"https://avatars.githubusercontent.com/u/10339515?v=4&s=128","source":"github"},"presence":{"stars":2,"forks":1,"downloadsWeek":194,"license":"NOASSERTION","lastPushAt":"2026-09-19T19:09:43.000Z","score":36}}}},"grade_history":[],"reviews":[]}