swiss-food-safety-mcp
Summary: Access official Swiss food safety and veterinary data (BLV) — food recalls, animal disease surveillance, food control results, antibiotic usage, avian influenza, children's nutrition survey tallies, pesticides and meat inspection — through 11 read-only, no-auth MCP tools.
Food recalls & health warnings — fetch current BLV product recalls and public health alerts from the live RSS feed (
blv_get_public_warnings).Dataset discovery — browse all 28 BLV open datasets and inspect a dataset's metadata, resources and licence (
blv_list_datasets,blv_get_dataset_info).Animal disease surveillance — search notifiable animal diseases since 1991 by canton, disease name and year range (
blv_search_animal_diseases).Animal health statistics — track annual animal health indicators, optionally filtered by year (
blv_get_animal_health_stats).Food control results — compare cantonal inspection volumes and violation rates by canton and year (
blv_get_food_control_results).Veterinary antibiotic usage — analyse ISABV consumption trends by livestock species and year (
blv_get_antibiotic_usage_vet).Avian influenza — locate and date wild-bird H5N1/HPAI detections with geodata, filtered by canton or year (
blv_get_avian_influenza).Children's nutrition survey — query menuCH-Kids questionnaire answer tallies by age group and answer/question code (not nutrient intake) (
blv_get_nutrition_data_children).Pesticide register — check whether a plant-protection product or active ingredient is approved or revoked in Switzerland (
blv_search_pesticide_products).Meat inspection statistics — review slaughter counts and condemnation rates by animal type and year (
blv_get_meat_inspection_stats).Supporting questions — e.g. "Which BLV food warnings are currently active?" or "Are there notifiable animal diseases in Zurich canton this year?"
Operational constraints — all tools are read-only HTTP GETs, no authentication or API keys required, 30s request timeout, no caching, and data comes from Swiss federal sources under Creative Commons attribution.
Click on "Deploy 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., "@swiss-food-safety-mcp Which BLV food warnings are currently active?"
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.
🇨🇭 Part of the Swiss Public Data MCP Portfolio
swiss-food-safety-mcp
🌐 English | Deutsch
MCP server connecting AI models to Swiss Federal Food Safety and Veterinary Office (BLV) open data — food recalls, animal disease surveillance, food control results, antibiotic usage, children's nutrition surveys and the pesticide register. No authentication required.
Overview
swiss-food-safety-mcp gives AI assistants like Claude direct access to official Swiss food safety and veterinary data from the Federal Food Safety and Veterinary Office (BLV / Bundesamt für Lebensmittelsicherheit und Veterinärwesen). It provides 11 tools covering food recalls, animal disease surveillance, food control results, antibiotic usage in veterinary medicine, nutrition surveys for children, and the pesticide register.
All data comes from official Swiss federal sources (opendata.swiss, lindas.admin.ch, news.admin.ch). No API keys or authentication are required.
This server follows the No-Auth-First philosophy and is part of a Swiss public sector MCP portfolio.
Anchor demo query: "Are there any current BLV food warnings relevant to Zurich school canteens — and which notifiable animal diseases are currently reported in the canton?"
Demo
→ More use cases by audience →
Related MCP server: parlament-mcp
Features
🚨 Public warnings & recalls — Live RSS feed of BLV product recalls and health warnings
🐄 Animal disease surveillance — Notifiable animal diseases since 1991 (InfoSM) via the LINDAS SPARQL cube
🐦 Avian influenza monitoring — Wild bird surveillance data with geodata
🥩 Food control results — Cantonal food inspection results and violation rates
💊 Antibiotic usage veterinary — ISABV data on antibiotic use in animal medicine
🧒 Children's nutrition survey — menuCH-Kids questionnaire tallies (answer counts, not nutrient intake)
🌿 Pesticide register — Swiss approved pesticide products and active ingredients
📊 Dataset discovery — Browse all 28 BLV datasets on opendata.swiss via CKAN API
🔗 Dual transport — stdio (Claude Desktop) + Streamable HTTP (cloud/Render.com)
🗣️ Bilingual — English-first documentation, German secondary
Prerequisites
Python 3.11+
uvoruvx(recommended) — install uv
Installation
Using uvx (recommended — no install needed)
uvx swiss-food-safety-mcpUsing uv
uv tool install swiss-food-safety-mcp
swiss-food-safety-mcpFrom source
git clone https://github.com/malkreide/swiss-food-safety-mcp
cd swiss-food-safety-mcp
uv sync
uv run swiss-food-safety-mcpQuickstart
Add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"swiss-food-safety": {
"command": "uvx",
"args": ["swiss-food-safety-mcp"]
}
}
}Try it immediately in Claude Desktop:
"Which BLV food warnings are currently active?"
"Are there any notifiable animal diseases reported in Zurich canton this year?"
Other MCP Clients (Cursor, Windsurf, VS Code + Continue)
{
"mcpServers": {
"swiss-food-safety": {
"command": "uvx",
"args": ["swiss-food-safety-mcp"]
}
}
}Cloud Deployment (Streamable HTTP)
For use via claude.ai in the browser (e.g. on managed workstations without local software):
# Loopback only (default) — safe for local testing:
swiss-food-safety-mcp --http
# Server runs on 127.0.0.1:8002
# External exposure (e.g. behind the Render TLS proxy):
swiss-food-safety-mcp --http --host 0.0.0.0⚠️ The HTTP transport binds to
127.0.0.1by default. Pass--host 0.0.0.0only when external exposure is intended. SetBLV_MCP_ALLOWED_ORIGINS(comma-separated, no wildcard) to permit browser clients; it defaults tohttps://claude.ai.
Render.com (recommended):
Push/fork the repository to GitHub
On render.com: New Web Service → connect GitHub repo
Set the start command to:
swiss-food-safety-mcp --http --host 0.0.0.0In claude.ai under Settings → MCP Servers, add:
https://your-app.onrender.com/mcp
Docker:
docker build -t swiss-food-safety-mcp .
docker run -p 8002:8002 swiss-food-safety-mcp
# or, with explicit CPU/memory limits:
docker compose upThe image is a non-root, multi-stage build; the container already binds
0.0.0.0 and includes a healthcheck. docker-compose.yml additionally caps
CPU and memory.
💡 "stdio for the developer laptop, Streamable HTTP for the browser."
🔧 Configuration — every runtime setting is overridable via
BLV_MCP_*environment variables (BLV_MCP_HTTP_HOST,BLV_MCP_HTTP_PORT,BLV_MCP_ALLOWED_ORIGINS,BLV_MCP_TIMEOUT,BLV_MCP_OTEL_ENDPOINT, …). Outbound requests are restricted to Swiss federal hosts (*.admin.ch,opendata.swiss). Optional OpenTelemetry tracing: install withpip install swiss-food-safety-mcp[otel]and setBLV_MCP_OTEL_ENDPOINT.
Available Tools
Tool | Description | Data Source |
| Current food recalls & health warnings | news.admin.ch RSS |
| Browse all 28 BLV open datasets | opendata.swiss CKAN |
| Dataset details & resource URLs | opendata.swiss CKAN |
| Notifiable animal diseases since 1991 | LINDAS SPARQL ( |
| Annual animal health statistics | opendata.swiss CSV/JSON |
| Cantonal food inspection results | opendata.swiss CSV |
| Veterinary antibiotic usage (ISABV) | opendata.swiss CSV |
| Wild bird avian influenza surveillance | opendata.swiss CSV |
| menuCH-Kids: questionnaire tallies (not nutrient intake) | opendata.swiss CSV |
| Swiss approved pesticide register | opendata.swiss XML |
| Slaughterhouse inspection statistics | opendata.swiss CSV/JSON |
Example Queries
Query | Tool |
"Which BLV food warnings are currently active?" |
|
"Are there animal diseases in Zurich canton in 2024?" |
|
"What is the avian influenza situation in Switzerland 2024?" |
|
"What do Swiss children actually eat?" |
|
"Which copper-based pesticides are approved in Switzerland?" |
|
Architecture
┌─────────────────┐ ┌─────────────────────────────┐ ┌──────────────────────────────┐
│ Claude / AI │────▶│ Swiss Food Safety MCP │────▶│ Swiss Federal Open Data │
│ (MCP Host) │◀────│ (MCP Server) │◀────│ │
└─────────────────┘ │ │ │ opendata.swiss (CKAN/CSV) │
│ 11 Tools · No Auth │ │ lindas.admin.ch (SPARQL) │
│ Stdio | Streamable HTTP │ │ news.admin.ch (RSS/XML) │
└─────────────────────────────┘ └──────────────────────────────┘Synergies with Related MCP Servers
Combination | Use Case |
| Geo-mapped animal disease risk near school locations |
| Link recalls to food law (Lebensmittelgesetz) |
| Nutrition data × socioeconomics by school district |
| Swiss children's nutrition vs. OECD benchmarks |
Project Structure
swiss-food-safety-mcp/
├── src/
│ └── swiss_food_safety_mcp/
│ ├── __init__.py # Package metadata
│ └── server.py # All tools, resources, prompts
├── tests/
│ ├── __init__.py
│ └── test_server.py # Unit tests (no live API calls)
├── .github/
│ └── workflows/
│ └── ci.yml # Python 3.11–3.13 matrix
├── pyproject.toml # hatchling build, uv-compatible
├── CHANGELOG.md
├── CONTRIBUTING.md # Contribution guide (English)
├── CONTRIBUTING.de.md # Contribution guide (German)
├── SECURITY.md # Security policy (English)
├── SECURITY.de.md # Security policy (German)
├── LICENSE # MIT
├── README.md # This file (English)
└── README.de.md # German versionData Sources
Source | Description | Format |
28 open datasets | CSV, JSON, Parquet, SPARQL, XML | |
Swiss linked data SPARQL endpoint | RDF/SPARQL | |
BLV public warnings & recalls | RSS/XML | |
BLV website (DE/FR/IT/EN) | HTML |
All data is open government data (OGD) under Creative Commons with attribution requirement.
Known Limitations
RSS feed: Limited to the most recent BLV publications; no historical archive
Pesticide register: XML parsing may be slow for queries returning large result sets
CKAN datasets: Opendata.swiss rate limits apply under heavy usage
Animal disease data: Canton-level filtering depends on data completeness in the source
Datasets are pinned, not searched: each data tool names its dataset slug and the resource that carries the data (see
DATENQUELLENinserver.py). A keyword search takes the first hit and therefore falls back silently onto something plausible — that is howblv_get_animal_health_statscame to return antibiotics data, and howblv_get_food_control_resultscame to return a code list out of a dataset whose 26 resources include 18 of them.scripts/record_fixtures.pyre-measures the pinned pairs on every run; a renamed dataset now fails loudly.Children's nutrition is questionnaire tallies, not nutrient intake: the only menuCH-Kids dataset published on opendata.swiss carries answer counts (
Geschlecht, Sprachregion, Altersgruppe, Frage, Antwort, Anzahl). The docstring previously promised nutrient intake against dietary recommendations and offered "Energie", "Zucker", "Eisen" as filter examples — those matched nothing and returned an empty list. Adult food-consumption data exists as a separate dataset that this server does not cover.The SPARQL-to-CSV fallback is gone. It could never work: the one CSV resource of the fallback dataset is a ZIP file declared as
format: CSV. With the endpoint corrected the fallback is also unnecessary — and a fallback that hides a broken query is worse than none.
Safety & Limits
Read-only: All tools perform HTTP GET requests only — no data is written, modified, or deleted.
No personal data: The APIs return aggregated public health and food safety statistics. No personally identifiable information is processed or stored by this server.
Rate limits: opendata.swiss CKAN and lindas.admin.ch SPARQL are public APIs; use
limitand filtering parameters conservatively. The server enforces a 30-second timeout per request.Data freshness: RSS warnings reflect the latest BLV publications at query time. Statistical datasets (animal diseases, food control, antibiotics) are updated periodically by the BLV. No caching is performed by this server.
Terms of service: Data is subject to the ToS of each source — opendata.swiss, lindas.admin.ch, news.admin.ch. BLV data is published under Creative Commons with attribution.
No guarantees: This server is a community project, not affiliated with the BLV or the Swiss federal administration. Availability depends on upstream APIs.
Deployment & Scaling
This server is Phase 1 — read-only (see ROADMAP.md): all
11 tools are read-only queries with no write surface.
Run it as a single instance. The Streamable HTTP transport keeps
per-session state, so horizontal scaling would require Mcp-Session-Id sticky
routing at the load balancer plus a shared session store — neither is
implemented, by design, for a server of this scope. A single Render instance
(or one container) is the supported deployment; docker-compose.yml sets
explicit CPU/memory limits for self-hosting.
Testing
# Unit + contract tests (no network) — this is what CI runs
PYTHONPATH=src pytest tests/ -m "not live"
# All tests including live API checks
PYTHONPATH=src pytest tests/
# Re-measure which dataset and resource each tool hits
PYTHONPATH=src python scripts/record_fixtures.py54 tests — 53 offline, 1 live.
Why the fixtures are recorded rather than written
A hand-written mock encodes its author's assumption and therefore cannot refute it: production code and fixture come from the same head, the same hour, the same reading of the docs. Where both are wrong, both are wrong together — and the suite stays green.
This repo had it in pure form. Every mocked CKAN resource was named
"name": "CSV". On opendata.swiss the same field reads Food establishments 2025 or Food establishments codelist administrative measures — and that
difference alone decided whether a tool returned inspection results or a code
legend. The mocks could not express the distinction, so no test could fail on
it.
What is recorded is therefore the selection: for each tool, the pinned
dataset slug, the resource that was hit, and that file's header line. The
header is the object of the exercise — it separates data from a legend, and it
shows whether the BOM and the delimiter were handled. PROVENANCE.md names the
source, the date, the selection rule and the SHA-256 for each file.
Two of the recorded measurements are controls: an invented path under
lindas.admin.ch (POST 404, so the 404 on /sparql is real) and an invented
class in the fsvo namespace (0 instances, so the previously queried foag
class genuinely does not exist). Without them each measurement would only show
what we received. The recorder aborts if a control stops discriminating, if a
pinned resource disappears, if a header line is empty or starts with a BOM, or
if one of the findings is superseded.
MCP Protocol Version
This server speaks spec 2026-07-28 natively. It runs fastmcp 4.x, which
pins mcp 2.x, and that SDK serves two protocol eras over the same server
object:
Era | Revision | How a client reaches it |
modern |
|
|
handshake (legacy) |
| the classic |
A current client gets 2026-07-28; one that has not moved yet falls back to
the handshake and still gets every tool. Neither revision is chosen by this
server — the SDK negotiates, and the pin records which pair that negotiation is
allowed to produce.
The modern era is not just a higher number. It has no initialize handshake
and no InitializeResult: Client.initialize() raises there, and the server
metadata comes from server/discover instead. A check that still measured
initialize_result.protocolVersion would therefore be testing only the legacy
half while reporting a pass for both.
tests/test_protocol_version.py measures each era over its own path rather
than comparing constants to one another: it pins both revisions against
LATEST_MODERN_VERSION / LATEST_HANDSHAKE_VERSION, connects a real client in
each mode, asserts the structural absence of InitializeResult in the modern
one, and checks that both eras list the same tools. test_das_sdk_fuehrt_weiterhin_zwei_aeren
guards the other direction — a downgrade back to mcp 1.x would otherwise
reduce half of those assertions to an import error nobody reads.
The transport allow-list moved with the SDK: Mcp-Method, Mcp-Name and
MCP-Protocol-Version are the routing headers spec 2026-07-28 mirrors into
HTTP, and mcp.shared.inbound now reads them, so CORS lists them. Mcp-Param-*
is deliberately still absent — the spec mints those only for parameters a tool
marks with x-mcp-header, and no tool here does.
Changelog
See CHANGELOG.md
Contributing
See CONTRIBUTING.md
Security
See SECURITY.md for the security policy and how to report a vulnerability.
License
MIT License — see LICENSE
Author
Hayal Oezkan · github.com/malkreide
Credits & Related Projects
Data: opendata.swiss / BLV – Federal Food Safety and Veterinary Office (BLV)
Protocol: Model Context Protocol – Anthropic / Linux Foundation
Related: zurich-opendata-mcp – MCP server for Zurich city open data
Portfolio: Swiss Public Data MCP Portfolio
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": {
"swiss-food-safety-mcp": {
"command": "uvx",
"args": [
"swiss-food-safety-mcp"
]
}
}
}Available Tools
11 toolsblv_get_animal_health_statsBlv Get Animal Health StatsBRead-onlyIdempotent
Annual animal health statistics from BLV (opendata.swiss CSV/JSON).
Use case: track year-over-year animal health indicators across Switzerland.
Inputs: year. Returns: result
blv_get_antibiotic_usage_vetBlv Get Antibiotic Usage VetARead-onlyIdempotent
Veterinary antibiotic usage data from the Swiss ISABV monitoring system.
Use case: analyse antibiotic consumption trends by livestock species, e.g. for antimicrobial-resistance reporting.
Inputs: year, animal_species. Returns: result
blv_get_avian_influenzaBlv Get Avian InfluenzaARead-onlyIdempotent
Wild bird avian influenza (H5N1 / HPAI) surveillance data with geodata.
Use case: locate and date wild-bird avian influenza detections, optionally narrowed to one canton.
Inputs: year, canton. Returns: result
blv_get_dataset_infoBlv Get Dataset InfoARead-onlyIdempotent
Detailed metadata and resource URLs for a specific BLV dataset.
Use case: obtain the concrete download URLs and formats of a dataset found via blv_list_datasets, including its open-data licence.
Inputs: dataset_name (required). Returns: object
blv_get_food_control_resultsBlv Get Food Control ResultsARead-onlyIdempotent
Cantonal food inspection results and violation rates (Lebensmittelkontrolle).
Use case: compare inspection volumes and violation rates between cantons or across years.
Inputs: year, limit, canton. Returns: result
blv_get_meat_inspection_statsBlv Get Meat Inspection StatsARead-onlyIdempotent
Slaughterhouse meat inspection statistics (Fleischuntersuchung).
Use case: review slaughter counts and condemnation rates by animal type and year.
Inputs: year, animal_type. Returns: result
blv_get_nutrition_data_childrenBlv Get Nutrition Data ChildrenARead-onlyIdempotent
Swiss national children's nutrition survey — questionnaire tallies (menuCH-Kids).
Use case: how often each answer was given, broken down by sex, language region and age group.
NOT nutrient intake. The docstring here promised "nutrient intake by age
group against dietary recommendations" and named "Energie", "Zucker",
"Eisen" as filter examples. The only menuCH-Kids dataset published on
opendata.swiss is the questionnaire, and it carries answer counts:
Geschlecht, Sprachregion, Altersgruppe, Frage, Antwort, Anzahl.
Measured on 2026-08-08. A filter on "Eisen" therefore matched nothing and
returned an empty list — indistinguishable from "no such data for this age
group".
Nutrient intake for adults exists as a separate dataset
(menuch_lebensmittelkonsum); this tool does not cover it, and inventing
a mapping would be worse than the missing feature.
Inputs: age_group, answer_code. Returns: result
blv_get_public_warningsBlv Get Public WarningsARead-onlyIdempotent
Current BLV food recalls and public health warnings (live RSS feed).
Use case: answer questions about food safety alerts currently active in Switzerland, e.g. "which products have been recalled recently?".
Inputs: limit. Returns: result
blv_list_datasetsBlv List DatasetsARead-onlyIdempotent
Browse all BLV open datasets on opendata.swiss (CKAN API).
Use case: discover which datasets exist before drilling into one with blv_get_dataset_info, or to map a topic to a concrete dataset slug.
Inputs: limit, search. Returns: result
blv_search_animal_diseasesBlv Search Animal DiseasesARead-onlyIdempotent
Search notifiable animal disease cases in Switzerland since 1991 (InfoSM).
Use case: report on disease occurrence by canton and year, e.g. "were there avian influenza cases in Bern in 2024?".
Inputs: limit, canton, disease, year_to, +1 more. Returns: result
blv_search_pesticide_productsBlv Search Pesticide ProductsARead-onlyIdempotent
Search the Swiss approved pesticide register (Pflanzenschutzmittelverzeichnis).
Use case: check whether a plant-protection product or active ingredient is approved (or revoked) in Switzerland.
Inputs: limit, status, product_name, active_ingredient. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target distinct data sources and actions, but there is some overlap among animal-health tools (blv_search_animal_diseases, blv_get_animal_health_stats, blv_get_avian_influenza) that could lead to misselection. The descriptions help differentiate them, but avian influenza is a subset of notifiable diseases, creating a mild ambiguity.
All tools use a consistent blv_verb_noun pattern with snake_case and clear verbs (get, list, search). This makes the set predictable and easy to scan.
With 11 tools, the set is well-scoped for a national food safety data server. Each tool covers a distinct dataset or query type, and none appear redundant or trivial.
The tool surface broadly covers recalls, datasets, animal health, inspections, pesticides, and nutrition, but there is a notable gap: adult nutrient intake data exists separately yet is not covered. The children's nutrition tool also only returns questionnaire tallies, which may surprise agents expecting intake data.
Maintenance
Related MCP Connectors
Unlock the power of food transparency with our Open Food Facts MCP server. Easily look up any food
AI governance MCP server for EU AI Act compliance and jurisdiction verification
KVK Handelsregister AI Connect: hosted MCP server for the Dutch business register.
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server connecting AI models to SRG SSR public APIs – weather, TV/radio metadata, program guide and Swiss votations/elections since 1900.1535 PyPI1MIT
- AlicenseAqualityBmaintenanceAn MCP server connecting AI models to the Swiss Federal Parliament via the Curia Vista OData API, enabling queries of motions, votes, members, sessions, and debate transcripts without authentication.754 PyPI2MIT
- AlicenseBqualityBmaintenanceAn MCP server providing AI-powered access to Open Data from the City of Zurich, enabling queries to 900+ datasets, real-time environmental and mobility data, geodata, parliamentary proceedings, and more.2666 PyPI9MIT
- AlicenseBqualityDmaintenanceMCP server exposing all major Swiss official public APIs as native tools for any MCP-compatible AI agent.3412 npmMIT