swiss-food-safety-mcp

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.

Category
Visit Server

README

πŸ‡¨πŸ‡­ Part of the Swiss Public Data MCP Portfolio

swiss-food-safety-mcp

Version License: MIT Python 3.11+ MCP Data Source No Auth Required CI

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.

πŸ‡©πŸ‡ͺ Deutsche Version


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

Demo: Claude using blv_get_public_warnings and blv_search_animal_diseases β†’ 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+
  • uv or uvx (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.1 by default. Pass --host 0.0.0.0 only when external exposure is intended. Set BLV_MCP_ALLOWED_ORIGINS (comma-separated, no wildcard) to permit browser clients; it defaults to https://claude.ai.

Render.com (recommended):

  1. Push/fork the repository to GitHub
  2. On render.com: New Web Service β†’ connect GitHub repo
  3. Set the start command to: swiss-food-safety-mcp --http --host 0.0.0.0
  4. 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 with pip install swiss-food-safety-mcp[otel] and set BLV_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 limit and 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured