un_energy_codes

Pack: un-energy · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/un_energy_codes for the schema, then POST the same URL with its arguments for the data.

Browse the valid countries, products and flows for the UN energy tools, with codes. kind picks the list: country, balance_commodity, balance_flow, commodity, flow. query filters by words. Example: un_energy_codes({ kind: “commodity”, query: “gasoline” }).

Parameters

NameTypeRequiredDescription
kindstringyesWhich list to return.
querystringnoOptional words to filter by, e.g. “gas”.

Example call

Arguments

{
  "kind": "commodity",
  "query": "gasoline"
}

curl

curl -X POST https://gateway.pipeworx.io/un-energy/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"un_energy_codes","arguments":{"kind":"commodity","query":"gasoline"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('un_energy_codes', {
  "kind": "commodity",
  "query": "gasoline"
});

Response shape

FieldTypeDescription
kindstring
countnumber
codesarray
truncatedboolean
sourcestring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string"
    },
    "count": {
      "type": "number"
    },
    "codes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    },
    "truncated": {
      "type": "boolean"
    },
    "source": {
      "type": "string"
    }
  },
  "additionalProperties": true
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the un-energy pack
{
  "mcpServers": {
    "un-energy": {
      "url": "https://gateway.pipeworx.io/un-energy/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 21, 2026