estimate_electricity

Pack: carbon-interface · Endpoint: https://gateway.pipeworx.io/carbon-interface/mcp

Estimate CO2 emissions from electricity usage. Returns carbon emissions in grams, kg, and metric tons. Example: estimate_electricity(500, “us”, “kwh”) for 500 kWh in the US.

Parameters

NameTypeRequiredDescription
_apiKeystringyesCarbon Interface API key
valuenumberyesAmount of electricity consumed (e.g., 500)
countrystringyesISO 3166-1 alpha-2 country code (e.g., “us”, “gb”, “de”)
unitstringnoUnit of electricity: “kwh” or “mwh” (default: “kwh”)
statestringnoUS state code for more precise estimate (e.g., “ca”, “ny”). Only for US.

Example call

Arguments

{
  "_apiKey": "your-carbon-interface-api-key",
  "value": 500,
  "country": "us",
  "unit": "kwh"
}

curl

curl -X POST https://gateway.pipeworx.io/carbon-interface/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"estimate_electricity","arguments":{"_apiKey":"your-carbon-interface-api-key","value":500,"country":"us","unit":"kwh"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('estimate_electricity', {
  "_apiKey": "your-carbon-interface-api-key",
  "value": 500,
  "country": "us",
  "unit": "kwh"
});

More examples

{
  "_apiKey": "your-carbon-interface-api-key",
  "value": 150,
  "country": "us",
  "state": "ca",
  "unit": "kwh"
}

Response shape

Always returns: electricity_value, electricity_unit, country, state, estimated_at, carbon_g, carbon_kg, carbon_mt, carbon_lb

FieldTypeDescription
electricity_valuenumberAmount of electricity consumed
electricity_unitstringUnit of electricity (kwh or mwh)
countrystringISO 3166-1 alpha-2 country code
statestring | nullUS state code if provided
estimated_atstring | nullISO timestamp of estimate
carbon_gnumber | nullCarbon emissions in grams
carbon_kgnumber | nullCarbon emissions in kilograms
carbon_mtnumber | nullCarbon emissions in metric tons
carbon_lbnumber | nullCarbon emissions in pounds
Full JSON Schema
{
  "type": "object",
  "properties": {
    "electricity_value": {
      "type": "number",
      "description": "Amount of electricity consumed"
    },
    "electricity_unit": {
      "type": "string",
      "description": "Unit of electricity (kwh or mwh)"
    },
    "country": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 country code"
    },
    "state": {
      "type": [
        "string",
        "null"
      ],
      "description": "US state code if provided"
    },
    "estimated_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO timestamp of estimate"
    },
    "carbon_g": {
      "type": [
        "number",
        "null"
      ],
      "description": "Carbon emissions in grams"
    },
    "carbon_kg": {
      "type": [
        "number",
        "null"
      ],
      "description": "Carbon emissions in kilograms"
    },
    "carbon_mt": {
      "type": [
        "number",
        "null"
      ],
      "description": "Carbon emissions in metric tons"
    },
    "carbon_lb": {
      "type": [
        "number",
        "null"
      ],
      "description": "Carbon emissions in pounds"
    }
  },
  "required": [
    "electricity_value",
    "electricity_unit",
    "country",
    "state",
    "estimated_at",
    "carbon_g",
    "carbon_kg",
    "carbon_mt",
    "carbon_lb"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "carbon-interface": {
      "url": "https://gateway.pipeworx.io/carbon-interface/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026