{
  "markdown": "# statfin-fi\n\nStatistics Finland (StatFin) — the full catalogue of Finnish official statistics published by Tilastokeskus, served over its PxWeb API: population, education, employment, consumer prices, housing, health and national accounts.\n\nPart of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1476+ live data sources.\n\n## Tools\n\n| Tool | What it returns |\n|---|---|\n| `subjects` | The StatFin subject tree. `path` empty lists ~135 subject folders; `path: \"vkour\"` lists that folder's tables. Entries with `type: \"l\"` are folders, `type: \"t\"` are tables. |\n| `table_meta` | One table's dimensions and every valid value, when you want to see what a table breaks down by. |\n| `query_table` | Actual figures. Give it `select` in plain English and it resolves the codes itself; give it `body` and it passes your PxWeb query straight through. |\n\n### Table paths\n\nA table path is `<folder>/<id>.px` where the id is the **bare 4-character table code**:\n\n```\nvkour/15ig.px      Population aged 15 or over by level of education, gender, age and origin\nkhi/11xs.px        Consumer price index\n```\n\nThe longer `statfin_<folder>_pxt_<id>.px` form appears throughout older StatFin\ndocumentation. It was retired upstream and now returns **400 on every table**;\nthis pack rewrites it to the current form, so a caller arriving with the\ndocumented-but-dead path still gets data (fleet #497).\n\n### Asking in plain English\n\n`select` maps a dimension to a value using either the English label or the\nnative code, and `query_table` resolves both against the table's own metadata:\n\n```json\n{ \"path\": \"vkour/15ig.px\", \"select\": { \"Information\": \"tertiary level qualification\" } }\n```\n\n→ `1672232` Finns aged 15+ hold a tertiary qualification (2025), alongside the\nmatching share, `34.5%`.\n\nDimensions you don't name are filled in for you: the year defaults to the\nlatest published, dimensions StatFin can eliminate are aggregated to their\ntotal, and a dimension with an explicit total value (`SSS`, `Total`, or an\nopen-ended range starting at the table's own floor such as age `15-`) uses it.\n**Every one of those choices comes back in `selection_resolved`**, and a\ndimension with no defensible total is returned in full rather than silently\ncollapsed — a defaulted dimension nobody can see is how a wrong number gets\nread as a right one.\n\nA value that matches several rows returns all of them rather than picking one,\nso `{\"Information\": \"tertiary level qualification\"}` yields both the count and\nthe percentage. If it matches more than 20, that is reported as too broad.\n\nResults also carry `figures`: the json-stat2 `value[]` array paired with its\ndimension labels, for results up to 60 cells. That is the readable form —\njson-stat2's flat array over an implicit cartesian product is not.\n\n### Dimension codes are native Finnish\n\nEven on the `/en/` endpoint the dimension *codes* are Finnish, and some labels\nare untranslated. There is no way to guess them, which is what `select` exists\nto spare you; pass `body` yourself and you need `table_meta` first.\nFor `vkour/15ig.px`:\n\n| Code | Meaning | Total value |\n|---|---|---|\n| `ikaryhma_10_20180101` | Age | `15-` (**not** `SSS`) |\n| `sukupuoli_9_20180101` | Gender | `SSS` |\n| `syntypera_101_20180101` | Origin (label renders as `Syntyperä`) | `SSS` |\n| `timeperiod_y` | Year | — |\n| `contentscode` | Measure, e.g. `kaste5T8` = population with a tertiary level qualification | — |\n\nWorked call — population aged 15+ with a tertiary qualification, 2024:\n\n```json\n{\n  \"path\": \"vkour/15ig.px\",\n  \"body\": {\n    \"query\": [\n      { \"code\": \"ikaryhma_10_20180101\", \"selection\": { \"filter\": \"item\", \"values\": [\"15-\"] } },\n      { \"code\": \"sukupuoli_9_20180101\", \"selection\": { \"filter\": \"item\", \"values\": [\"SSS\"] } },\n      { \"code\": \"syntypera_101_20180101\", \"selection\": { \"filter\": \"item\", \"values\": [\"SSS\"] } },\n      { \"code\": \"timeperiod_y\", \"selection\": { \"filter\": \"item\", \"values\": [\"2024\"] } },\n      { \"code\": \"contentscode\", \"selection\": { \"filter\": \"item\", \"values\": [\"kaste5T8\"] } }\n    ],\n    \"response\": { \"format\": \"json-stat2\" }\n  }\n}\n```\n\n→ `value: [1641336]`, table updated 2026-06-18.\n\n## Auth\n\nNone. Keyless, no registration, no rate-limit key. Reachable from Cloudflare egress.\n\n## Data sources\n\n- API root: `https://pxdata.stat.fi/PXWeb/api/v1/en/StatFin`\n- Portal: https://pxdata.stat.fi/PxWeb/pxweb/en/StatFin/\n- Publisher: Statistics Finland / Tilastokeskus — https://stat.fi/en\n- Licence: Creative Commons Attribution 4.0 International (CC BY 4.0)\n\n## Quick Start\n\nAdd to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"statfin-fi\": {\n      \"url\": \"https://gateway.pipeworx.io/statfin-fi/mcp\"\n    }\n  }\n}\n```\n\n### What this endpoint actually serves\n\n`tools/list` at `https://gateway.pipeworx.io/statfin-fi/mcp` returns the tools in the table\nabove **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,\n`discover_tools`, `search_within`, `remember`/`recall` and the rest of the\ngateway-wide set. So the tool count you see is larger than this table: a\nsingle-pack endpoint currently lists roughly 30 shared tools alongside the\npack's own. The connection's `initialize` response states its exact scope, and\nis the authoritative answer for a given day.\n\nThis is deliberate, not multiplexing by accident. The meta-tools are what let a\nscoped connection answer a question this pack does not cover — via\n`ask_pipeworx`, which routes across the whole catalog — without you adding a\nsecond MCP server. There is currently no way to mount a pack endpoint without\nthem; if the extra schemas cost you more context than the routing is worth,\nconnect to the full gateway once rather than to several pack endpoints.\n\nOr connect to the full Pipeworx gateway to get every pack's tools listed\ndirectly, instead of just this one's:\n\n```json\n{\n  \"mcpServers\": {\n    \"pipeworx\": {\n      \"url\": \"https://gateway.pipeworx.io/mcp\"\n    }\n  }\n}\n```\n\nBoth URLs reach the same gateway and the same 1476+ data sources. The\nonly difference is which pack's tools are listed **directly**; `ask_pipeworx`\nreaches all of them from either one.\n\n## Using with ask_pipeworx\n\nInstead of calling tools directly, you can ask questions in plain English —\nthis works on the pack endpoint above as well as on the full gateway:\n\n```\nask_pipeworx({ question: \"your question about Statfin Fi data\" })\n```\n\nThe gateway picks the right tool and fills the arguments automatically.\n\n## More\n\n- [Docs and guides](https://pipeworx.io/docs)\n- [pipeworx.io](https://pipeworx.io)\n\n## License\n\nMIT\n",
  "bytes": 6569,
  "sha": "e44cf1a1ede9a7e21e1720daae91ba5dcdbf82124aff467cc991ea0413afde3b",
  "repo_slug": "pipeworx-io/mcp-statfin-fi",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_pipeworx_io_statfin_fi_7e763691/readme"
}