bag-health-mcp
This MCP server provides read-only access to Swiss public health open data from the BAG Infectious Disease Dashboard (IDD), the Swiss Health Observatory (Obsan), the Versorgungsatlas (health-care supply atlas), and Sucht Schweiz (HBSC youth survey).
Infectious disease surveillance: List all 51 disease topics, discover available data series for a disease, get series metadata (valid filters like canton, age, sex), fetch time-series surveillance data (weekly or yearly cases, incidence rates), and obtain a canton-specific public health situation overview.
Bulk data access: List and download complete export datasets (CSV/JSON) for any disease.
Data freshness: Retrieve the current data version (updated every Wednesday).
Health indicators: Search for health indicators across Obsan, Versorgungsatlas, and Sucht Schweiz, then fetch their time series with 95% confidence intervals, cantonal breakdowns, and canton-vs-Switzerland comparisons where available.
Reference resources: Access static lists of canton codes, disease categories, and data licence/attribution information.
Reusable workflows: Use built-in prompts for a canton situation brief or outbreak check, combining multiple tool calls into one action.
Key characteristics: All operations are read-only with no authentication required; data is aggregated (no individual-level data); coverage includes Switzerland and Liechtenstein, 26 cantons, 51 pathogens, and 1,386 data series; every response includes provenance and attribution metadata.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bag-health-mcpHow is the flu evolving in Bern this week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
bag-health-mcp
Part of the Swiss Public Data MCP Portfolio β connecting AI models to Swiss public data sources.
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.
What You Can Do
"Wie ist die aktuelle Grippesituation im Kanton ZΓΌrich verglichen mit den letzten Wochen?"
β bag_health_mcp__get_canton_situation(canton="ZH")
"Gibt es aktuell einen Masernausbruch in der Schweiz?"
β bag_health_mcp__get_disease_data(series_id="measles/cases/incValue/year", canton="all")
"Wie entwickelt sich das SARS-CoV-2-Signal im Abwasser?"
β bag_health_mcp__list_series(topic="wastewater_viral_load")
β bag_health_mcp__get_disease_data(series_id="wastewater_viral_load/NA/value/date", ...)
"Welche Krankheitsdaten stellt das BAG aktuell bereit?"
β bag_health_mcp__list_diseases()
"Wie hat sich der Alkoholkonsum bei 15-JΓ€hrigen seit 2010 entwickelt?" # π― anchor query
β bag_health_mcp__search_health_indicators(source="suchtschweiz", topic="alkohol")
β bag_health_mcp__get_indicator_series(source="suchtschweiz",
indicator_id="monam/alkoholkonsum-alter-11-15", region="ZH", year_from=2010)
β More use cases by audience βπ― Anchor demo query β Β«Wie hat sich der Alkoholkonsum bei 15-JΓ€hrigen im Kanton ZΓΌrich seit 2010 entwickelt, und wie steht der Kanton im Schweizer Vergleich da?Β» The HBSC youth series (via Obsan) answers the Switzerland-wide trend since 2010 with 95% confidence intervals. This particular indicator is national only, so the response includes a
region_notesaying so (HBSC is not cantonally representative). Most other Obsan indicators are published by canton β see the note on cuts below. These are aggregated population statistics β not individual advice. Seedocs/tool-design-health-indicators.md.
Related MCP server: swisstopo-mcp
Tools
Infectious-disease surveillance (BAG IDD):
Tool | Description |
| List all 51 disease topics, grouped by category |
| List data series for a specific disease |
| Get available filter dimensions (canton, age, sex) |
| Fetch time-series surveillance data |
| Situational overview for a canton (Schulamt use case) |
| List available complete export datasets |
| Download raw CSV/JSON export |
| Current data version (updated every Wednesday) |
Health indicators β Obsan, Versorgungsatlas & Sucht Schweiz (multi-source):
Tool | Description |
| Search indicators by |
| Fetch one indicator's time series, naming which cut it is ( |
β οΈ Aggregated population statistics only. The indicator tools serve population-level aggregates (prevalences/metrics by age/sex/region) β not individual advice, diagnosis or case assessment, and no personal data. This is stated in both tool descriptions and every response (
aggregate_statistics_notice), and matters especially forsuchtschweiz(HBSC), which touches prevention topics in a school context. Sources: Obsanind.obsan.admin.ch(clean JSON API); Sucht Schweiz HBSC via the Obsan mirror (national); Versorgungsatlas returns a cantonal year/value series (26 cantons + aCHnational total, with 95% CIs and a canton-vs-CH ratio) from the Tarifpool. See the per-source probe notes.
Obsan publishes an indicator in several cuts, not one series. Measured over 60 catalogue entries on 2026-08-08: 50 have a cantonal cut (
kg), 49 one by age class (ag), 24 one by social position (sd) β and only 3 the plain national one (g). They are different measurements with different units, soget_indicator_seriesnames the cut it returned invariantand lists the rest invariants_available, rather than presenting one as a stand-in for another. Eight of the 60 publish no series at all; that case fails with its reason instead of returning an empty result. The census is recorded and dated intests/fixtures/obsan_variant_census.json.
Tool annotations
All tools carry MCP tool annotations so a host can reason about them without calling. Every tool is identical here β it only ever reads from the public, allow-listed data sources (BAG IDD, Obsan, Versorgungsatlas):
Annotation | Value | Meaning |
|
| No tool mutates any state. |
|
| No destructive side effects. |
|
| Repeating a call has no additional effect. |
|
| Tools reach an external system (the upstream data APIs). |
A host may therefore treat all calls as safe, cacheable reads. The values are
declared once as READ_ONLY in server.py and applied to all 10 tools.
MCP Primitives
This server uses all three MCP primitives, each for what it is best at:
Tools (10) β live, parameterised actions that call the IDD API (above).
Resources β static, read-only reference data a host can fetch and cache, no arguments or upstream call needed:
Resource URI | Description |
| Canton codes accepted by the tools (incl. FL, |
| Disease-topic taxonomy by category |
| Source, attribution and licence terms |
Prompts β reusable, parameterised workflows a host can surface (e.g. as slash-commands):
Prompt | Arguments | Purpose |
|
| Draft a Schulamt public-health situation brief |
|
| Check whether a disease is currently elevated |
Live surveillance data stays behind Tools (it is parameterised and changes weekly); fixed reference data is exposed as Resources; recommended multi-tool workflows are packaged as Prompts.
Relevance for Schools & City Administration
Schulamt / KreisschulbehΓΆrden:
Monitor influenza and ARI incidence in your canton
Single measles case β alert for schools with low vaccination coverage
Pertussis tracking β protect unvaccinated infants (siblings of school children)
Stadtverwaltung / KI-Fachgruppe:
Public Health Reporting with structured weekly data
Wastewater surveillance as 1-week lead indicator before clinical cases
Synergy with portfolio:
bag-epl-mcpβ "What treatments are listed?" (EPL medication database)bag-health-mcpβ "What is currently spreading?" (surveillance data)
Data Source
IDD API:
https://api.idd.bag.admin.chβ No authentication requiredUpdate cycle: Every Wednesday
Coverage: Switzerland + Liechtenstein (FL), 26 cantons
Topics: 51 pathogens, 1386 data series
Datenquellen & Lizenzen / Data sources & licences
Source | Provider | Licence | Attribution required |
Infectious Disease Dashboard (IDD) | Federal Office of Public Health (FOPH / BAG) | opendata.swiss Open Government Data β free use, source attribution required (Swiss OGD terms, CC BY-equivalent) | Yes |
Health indicators | Obsan β Swiss Health Observatory ( | No explicit machine-readable licence; treat as Swiss OGD practice β free use, cite the per-indicator source | Yes |
Health-care supply atlas | Versorgungsatlas (BAG/Obsan, | Same (Swiss OGD practice, cite source) | Yes |
HBSC youth survey | Sucht Schweiz β HBSC, obtained via the Obsan mirror | Same (Swiss OGD practice, cite Β«Sucht Schweiz β HBSCΒ») | Yes |
Required citation: Federal Office of Public Health FOPH β Infectious Disease
Dashboard (IDD), open data via opendata.swiss. For the indicator tools, each
response's provenance.source names the concrete upstream (e.g. Β«Sucht Schweiz β
HBSCΒ» via Obsan). Every tool response carries attribution in a provenance block
(attribution + license fields) so downstream consumers can surface it
automatically.
Architecture:
βββββββββββββββββββ api.idd.bag.admin.ch (IDD API, no auth)
MCP Host β bag-health-mcp ββββΆ ind.obsan.admin.ch (Obsan JSON API)
(Claude, etc.) βββΆβ MCP SDK ββββΆ versorgungsatlas.ch (indicator catalogue)
β 10 Tools β all HTTPS, egress allow-listed, no auth
βββββββββββββββββββInstallation
Claude Desktop (stdio)
{
"mcpServers": {
"bag-health": {
"command": "uvx",
"args": ["bag-health-mcp"]
}
}
}Cloud / HTTP
pip install bag-health-mcp
python -m bag_health_mcp.server --http --port 8000Transport, host and port are set via environment variables β MCP_TRANSPORT
(http/stdio), MCP_HOST, MCP_PORT β which is the recommended way for
deployments (the --http flag still works for local use). The server binds to
127.0.0.1 by default so a local HTTP server is not exposed to the network.
Container/cloud deployments bind all interfaces by setting MCP_HOST=0.0.0.0
explicitly β the provided Dockerfile does this.
β οΈ Security: HTTP transport exposes the server on the network. Only bind beyond
127.0.0.1in a network-isolated environment β never directly on a public/shared network. Binding to a non-localhost host logs a warning at startup. The default stdio transport has no network surface. Seedocs/security-posture.md.
HTTP auth (optional): set MCP_AUTH_TOKEN to require
Authorization: Bearer <token> on every HTTP request (401 otherwise). Unset =
no auth (fine for stdio/local). This gates who may invoke the server; for real
user identity, front it with a gateway.
CORS (browser clients): set MCP_CORS_ORIGINS to a comma-separated origin
allow-list to enable cross-origin browser access; the Mcp-Session-Id header is
exposed so stateful sessions work. Empty = no cross-origin (never a wildcard).
Host allow-list (DNS rebinding): set MCP_ALLOWED_HOSTS to a comma-separated
list of the names this server is reachable under, including the port, e.g.
bag.example.ch:8000. Requests arriving under any other Host are rejected
with 421; loopback stays allowed so container health checks keep working.
Unset on a non-localhost bind, the check is left off and a warning is logged β
that is the gateway-fronted deployment, where the gateway validates Host. It
is not guessed: on 0.0.0.0 the reachable name is unknowable here, and a wrong
guess would reject the very deployment it is meant to protect.
This is independent of MCP_AUTH_TOKEN. The token says who is asking; this
says under which name the server is addressed. A rebinding attack runs in a
browser that already holds the token.
For running at scale (session affinity, resource limits, MCP gateway), see the
deployment & scaling guide and the reference
manifests in deploy/.
Logging: the server emits structured JSON logs (one object per line, with an
RFC 5424 severity) to stderr β stdout is reserved for the stdio JSON-RPC
transport. Set the level with MCP_LOG_LEVEL (default INFO).
Tracing (optional): install the telemetry extra and point the server at an OTLP collector to get OpenTelemetry spans per tool-call plus instrumented outbound HTTP:
pip install "bag-health-mcp[telemetry]"
export OTEL_EXPORTER_OTLP_ENDPOINT="http://otel-collector:4318"
# optional: OTEL_SERVICE_NAME=bag-health-mcpTracing is a no-op unless both the extra is installed and an OTEL_*
endpoint is set. Spans carry only the tool name and (on error) the exception
class β never tool arguments, cantons or surveillance data.
Available Disease Topics
Category | Topics |
Respiratory | influenza, covid19, acute_respiratory_infection, respiratory_pathogens |
Enteric | campylobacteriosis, salmonellosis, ehec, listeriosis, hepatitis_a/e |
STI & Bloodborne | hiv, aids, syphilis, gonorrhea, hepatitis_b/c, chlamydiosis |
Vaccine-preventable | measles, pertussis, rubella, tetanus, diphtheria, ipd, meningo |
Vector-borne | lyme_borreliosis, tick-borne_encephalitis, dengue, malaria, zika |
Wastewater | wastewater_viral_load, wastewater_sequencing |
Demo
Claude asking about the influenza situation in canton Zurich β single tool call, structured result, actionable German-language summary.
Safety & Limits
Aspect | Details |
Access | Read-only β no write operations possible |
Egress | Code-layer allow-list: the server only contacts three public data hosts ( |
Personal data | None β all sources are aggregated/anonymised (BAG IDD at canton level by law; indicators are population aggregates by age/sex/region) |
Rate limits | No published IDD API rate limit; server caps responses at 104 data points per call by default ( |
Timeout | 30 s per API call |
Authentication | No API keys required β all data publicly accessible |
Data licence | opendata.swiss OGD β free use, source attribution required (CC BY-equivalent). FOPH IDD must be cited; see Data sources & licences |
Terms of Service | Subject to BAG IDD API ToS |
Known Limitations
Beta API: IDD API is labelled
v0.1 betaβ schema may change without noticeWeekly cadence: Data is not real-time; updated Wednesdays only
Canton granularity: Some rare diseases have insufficient cases for canton-level data (suppressed for privacy)
Age groups: Available dimensions vary by disease series; use
bag_health_mcp__get_series_detailsto check
Compliance
ISDS (Stadt ZΓΌrich): a draft information-security protection-needs classification (Schutzbedarfsanalyse per Grundwert + measures mapping) is in
docs/isds-klassifikation.md. It is a technically-grounded draft pending ISBO/OIZ sign-off β not a binding classification.Data classification (Schulamt): the data is classified ΓFFENTLICH / BUI (public OGD, no personal data, aggregated at canton level with small cells suppressed at source). Draft scheme + aggregation-risk note in
docs/datenklassifikation-schulamt.md; the aggregatingbag_health_mcp__get_canton_situationtool surfaces this in its response.Security posture: lethal-trifecta assessment (the server is strictly read-only β not affected), secret-management decision (no secrets β public data), and network-exposure notes are in
docs/security-posture.md.Phase architecture: this is a Phase 1 (read-only) server; write/send capabilities are deferred behind documented prerequisites. See
docs/roadmap.md.Reporting vulnerabilities: see the security policy for how to report security issues privately.
Contributing
See CONTRIBUTING.md (Deutsch).
Security
See SECURITY.md (Deutsch) for the security posture and how to report a vulnerability confidentially.
License
Code: MIT (see LICENSE).
Data: BAG IDD is Open Government Data on opendata.swiss under free use with mandatory source attribution (Swiss OGD terms, CC BY-equivalent) β not public domain. Cite the Federal Office of Public Health FOPH (IDD) when reusing the data; see Data sources & licences.
Author
Hayal Oezkan Β· github.com/malkreide
Related Portfolio Servers
swiss-statistics-mcpβ BFS demographic databag-epl-mcpβ BAG medication reimbursement listzurich-opendata-mcpβ City of Zurich open data
Installation
Run via uv's uvx β no clone or manual install needed. Add to your MCP client config (mcpServers for Claude Desktop, Cursor and Windsurf; use a top-level servers key for VS Code in .vscode/mcp.json):
{
"mcpServers": {
"bag-health-mcp": {
"command": "uvx",
"args": [
"bag-health-mcp"
]
}
}
}Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server connecting AI models to Swiss Federal Food Safety and Veterinary Office open data, enabling queries about food recalls, animal disease surveillance, food control results, and more.11MIT
- AlicenseAqualityBmaintenanceMCP server for Swiss federal geodata -- maps, elevation, geocoding, cadastral extracts, and downloadable datasets via Swisstopo APIs.204MIT
- AlicenseAqualityAmaintenanceMCP Server for Swiss road mobility β shared vehicles, EV charging, traffic alerts, Park & Rail, and multimodal trip planning.15MIT
- AlicenseAqualityAmaintenanceMCP server for Swiss federal legislation metadata via Fedlex, enabling search and retrieval of act details with ELI URIs, SR numbers, and multilingual support.2Apache 2.0
Related MCP Connectors
opendata.swiss MCP β Switzerland's federal open-data portal (CKAN catalogue).
MCP gateway federating 21 biomedical MCP servers behind one endpoint: gnomAD, ClinVar, HPO, VEP.
WHO GHO MCP β World Health Organization Global Health Observatory (free, no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/malkreide/bag-health-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server