malkreide avatar

Swiss Statistics Mcp

malkreide/swiss-statistics-mcp

Connects Claude to the Swiss Federal Statistical Office's STAT-TAB PxWeb API with 682 datasets across 21 themes (education, population, economy, health) in four languages. No authentication required. Nine tools cover discovery (search, browse by theme), metadata inspection, and data retrieval with built-in conveniences for education stats, population breakdowns, and cross-cantonal comparisons. Returns structured Pydantic models with truncation flags and row counts. Useful when you need authoritative Swiss government data without hallucination, especially for demographic analysis, school enrollment figures, or cantonal benchmarking. Runs stdio for Claude Desktop or SSE for browser deployments. Alpha maturity, schema may change before 1.0.

GitHub stars
2
tools
15
transport
STDIO
last updated
Sep 26, 2026

Tools

15 tools

Public tool metadata for what this MCP can expose to an agent.

bfs_featured_datasetsCurated list of highly relevant datasets (focus on education and demographics)

Curated list of highly relevant datasets (focus on education and demographics)

No parameter schema in public metadata yet.

bfs_browse_catalogBrowse the catalogue: all 21 themes (no `theme_code`), or all tables in a theme (e.g. `theme_code="15"` = Education and Science)

Browse the catalogue: all 21 themes (no `theme_code`), or all tables in a theme (e.g. `theme_code="15"` = Education and Science)

No parameter schema in public metadata yet.

bfs_search_tablesFull-text search across the entire data catalogue (682 datasets)

Full-text search across the entire data catalogue (682 datasets)

No parameter schema in public metadata yet.

bfs_get_table_metadataVariables, values and metadata for a specific table

Variables, values and metadata for a specific table

No parameter schema in public metadata yet.

bfs_get_dataData retrieval with optional filters by dimensions and values

Data retrieval with optional filters by dimensions and values

No parameter schema in public metadata yet.

bfs_education_statsConvenience tool: teachers, pupils, demographic scenarios, scholarships

Convenience tool: teachers, pupils, demographic scenarios, scholarships

No parameter schema in public metadata yet.

bfs_populationResident population by canton, year, age structure or sex

Resident population by canton, year, age structure or sex

No parameter schema in public metadata yet.

bfs_compare_cantonsCross-cantonal comparison for any table and any variable

Cross-cantonal comparison for any table and any variable

No parameter schema in public metadata yet.

lookup_communeResolve a commune by name or BFS number as of a given date (canton, validity, LINDAS URI)

Resolve a commune by name or BFS number as of a given date (canton, validity, LINDAS URI)

No parameter schema in public metadata yet.

resolve_historical_communeMap a historical BFS number onto today's number(s) — re-key old statistics across fusions

Map a historical BFS number onto today's number(s) — re-key old statistics across fusions

No parameter schema in public metadata yet.

list_communesList all communes of a canton as of a given date

List all communes of a canton as of a given date

No parameter schema in public metadata yet.

search_historical_seriesSearch long-run time series in Historical Statistics of Switzerland (HSSO)

Search long-run time series in Historical Statistics of Switzerland (HSSO)

No parameter schema in public metadata yet.

bfs_construction_activityNew buildings & dwellings per commune (yearly), incl. dwelling room-size mix

New buildings & dwellings per commune (yearly), incl. dwelling room-size mix

No parameter schema in public metadata yet.

bfs_construction_investmentBuilding investment & Arbeitsvorrat (leading indicator) by region/canton/commune

Building investment & Arbeitsvorrat (leading indicator) by region/canton/commune

No parameter schema in public metadata yet.

bfs_price_indexConstruction price index (Baupreisindex, parsed series) / residential property price index (IMPI, source links)

Construction price index (Baupreisindex, parsed series) / residential property price index (IMPI, source links)

No parameter schema in public metadata yet.

Sponsors

Readme

🇨🇭 Part of the Swiss Public Data MCP Portfolio

📊 swiss-statistics-mcp

Version License: MIT Python 3.11+ MCP No Auth Required CI

MCP Server for Swiss Federal Statistical Office (BFS) data via STAT-TAB PxWeb API — 682 datasets across 21 themes, no authentication required

🇩🇪 Deutsche Version


Demo

Demo: Claude using bfs_education_stats


Maturity

This server is Alpha (0.x) as per the PyPI classifier. Until 1.0:


View the full README on GitHub

Details

Repository
github.com/malkreide/swiss-statistics-mcp
Website
github.com/malkreide/swiss-statistics-mcp
Package
swiss-statistics-mcp
Transport
STDIO
Registry
MCP registry, active

More from malkreide