Bag MCP Server

BAG public-health open data: indicators, programmes, statistics

Local serverstdioPython

What is the Bag MCP server?

BAG public-health open data: indicators, programmes, statistics. The bag mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 10 defined tools rather than through you.

What it actually does

MCP server for Swiss public health data. Its core is the Swiss Federal Office of Public Health (BAG) Infectious Disease Dashboard (IDD) — epidemiological surveillance for 51 pathogens (influenza, COVID-19, measles, wastewater surveillance, and more) — extended with a multi-source health-indicator layer over the Swiss Health Observatory (Obsan), the Versorgungsatlas (health-care supply atlas, with cantonal series) and Sucht Schweiz (HBSC youth survey). All read-only, public Open Government Data.

Its toolset

Everything the assistant can do here goes through one of these:

  • bag_health_mcp__list_diseases — List all 51 disease topics, grouped by category
  • bag_health_mcp__list_series — List data series for a specific disease
  • bag_health_mcp__get_series_details — Get available filter dimensions (canton, age, sex)
  • bag_health_mcp__get_disease_data — Fetch time-series surveillance data
  • bag_health_mcp__get_canton_situation — Situational overview for a canton (Schulamt use case)
  • bag_health_mcp__list_export_files — List available complete export datasets
  • bag_health_mcp__download_export — Download raw CSV/JSON export
  • bag_health_mcp__get_data_version — Current data version (updated every Wednesday)
  • bag_health_mcp__search_health_indicators — Search indicators by source (obsan / versorgungsatlas / suchtschweiz), topic, region, year range
  • bag_health_mcp__get_indicator_series — Fetch one indicator's time series (national with 95% CIs; Versorgungsatlas also cantonal, with a canton-vs-Switzerland comparison)

Configuration

You will need 2 environment variables: OTEL_EXPORTER_OTLP_ENDPOINT, MCP_AUTH_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Adding it to your client

The server ships on PyPI as bag-health-mcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

When to reach for it

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Bag's toolset — bag_health_mcp__list_diseases, bag_health_mcp__list_series, bag_health_mcp__get_series_details and 7 more — is a fair guide to whether it matches your workflow. It is maintained by malkreide; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Bag's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Bag.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the bag mcp server does with a few real requests.

Available tools

ToolWhat it does
bag_health_mcp__list_diseasesList all 51 disease topics, grouped by category
bag_health_mcp__list_seriesList data series for a specific disease
bag_health_mcp__get_series_detailsGet available filter dimensions (canton, age, sex)
bag_health_mcp__get_disease_dataFetch time-series surveillance data
bag_health_mcp__get_canton_situationSituational overview for a canton (Schulamt use case)
bag_health_mcp__list_export_filesList available complete export datasets
bag_health_mcp__download_exportDownload raw CSV/JSON export
bag_health_mcp__get_data_versionCurrent data version (updated every Wednesday)
bag_health_mcp__search_health_indicatorsSearch indicators by source (obsan / versorgungsatlas / suchtschweiz), topic, region, year range
bag_health_mcp__get_indicator_seriesFetch one indicator's time series (national with 95% CIs; Versorgungsatlas also **cantonal**, with a canton-vs-Switzerland comparison)

How to install the Bag MCP server

{
  "mcpServers": {
    "bag-health": {
      "command": "uvx",
      "args": ["bag-health-mcp"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
OTEL_EXPORTER_OTLP_ENDPOINTConfiguration value read at startup.Optional
MCP_AUTH_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Bag to bag health mcp list diseases.
  • Use Bag to bag health mcp list series.
  • Use Bag to bag health mcp get series details.

Frequently asked questions

It connects Bag to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (bag_health_mcp__list_diseases, bag_health_mcp__list_series, bag_health_mcp__get_series_details, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Bag directly.