Skip to content
Back to search

mcp-un-energy

UN energy statistics: the United Nations Statistics Division energy balances and the Energy Statistics Database, by country, product (commodity) and flow (transaction) and year.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/pipeworx-io--mcp-un-energy/badge.svg)](/listings/pipeworx-io--mcp-un-energy)

HTML

<a href="/listings/pipeworx-io--mcp-un-energy"><img src="/api/listings/pipeworx-io--mcp-un-energy/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "un-energy": {
      "url": "https://gateway.pipeworx.io/un-energy/mcp"
    }
  }
}

What this endpoint actually serves

`tools/list` at `https://gateway.pipeworx.io/un-energy/mcp` returns the tools in the table above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`, `discover_tools`, `search_within`, `remember`/`recall` and the rest of the gateway-wide set. So the tool count you see is larger than this table: a single-pack endpoint currently lists roughly 30 shared tools alongside the pack's own. The connection's `initialize` response states its exact scope, and is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a scoped connection answer a question this pack does not cover — via `ask_pipeworx`, which routes across the whole catalog — without you adding a second MCP server. There is currently no way to mount a pack endpoint without them; if the extra schemas cost you more context than the routing is worth, connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:

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

Both URLs reach the same gateway and the same 2024+ data sources. The only difference is which pack's tools are listed **directly**; `ask_pipeworx` reaches all of them from either one.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 138 lines
  1. # @pipeworx/un-energy
  2. United Nations energy statistics: country energy balances in terajoules and the Energy Statistics Database by fuel, flow and year, answered live per request.
  3. Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 2024+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
  4. ## Tools
  5. - `un_energy_balance(country, commodity?, flow?, year?)` - energy balance in TJ: product group (coal and peat, oil products, natural gas, electricity, total energy) against a flow (production, imports, exports, total energy supply, transformation, final consumption). Answers "total natural gas supply of Egypt in 2023 in TJ".
  6. - `un_energy_statistics(country, commodity?, flow?, year?)` - one named fuel or product against one flow in the unit the country reported (tonnes, cubic metres, GWh, TJ), with the UNSD conversion factor and the value converted to TJ. Answers "final energy consumption of aviation gasoline in Brazil in 2022".
  7. - `un_energy_codes(kind, query?)` - browse valid countries, products and flows.
  8. ## Auth
  9. Keyless.
  10. ## Data sources
  11. - United Nations Statistics Division (UNSD), Energy Balances.
  12. - United Nations Statistics Division (UNSD), Energy Statistics Database.
  13. Queried live per request; nothing is stored. Country, product and flow words are resolved against UNSD's own code lists (held in memory for the life of the process). Words matching several products return every match, labelled.
  14. Things worth knowing:
  15. - The two datasets are not the same series. Energy balances are normalised to net calorific terajoules; the Energy Statistics Database carries each country's reported quantity plus the conversion factor UNSD applies. For the same country, fuel and year the TJ totals can differ between them (Egypt natural gas 2023: 1,712,327 TJ in the balances, 1,902,586 TJ in the statistics database).
  16. - Balance flows are signed: exports, stock builds and transformation inputs are negative.
  17. - A query with no record is an error naming what was asked, not an empty list. The latest published year varies by country.
  18. - `value_published x unit_multiplier = value`; UNSD publishes tonnes as thousands (32.668 = 32,668 metric tons).
  19. ## Quick Start
  20. Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
  21. ```json
  22. {
  23. "mcpServers": {
  24. "un-energy": {
  25. "url": "https://gateway.pipeworx.io/un-energy/mcp"
  26. }
  27. }
  28. }
  29. ```
  30. ### What this endpoint actually serves
  31. `tools/list` at `https://gateway.pipeworx.io/un-energy/mcp` returns the tools in the table
  32. above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
  33. `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
  34. gateway-wide set. So the tool count you see is larger than this table: a
  35. single-pack endpoint currently lists roughly 30 shared tools alongside the
  36. pack's own. The connection's `initialize` response states its exact scope, and
  37. is the authoritative answer for a given day.
  38. This is deliberate, not multiplexing by accident. The meta-tools are what let a
  39. scoped connection answer a question this pack does not cover — via
  40. `ask_pipeworx`, which routes across the whole catalog — without you adding a
  41. second MCP server. There is currently no way to mount a pack endpoint without
  42. them; if the extra schemas cost you more context than the routing is worth,
  43. connect to the full gateway once rather than to several pack endpoints.
  44. Or connect to the full Pipeworx gateway to get every pack's tools listed
  45. directly, instead of just this one's:
  46. ```json
  47. {
  48. "mcpServers": {
  49. "pipeworx": {
  50. "url": "https://gateway.pipeworx.io/mcp"
  51. }
  52. }
  53. }
  54. ```
  55. Both URLs reach the same gateway and the same 2024+ data sources. The
  56. only difference is which pack's tools are listed **directly**; `ask_pipeworx`
  57. reaches all of them from either one.
  58. ## No MCP client? Call it over HTTP
  59. ```bash
  60. curl -X POST https://gateway.pipeworx.io/v1/tools/un_energy_balance \
  61. -H 'Content-Type: application/json' \
  62. -d '{"country":"Israel","commodity":"coal","flow":"total energy supply","year":2020}'
  63. ```
  64. No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/un_energy_balance`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
  65. ## Run it from npm
  66. `@pipeworx/mcp-un-energy` is a local stdio bridge to the Pipeworx gateway: your MCP client
  67. starts it with `npx`, and it forwards every call to the same
  68. `https://gateway.pipeworx.io/un-energy/mcp` endpoint shown above. It needs network access;
  69. there is no offline mode.
  70. ```json
  71. {
  72. "mcpServers": {
  73. "un-energy": {
  74. "command": "npx",
  75. "args": ["-y", "@pipeworx/mcp-un-energy"]
  76. }
  77. }
  78. }
  79. ```
  80. Without a key it calls anonymously, capped at 50 calls a day. A free account
  81. raises that to 200 a day: get a key at https://pipeworx.io/signup and add
  82. `"env": { "PIPEWORX_API_KEY": "<your key>" }` to the server entry.
  83. The key is sent as a Bearer token, the same way a hosted connection sends it,
  84. so calls are metered and billed exactly as they are there.
  85. It lists **only** this pack's tools by default. Set `PIPEWORX_META_TOOLS=1` to
  86. also list `ask_pipeworx` and the other gateway-wide tools.
  87. Behind an HTTPS proxy: Node's built-in `fetch` does not read `HTTPS_PROXY` by
  88. default. Newer Node releases honour it when `NODE_USE_ENV_PROXY=1` is set; check
  89. your Node version's documentation.
  90. ## Using with ask_pipeworx
  91. Instead of calling tools directly, you can ask questions in plain English —
  92. this works on the pack endpoint above as well as on the full gateway:
  93. ```
  94. ask_pipeworx({ question: "your question about Un Energy data" })
  95. ```
  96. The gateway picks the right tool and fills the arguments automatically.
  97. ## More
  98. - [Docs and guides](https://pipeworx.io/docs)
  99. - [pipeworx.io](https://pipeworx.io)
  100. ## License
  101. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.