The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Swiss Food Safety MCP listing page.
🇨🇭 Part of the Swiss Public Data MCP Portfolio
🌐 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.
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?"
→ More use cases by audience →
uv or uvx (recommended) — install uvAdd to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
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?"
For use via claude.ai in the browser (e.g. on managed workstations without local software):
⚠️ 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):
swiss-food-safety-mcp --http --host 0.0.0.0https://your-app.onrender.com/mcpDocker:
The 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.
| Tool | Description | Data Source |
|---|---|---|
blv_get_public_warnings | Current food recalls & health warnings | news.admin.ch RSS |
blv_list_datasets | Browse all 28 BLV open datasets | opendata.swiss CKAN |
blv_get_dataset_info | Dataset details & resource URLs | opendata.swiss CKAN |
blv_search_animal_diseases | Notifiable animal diseases since 1991 | LINDAS SPARQL (/query) |
blv_get_animal_health_stats | Annual animal health statistics | opendata.swiss CSV/JSON |
blv_get_food_control_results | Cantonal food inspection results | opendata.swiss CSV |
blv_get_antibiotic_usage_vet | Veterinary antibiotic usage (ISABV) | opendata.swiss CSV |
blv_get_avian_influenza | Wild bird avian influenza surveillance | opendata.swiss CSV |
blv_get_nutrition_data_children | menuCH-Kids: questionnaire tallies (not nutrient intake) | opendata.swiss CSV |
blv_search_pesticide_products | Swiss approved pesticide register | opendata.swiss XML |
blv_get_meat_inspection_stats | Slaughterhouse inspection statistics | opendata.swiss CSV/JSON |
| Query | Tool |
|---|---|
| "Which BLV food warnings are currently active?" | blv_get_public_warnings |
| "Are there animal diseases in Zurich canton in 2024?" | blv_search_animal_diseases |
| "What is the avian influenza situation in Switzerland 2024?" | blv_get_avian_influenza |
| "What do Swiss children actually eat?" | blv_get_nutrition_data_children |
| "Which copper-based pesticides are approved in Switzerland?" | blv_search_pesticide_products |
| Combination | Use Case |
|---|---|
swiss-food-safety-mcp + zurich-opendata-mcp | Geo-mapped animal disease risk near school locations |
swiss-food-safety-mcp + fedlex-mcp | Link recalls to food law (Lebensmittelgesetz) |
swiss-food-safety-mcp + swiss-statistics-mcp | Nutrition data × socioeconomics by school district |
swiss-food-safety-mcp + global-education-mcp | Swiss children's nutrition vs. OECD benchmarks |
| Source | Description | Format |
|---|---|---|
| opendata.swiss/BLV | 28 open datasets | CSV, JSON, Parquet, SPARQL, XML |
| lindas.admin.ch/sparql | Swiss linked data SPARQL endpoint | RDF/SPARQL |
| news.admin.ch RSS | BLV public warnings & recalls | RSS/XML |
| blv.admin.ch | BLV website (DE/FR/IT/EN) | HTML |
All data is open government data (OGD) under Creative Commons with attribution requirement.
DATENQUELLEN in server.py). A keyword search takes the first hit and therefore falls back silently onto something plausible — that is how blv_get_animal_health_stats came to return antibiotics data, and how blv_get_food_control_results came to return a code list out of a dataset whose 26 resources include 18 of them. scripts/record_fixtures.py re-measures the pinned pairs on every run; a renamed dataset now fails loudly.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.format: CSV. With the endpoint corrected the fallback is also unnecessary — and a fallback that hides a broken query is worse than none.limit and filtering parameters conservatively. The server enforces a 30-second timeout per request.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.
54 tests — 53 offline, 1 live.
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.
The protocol version is negotiated at the initialize handshake by the SDK,
not chosen by this server. The revision it is built and audited against is
2025-11-25, which is LATEST_PROTOCOL_VERSION in the pinned mcp
release that fastmcp brings in.
tests/test_protocol_version.py holds three things against each other: this
line, that SDK constant, and the revision a real handshake against the server
object actually returns. An SDK bump that changes the revision therefore fails
CI instead of drifting silently.
The sister servers in this portfolio pin a pair of revisions — a handshake
ceiling and a modern one — because mcp 2.x serves two protocol eras over the
same server. fastmcp 3.x pins mcp 1.x, where mcp.types.version does not
exist and one revision is the whole story. test_das_sdk_kennt_hier_nur_eine_aera
is tied to the SDK rather than to this paragraph and fails the day an upgrade
brings the two-era constants in.
See CHANGELOG.md
See CONTRIBUTING.md
See SECURITY.md for the security policy and how to report a vulnerability.
MIT License — see LICENSE
Hayal Oezkan · github.com/malkreide
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):