
Statfin Mcp
io.github.3121n由 GitHub 帳號 3121n 發布v0.1.0更新於 Oct 24, 2026
Statistics Finland (StatFin/PxWeb): search tables, read metadata, fetch JSON-stat2 data.
概覽
讓助理搜尋芬蘭統計局的 StatFin 資料表、讀取其中繼資料,並以 JSON-stat2 格式取得官方統計資料。
- 可以做什麼
- 包裝 StatFin 的 PxWeb API,用於芬蘭官方統計。工具可用本機打包的索引以關鍵字搜尋 3000 多張表,回傳表的標題與維度及有效取值代碼,依條件取得 JSON-stat2 資料,並列出約 140 個主題領域。所有工具都接受選用語言參數(預設英文,另有芬蘭文、瑞典文);變數代碼與語言無關。
- 適用情境
- 當助理需要芬蘭官方統計資料(例如人口、經濟等 StatFin 主題),並依地區、年份和變數篩選時適用。也適合在查詢前先了解有哪些表以及維度代碼。
- 執行需求
- 以本機 stdio 程序執行,通常用 npx 從 npm 套件 @nor-data/statfin-mcp 啟動,因此需要 Node.js 以及連線至 StatFin PxWeb API 的網路。不需要 API 金鑰或帳號。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Statfin Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@nor-data/statfin-mcp
MCP server for official statistics from Statistics Finland (Tilastokeskus) — the StatFin database, exposed through the PxWeb API. Search 3000+ tables, inspect their dimensions, and pull data as JSON-stat2. No API key required.
Part of the nor-data family of Nordic open-data MCP
servers. Built on the same pattern as the SSB (Norway) server — StatFin and SSB both
speak PxWeb, so the tools mirror each other.
Tools
All tools accept an optional lang (en default, fi, sv). Variable codes
are language-independent; only titles/labels are localised.
Example agent flow
sok_tabell({ query: "population by region" })→tabell_id: "vaerak/statfin_vaerak_pxt_11ra.px"hent_tabell({ tabell_id })→ sees variablesAlue(area),Vuosi(year),Tiedot(info)hent_data({ tabell_id, filtre: { Alue: ["SSS"], Vuosi: { filter: "top", values: ["1"] } } })→ latest national figures as JSON-stat2
Install
Develop
The search index is bundled in the package (data/tables-index.json). Re-run
npm run build-index to refresh it (nightly is plenty — StatFin updates tables,
not the tree, frequently).
Notes & limits
- PxWeb allows 30 calls / 10 s and rejects queries over ~100 000 cells
(HTTP 403) — keep
hent_dataselections small (few regions × few years). - A few subjects (
vtp,kivih,sekn,akay) return HTTP 400 server-side and are skipped during indexing; this is a StatFin quirk, not a bug here. The index records them underskipped. - Data licensed under CC BY 4.0 by Statistics Finland.
License
MIT
來源:README.md,提交 4dbfb9d
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。