swiss-food-safety-mcp
MCP 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.
README
🇨🇭 Part of the Swiss Public Data MCP Portfolio
swiss-food-safety-mcp
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 →
Features
- 🚨 Public warnings & recalls — Live RSS feed of BLV product recalls and health warnings
- 🐄 Animal disease surveillance — Notifiable animal diseases since 1991 (InfoSM) via SPARQL + CSV
- 🐦 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 national nutritional survey data
- 🌿 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 — German-first documentation, English secondary
Prerequisites
- Python 3.11+
uvoruvx(recommended) — install uv
Installation
Using uvx (recommended — no install needed)
uvx swiss-food-safety-mcp
Using uv
uv tool install swiss-food-safety-mcp
swiss-food-safety-mcp
From source
git clone https://github.com/malkreide/swiss-food-safety-mcp
cd swiss-food-safety-mcp
uv sync
uv run swiss-food-safety-mcp
Quickstart
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.0 - In 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 up
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.
Available Tools
| 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 | SPARQL / CSV fallback |
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 JSON/KML |
blv_get_nutrition_data_children |
Children's nutrition survey (menuCH-Kids) | 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 |
Example Queries
| 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 |
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 |
|---|---|
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 |
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
├── LICENSE # MIT
├── README.md # This file (English)
└── README.de.md # German version
Data Sources
| 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.
Known Limitations
- SPARQL endpoint: Automatic fallback to CSV if the lindas.admin.ch SPARQL endpoint is unavailable
- 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
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 tests (no API access required)
PYTHONPATH=src pytest tests/ -m "not live"
# All tests including live API checks
PYTHONPATH=src pytest tests/
Changelog
See CHANGELOG.md
Contributing
See CONTRIBUTING.md
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。