eia_electricity
Pack: eia · Endpoint: https://gateway.pipeworx.io/eia/mcp
Get electricity generation by fuel source, retail sales, and prices by region. Returns time series for supply and pricing data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | yes | EIA API key |
series | string | yes | Data series: “generation”, “retail_sales”, “prices”, “state_generation” |
frequency | string | no | Frequency: “monthly”, “quarterly”, “annual” (optional) |
start | string | no | Start date (optional) |
end | string | no | End date (optional) |
Example call
Arguments
{
"_apiKey": "your-eia-api-key",
"series": "generation"
}
curl
curl -X POST https://gateway.pipeworx.io/eia/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"eia_electricity","arguments":{"_apiKey":"your-eia-api-key","series":"generation"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('eia_electricity', {
"_apiKey": "your-eia-api-key",
"series": "generation"
});
More examples
{
"_apiKey": "your-eia-api-key",
"series": "retail_sales",
"frequency": "monthly",
"start": "2023-01"
}
Response shape
Always returns: series, total, description, count, data, truncated
| Field | Type | Description |
|---|---|---|
series | string | Electricity series type requested |
total | number | Total number of records available |
description | string | null | Series description from EIA API |
count | number | Number of records returned |
data | array | Time series data points (max 100 returned) |
truncated | boolean | True if more than 100 records available |
Full JSON Schema
{
"type": "object",
"properties": {
"series": {
"type": "string",
"description": "Electricity series type requested"
},
"total": {
"type": "number",
"description": "Total number of records available"
},
"description": {
"type": [
"string",
"null"
],
"description": "Series description from EIA API"
},
"count": {
"type": "number",
"description": "Number of records returned"
},
"data": {
"type": "array",
"description": "Time series data points (max 100 returned)",
"items": {
"type": "object",
"properties": {
"period": {
"type": [
"string",
"null"
],
"description": "Time period (e.g., date or year)"
},
"value": {
"type": [
"number",
"null"
],
"description": "Numeric value for the period"
},
"description": {
"type": [
"string",
"null"
],
"description": "Series description"
},
"area": {
"type": [
"string",
"null"
],
"description": "Geographic area name"
},
"product": {
"type": [
"string",
"null"
],
"description": "Product type"
},
"process": {
"type": [
"string",
"null"
],
"description": "Process or measurement type"
},
"units": {
"type": [
"string",
"null"
],
"description": "Unit of measurement"
}
}
}
},
"truncated": {
"type": "boolean",
"description": "True if more than 100 records available"
}
},
"required": [
"series",
"total",
"description",
"count",
"data",
"truncated"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"eia": {
"url": "https://gateway.pipeworx.io/eia/mcp"
}
}
}
See Getting Started for client-specific install steps.