# Statfin Fi [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/pipeworx-io/mcp-statfin-fi  
**GitHub Stars:** 0  
**npm Downloads (last month):** 450  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/statfin-fi

## Description
Statistics Finland (StatFin) PxWeb MCP.

## Tools
Capabilities this server exposes over MCP:

- **subjects** — Browse the Statistics Finland (StatFin) subject tree of Finnish official statistics — population, education, employment, consumer prices, housing, health and national accounts tables published by Tilastokeskus. Entries with type "l" are folders (drill in with their id, e.g. "vkour" for educational structure of population, "khi" for the consumer price index); type "t" are tables whose id is the bare 4-character code plus ".px" (e.g. "15ig.px"), which you pass to table_meta and query_table as "folder/table.px" — for example "vkour/15ig.px".
- **table_meta** — List the dimensions and every valid value of one Statistics Finland (StatFin) PxWeb table of Finnish official statistics — use it to see exactly what a table breaks down by before slicing it, or when query_table reports that a value matched nothing. StatFin dimension codes are native Finnish and cannot be guessed from the English table title: "vkour/15ig.px" uses "ikaryhma_10_20180101" for age (whose total is "15-", not "SSS"), "sukupuoli_9_20180101" for gender, "syntypera_101_20180101" for origin, "timeperiod_y" for year, and contentscode values such as "kaste5T8" (population with a tertiary level qualification). path is "folder/table.px" using the bare 4-character table id, e.g. "vkour/15ig.px" or "khi/11xs.px".
- **query_table** — Get an actual figure out of a Statistics Finland (StatFin) table of Finnish official statistics — how many Finns hold a tertiary qualification, the current consumer price index, births and deaths, employment, and the rest of the Tilastokeskus catalogue. path is "folder/table.px" using the bare 4-character table id (e.g. "vkour/15ig.px", "khi/11xs.px"); the longer "statfin_<folder>_pxt_<id>.px" form found in older StatFin docs was retired upstream and is rewritten to the current form for you. Answers in ONE call: pass `select` with plain-English labels from the question — {"Information": "tertiary level qualification"} against "vkour/15ig.px" returns the 1,672,232 Finns who hold one — and this pack resolves them against the table's own metadata, defaults the year to the latest published and every other breakdown to its total, and reports each of those choices back in `selection_resolved` alongside a flattened `figures` list. `select` keys and values may be either the English label or the native Finnish code ("contentscode", "kaste5T8"). Pass `body` instead for a raw PxWeb query object when you already know the codes.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "statfin-fi": {
    "command": "npx",
    "args": ["-y","@pipeworx/mcp-statfin-fi"]
  }
}
```

## Documentation

## What the Statfin Fi MCP server does

Statfin Fi MCP server exposes Statistics Finland’s official StatFin catalogue through the Model Context Protocol. The underlying source is the StatFin PxWeb API, which contains Finnish statistics on subjects including population, education, employment, consumer prices, housing, health, and national accounts.

The server supports three data-facing tools:

- `subjects` navigates the catalogue. An empty path returns the top-level subject folders, while a folder path returns its tables. Results distinguish folders from tables.
- `table_meta` describes one table’s dimensions and all valid values. Use it before constructing a detailed PxWeb request.
- `query_table` returns figures. It accepts a plain-English `select` mapping or a `body` containing a PxWeb query that is passed through.

Tables use paths such as `vkour/15ig.px`, with a folder and a four-character table identifier. Older, longer table paths are rewritten to the current format when encountered.

## How it works

A typical workflow starts with `subjects` to locate a relevant table, followed by `table_meta` to learn how that table is organized. The agent can then call `query_table` with labels such as a measure or category instead of first discovering every Finnish dimension code. The server resolves the requested values against that table’s metadata.

Unspecified dimensions receive defaults where the table provides a defensible choice. The year uses the latest published value, eliminable dimensions can be aggregated, and explicit total values such as `SSS`, `Total`, or a table-specific open-ended range may be selected. The response includes `selection_resolved`, making those choices visible. If no safe total exists, the dimension is returned in full rather than being silently reduced.

A label matching multiple values returns all matching rows. Matches that are too broad—more than 20—are reported as such. For results of up to 60 cells, the response also provides `figures`, pairing values with dimension labels instead of leaving the caller to decode a flat json-stat2 array.

## Setup and configuration

The gateway endpoint can be added to an MCP client with the URL `https://gateway.pipeworx.io/statfin-fi/mcp`. The gateway requires no account for the initial calls and adds shared Pipeworx tools alongside the pack’s three tools. A full Pipeworx gateway connection is also available at `https://gateway.pipeworx.io/mcp`.

Statfin Fi MCP server can instead run locally over stdio with the npm package `@pipeworx/mcp-statfin-fi`:

```json
{
  "mcpServers": {
    "statfin-fi": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-statfin-fi"]
    }
  }
}
```

The local process handles MCP initialization, tool listing, and tool calls for this pack only. No environment variables, registration, or authentication key are specified. HTTP tool calls are also available through the gateway’s tool API.

## Tools and capabilities

`subjects` is useful for discovering the approximately 135 top-level subject folders and the tables inside them. `table_meta` is required when a caller needs native dimension codes or wants to construct a direct `body` query. `query_table` supports both natural-language value selection and explicit PxWeb JSON, returning figures in json-stat2-compatible form.

Dimension codes remain native Finnish even when the English StatFin endpoint is used, and some labels may not be translated. Plain-English selection avoids needing to infer those codes. Direct-body callers should inspect metadata first.

## Limitations and notes

The data source is Statistics Finland, also known as Tilastokeskus, and its published data is licensed under CC BY 4.0. The server itself is licensed under MIT. The gateway connection includes shared Pipeworx meta-tools, so its tool list is larger than the three Statfin-specific tools. The local stdio package does not include those shared routing tools.

The gateway and local package use the same StatFin source and tools, but only the gateway provides `ask_pipeworx` routing across other Pipeworx data packs. For exact values, review `selection_resolved`, especially when dimensions were omitted from a request. A direct `body` request also requires the correct Finnish dimension codes and valid table values.

_Full upstream README: https://allmcps.com/mcp/statfin-fi/readme_

