Skip to content
verify mcp Beta VerifyMCP is currently in beta. If you notice any issues, get in touch and we’ll put it right.

io.github.malkreide/swiss-statistics-mcp

PYPI · SWISS-STATISTICS-MCP

BFS STAT-TAB PxWeb API for official Swiss statistics

−15 this week 76 Trust /100

Last scanned (16 hours ago)

Scores higher than 73% of PyPI servers

Category Data and Analytics

Trust breakdown (7 categories)

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →

Supply Chain Security49
  • Malware scan not yet available for this package.Unverified
  • No known CVEs affecting this package version or its production dependencies.Pass
  • Runs hatchling.build at install time, a recognised build step with no custom scripting around it. View diagnostics → Pass
  • 3 of 34 dependencies flagged as unhealthy. View diagnostics → Partial
Provenance & Transparency100
  • Source repository is publicly reachable at the declared URL. View diagnostics → Pass
  • Cryptographically verified build provenance (signed, bound to malkreide/swiss-statistics-mcp). View diagnostics → Pass
  • Clear OSI-approved license (MIT).Pass
  • Actively maintained (last published 38 days ago).Pass
  • Publishes a security disclosure policy (SECURITY.md).Pass
Schema Quality & AI Usability66
  • AI-judged instruction clarity (excellent).Pass
  • Context-footprint check failed: tool/resource definitions use about 3130 tokens (~208/item across 15 items; 15 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
  • Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management100
  • No destabilizing schema changes in the last 30 days.Pass
Tool Coverage71
  • 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
  • 0% of tool parameters carry a description.Fail
  • Structured output schemas are declared (100% of tools); any adoption earns full credit.Pass
Tool Safety100
  • No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
  • We read all 15 captured tool definition(s), and no name or description among them implies an irreversible operation.Pass
  • An AI judge read all 16 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
  • Implements a current MCP spec version (2026-07-28).Pass
Changelog

Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.

  • 4 Nov 26 −15
    • Malware scan: pass → unverified ▼ security
  • 3 Nov 26 0
    • Stability: 0.97 → pass security
  • 2 Nov 26 +1

    No change was recorded against any check on this day. Stability & Change Management went from 93 to 97. That category is still filling its 30-day observation window: 28 days of observed history at the previous scan, 29 at this one. The score rises as the window fills, whether or not the server changes.

  • 1 Nov 26 +14
    • Malware scan: unverified → pass ▲ security
    • Stability: pass → 0.93 functional
  • 31 Oct 26 −15
    • Malware scan: pass → unverified ▼ security
  • 28 Oct 26 +15
    • Malware scan: unverified → pass ▲ security
  • 27 Oct 26 −15
    • Malware scan: pass → unverified ▼ security
  • 26 Oct 26 +14
    • Malware scan: unverified → pass ▲ security
Diagnostics

Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.

Captured 4 Nov 2026 · Analysed pypi/swiss-statistics-mcp@0.8.0

Provenance Verified

A signed build attestation was found and verified, binding this exact artifact to the source repository it claims to come from.

Result Verified
Ecosystem pypi
Reason Verified
Discovered via Registry attestation endpoint
Source repo malkreide/swiss-statistics-mcp
Certificate issuer https://token.actions.githubusercontent.com
Certificate SAN https://github.com/malkreide/swiss-statistics-mcp/.github/workflows/release.yml@refs/tags/v0.8.0
Rekor log index 2969147511
Predicate type PyPI publish attestation https://docs.pypi.org/attestations/publish/v1
Subject digest sha256:f0f7d1b10416894b12d7142340a743a2a57e5a8095e6c0ad39bab66dc3189e00

Background: How many MCP packages publish verified provenance →

Install scripts 1 script
Hook Tier Command
build_backend allowlisted hatchling.build

Background: Why install scripts are a supply-chain risk →

Dependencies 34 packages
Packages resolved 34
Stale 2
No linked repository 1
Tree resolution Complete

Background: SBOMs and build attestations, explained →

MCP tools · 15 exposed · ~2,874 tokens

The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →

Tool Tokens
bfs_browse_catalog ~235

Browse the BFS catalogue: the theme list, or the datasets within a theme. Two modes in one tool (`mode` in the result says which ran): - Omit `theme_code` → list all 21 statistical themes with their 2-digit codes and dataset counts (the taxonomy of Swiss federal statistics). - Provide `theme_code` → list the datasets in that theme (table IDs + titles) to feed bfs_get_table_metadata / bfs_get_data. Args: params (BrowseCatalogInput): - theme_code (str | None): 2-digit theme code, e.g. '15' for Bildung; omit for the theme list - lang (str): Language code ('de', 'fr', 'it', 'en') - limit (int): Max tables to return (theme mode; default 20) Returns: BrowseCatalogResult. `mode='themes'` populates `themes`; `mode='tables'` populates `tables` plus theme metadata. On error, `error`/`hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
error–––
hint–––
mode–––
next_step–––
note–––
returned–––
tables–––
theme_code–––
theme_name–––
themes–––
total_datasets–––
total_in_theme–––

No examples provided.

bfs_compare_cantons ~202

Compare a BFS statistical indicator across multiple Swiss cantons. Designed for KI-Fachgruppe demos and benchmarking. Fetches the same dataset for multiple cantons simultaneously, enabling direct comparison. Args: params (CompareCantonsInput): - table_id (str): BFS table ID to query - canton_values (list[str]): Canton value codes to compare. Use '0' for Switzerland total, '1' for Zürich, '2' for Bern, etc. Get codes via bfs_get_table_metadata on any canton-level table. - additional_filters (Optional[list]): Extra dimension filters - lang (str): Language code Returns: str: JSON with data for all selected cantons side by side. Example use case: Compare teacher-to-student ratios across ZH, BE, LU, CH total: canton_values=['0', '1', '2', '3']

NameTypeReqDescription
params–yes–
NameTypeReqDescription
breakdown–––
canton–––
canton_filter–––
canton_variable–––
cantons_compared–––
dimensions–––
error–––
hint–––
language–––
note–––
region–––
rows–––
rows_returned–––
rows_total–––
source–––
table_id–––
title–––
topic–––
topic_description–––
truncatedboolean––
updated–––
year–––

No examples provided.

bfs_construction_activity ~257

Yearly new buildings and new dwellings for a commune, with room-size mix. Returns the consolidated official annual construction statistics (BFS STAT-TAB theme 09) for one commune: newly built buildings with dwellings (px-x-0904030000_106) and newly built dwellings broken down by number of rooms (px-x-0904030000_105), as a per-year series from `since_year`. Note: this is the *consolidated official yearly* statistic. For up-to-date building-register states and the construction pipeline (Baugesuche / Bauvorhaben), see the `swiss-housing-mcp` server — the overlap is deliberate so the two sources can be cross-validated. Args: params (ConstructionActivityInput): - municipality_bfs (int): BFS commune number, e.g. 261 (Zürich) - since_year (int): earliest year, inclusive (default 2015) Returns: ConstructionActivityResult with a `years` series (new_buildings, new_dwellings, dwellings_by_rooms). On error, `error`/`hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
cross_validation–––
error–––
hint–––
municipality_bfs–––
municipality_name–––
note–––
provenance–––
since_year–––
sourcestring––
table_ids–––
years–––

No examples provided.

bfs_construction_investment ~216

Yearly building investment and Arbeitsvorrat for a region/canton/commune. Returns building investment (Bauinvestitionen, current year) alongside the Arbeitsvorrat (work on hand for the following year) from BFS STAT-TAB px-x-0904010000_205, as a per-year series from `since_year`. The Arbeitsvorrat is the monetary leading indicator: it signals next year's construction volume before it is realised. Args: params (ConstructionInvestmentInput): - level (str): 'grossregion', 'kanton', or 'gemeinde' - code (str): region/canton/commune code matching `level` - since_year (int): earliest year, inclusive (default 2015) Returns: ConstructionInvestmentResult with a `years` series (investment, work_on_hand) in 1000 CHF. On error, `error`/`hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
code–––
error–––
hint–––
level–––
note–––
provenance–––
region_name–––
since_year–––
sourcestring––
table_id–––
unit–––
years–––

No examples provided.

bfs_education_stats ~173

Retrieve Swiss education statistics — convenience tool for Schulamt context. Provides direct access to key education datasets without needing to know table IDs or variable codes. Covers teachers, students, enrollment scenarios, and scholarship data, optionally filtered by canton. Args: params (GetEducationStatsInput): - topic (str): One of: 'teachers', 'students', 'scenarios', 'scholarships' - canton (Optional[str]): Canton name, e.g. 'Zürich'. None = all cantons. - lang (str): Language code Returns: DataTableResult with `topic`, `topic_description`, `canton_filter` on success, plus the data table fields. On error, `error` and `hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
breakdown–––
canton–––
canton_filter–––
canton_variable–––
cantons_compared–––
dimensions–––
error–––
hint–––
language–––
note–––
region–––
rows–––
rows_returned–––
rows_total–––
source–––
table_id–––
title–––
topic–––
topic_description–––
truncatedboolean––
updated–––
year–––

No examples provided.

bfs_featured_datasets ~99

Return a curated list of high-value BFS datasets for Schulamt and public administration. Provides a shortlist of the most relevant datasets for education planning, demographic analysis, and political context — ideal as a starting point. Args: params (ListThemesInput): - lang (str): Language code Returns: FeaturedDatasetsResult with curated table IDs, titles, themes, and recommended use cases.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
error–––
featured_datasets–––
hint–––
quick_start–––
total–––

No examples provided.

bfs_get_data ~197

Query statistical data from a BFS table with optional filters. Fetches actual data values from a STAT-TAB table. Always call bfs_get_table_metadata first to understand available variables and values. Args: params (GetDataInput): - table_id (str): BFS table ID - filters (Optional[list]): Dimension filters to narrow results. Each filter: {"code": "VariableCode", "values": ["val1", "val2"]} Without filters, all data is returned (may be very large). - lang (str): Language for labels - max_rows (int): Safety limit on returned rows (default 500) Returns: DataTableResult with `dimensions`, `rows`, plus `truncated`, `rows_total`, `rows_returned` for machine-readable capping. On error, `error` and `hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
breakdown–––
canton–––
canton_filter–––
canton_variable–––
cantons_compared–––
dimensions–––
error–––
hint–––
language–––
note–––
region–––
rows–––
rows_returned–––
rows_total–––
source–––
table_id–––
title–––
topic–––
topic_description–––
truncatedboolean––
updated–––
year–––

No examples provided.

bfs_get_table_metadata ~218

Get metadata for a BFS table: title, variables, and available filter values. Essential step before calling bfs_get_data. Returns all dimension variables with their codes and value labels needed to construct data queries. Args: params (GetTableMetadataInput): - table_id (str): BFS table ID, e.g. 'px-x-1504000000_173' - lang (str): Language for labels Returns: str: JSON with table title, source, update date, and all variables with their codes and value options. Use variable codes in bfs_get_data filters. Example output structure: { "title": "Lehrkräfte nach Schuljahr, Kanton...", "variables": [ { "code": "Schuljahr", "label": "Schuljahr", "n_values": 14, "values": [{"code": "0", "label": "2010/11"}, ...] } ] }

NameTypeReqDescription
params–yes–
NameTypeReqDescription
error–––
hint–––
language–––
last_updated–––
n_variables–––
source–––
table_id–––
theme_code–––
theme_name–––
title–––
usage_hint–––
variables–––

No examples provided.

bfs_population ~142

Retrieve Swiss population statistics by region, year, and breakdown. Accesses the core BFS population dataset (ständige Wohnbevölkerung) with flexible filtering by canton/municipality, year, age, and gender. Critical for school space planning and demographic projections. Args: params (GetPopulationInput): - region (str): 'Schweiz', or canton name like 'Zürich' - year (Optional[str]): Year filter, e.g. '2024' - breakdown (str): 'total', 'age', or 'gender' Returns: str: JSON with population figures for the selected region and breakdown.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
breakdown–––
canton–––
canton_filter–––
canton_variable–––
cantons_compared–––
dimensions–––
error–––
hint–––
language–––
note–––
region–––
rows–––
rows_returned–––
rows_total–––
source–––
table_id–––
title–––
topic–––
topic_description–––
truncatedboolean––
updated–––
year–––

No examples provided.

bfs_price_index ~240

Swiss price indices not carried by STAT-TAB: Baupreisindex & IMPI. - `baupreisindex`: the construction price index — returns the national semi-annual index series (Schweiz, Baugewerbe Total), parsed from the BFS DAM XLSX selected via opendata.swiss (CKAN) metadata. - `impi`: the residential property price index — BFS publishes this only as PDF/HTML, so this returns the official source links plus an explicit limitation rather than parsed values. Data flows through opendata.swiss (CKAN), which rejects default User-Agents with HTTP 403; a custom User-Agent is always sent. Results are cached for 24h. Args: params (PriceIndexInput): - index (str): 'baupreisindex' or 'impi' - since_year (int | None): optional earliest year to include Returns: PriceIndexResult with `series` (baupreisindex) or `source_links` (impi). On error, `error`/`hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
base–––
coverage–––
dataset–––
error–––
hint–––
index–––
note–––
provenance–––
series–––
sourcestring––
source_links–––
title–––

No examples provided.

bfs_search_tables ~188

Search for BFS statistical tables by keyword in their titles. Performs a full-text search across all 682+ BFS table titles. Results include table IDs needed for bfs_get_table_metadata and bfs_get_data. Note: First call builds a catalog (~682 API requests). Subsequent calls within 1 hour use the cached catalog and are instant. Args: params (SearchTablesInput): - query (str): Search keywords, e.g. 'Lehrkräfte', 'Schüler Kanton' - theme_code (Optional[str]): Filter by theme, e.g. '15' - lang (str): Language for table titles - limit (int): Max results (default 10) Returns: SearchTablesResult with matching tables. On error, `error` and `hint` are set and `results` is None.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
error–––
hint–––
next_step–––
query–––
results–––
total_matches–––

No examples provided.

list_communes ~147

List all communes of a canton, as of a given date. Canton membership is derived from the snapshot's Parent chain (commune → district → canton), so this reflects the official division on `valid_at_date`. Each entry carries its BFS number and LINDAS URI. Args: params (ListCommunesInput): - canton (str): abbreviation ('ZH') or name ('Zürich') - valid_at_date (str): ISO date; default today Returns: ListCommunesResult with the canton's `communes`, sorted by BFS number. On error, `error` and `hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
canton–––
canton_abbr–––
communes–––
error–––
hint–––
note–––
provenance–––
sourcestring––
total–––
valid_at_date–––

No examples provided.

lookup_commune ~166

Resolve a Swiss commune by name or BFS number, as of a given date. The BFS commune number is the portfolio's join key. This tool returns the official register entry — BFS number, name, canton, validity dates and the stable LINDAS URI — for a commune as it existed on `valid_at_date`. Args: params (LookupCommuneInput): - name_or_bfs_number (str): name/substring or BFS number - valid_at_date (str): ISO date; commune state as of this date Returns: LookupCommuneResult with matching `communes` (BFS number, canton, validity, LINDAS URI). On error, `error` and `hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
communes–––
error–––
hint–––
note–––
provenance–––
query–––
sourcestring––
total_matches–––
valid_at_date–––

No examples provided.

resolve_historical_commune ~203

Map a historical BFS commune number onto today's number(s). This is the core value of the reference layer: when old statistics are keyed on a BFS number that has since been merged or renamed, this tool returns which of today's commune(s) that number resolves to, plus the mutation path (fusions/renamings with dates). Use `resolves_to` to re-key (umschlüsseln) old figures onto the current municipal division. Args: params (ResolveHistoricalCommuneInput): - bfs_number (int): historical BFS number - from_date (str): ISO date the old data belongs to - to_date (str): ISO target date (default today) Returns: ResolveHistoricalCommuneResult with `resolves_to` (today's BFS number/name/LINDAS URI) and `mutation_path`. On error, `error`/`hint`.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
bfs_number–––
error–––
from_date–––
hint–––
mutation_path–––
note–––
provenance–––
resolves_to–––
sourcestring––
to_date–––
unchanged–––

No examples provided.

search_historical_series ~191

Search long-run historical time series (HSSO) by topic. Historical Statistics of Switzerland provides long-run series (roughly 19th–20th century) as static XLSX tables. This tool searches the table catalogue by keyword and returns each match with its page and a stable XLSX download URL. Licence: HSSO is CC BY-NC-SA 3.0 — attribution required, NonCommercial. Every response carries that notice in `licence_note`. Args: params (SearchHistoricalSeriesInput): - topic (str): keyword(s); all must match the title - period (str): optional period hint (informational only) Returns: SearchHistoricalSeriesResult with matching `series` (code, title, page URL, XLSX URL). On error, `error` and `hint` are set.

NameTypeReqDescription
params–yes–
NameTypeReqDescription
error–––
hint–––
licence_notestring––
note–––
period–––
provenance–––
series–––
sourcestring––
topic–––
total_matches–––

No examples provided.

Install

How do I install the io.github.malkreide/swiss-statistics-mcp server?

io.github.malkreide/swiss-statistics-mcp runs locally as a PyPI package, launched with uvx swiss-statistics-mcp. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.

pypi · swiss-statistics-mcp

# add to Claude Code
claude mcp add malkreide-swiss-statistics-mcp -- uvx swiss-statistics-mcp
Common questions

What is the io.github.malkreide/swiss-statistics-mcp server?

io.github.malkreide/swiss-statistics-mcp is listed in the public MCP registry as io.github.malkreide/swiss-statistics-mcp. BFS STAT-TAB PxWeb API for official Swiss statistics. This page covers its PyPI package (swiss-statistics-mcp).

Is the io.github.malkreide/swiss-statistics-mcp server safe to use?

io.github.malkreide/swiss-statistics-mcp scores 76 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 4 November 2026. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.

What tools does the io.github.malkreide/swiss-statistics-mcp server expose?

io.github.malkreide/swiss-statistics-mcp exposes 15 tools: bfs_browse_catalog, bfs_search_tables, bfs_get_table_metadata, bfs_get_data, bfs_education_stats, and 10 more. Their descriptions and schemas cost roughly 2,874 tokens of context every time the server is loaded.

Is the io.github.malkreide/swiss-statistics-mcp server still maintained?

io.github.malkreide/swiss-statistics-mcp is still listed as active in the MCP registry. We last reached this channel on 4 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.

What licence is the io.github.malkreide/swiss-statistics-mcp server under?

io.github.malkreide/swiss-statistics-mcp declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.