MCP server for Swiss BAG reimbursement lists: Spezialitätenliste (SL), GGSL, MiGeL – Swiss social law navigator in natural language
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add bag-epl-mcp -- uvx bag-epl-mcp{
"mcpServers": {
"bag-epl-mcp": {
"command": "uvx",
"args": ["bag-epl-mcp"],
"env": {
"MCP_HOST": "<mcp_host>"
}
}
}
}MCP_HOSTMCP Servers overview
> \U0001f1e8\U0001f1ed **Part of the [Swiss Public Data MCP Portfolio](https://github.com/malkreide)**
# \U0001f48a bag-epl-mcp

[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
[](https://modelcontextprotocol.io/)
[](https://github.com/malkreide/bag-epl-mcp)

> MCP Server for the Swiss BAG electronic benefits platform (ePL) — Spezialitaetenliste, GGSL, MiGeL
[\U0001f1e9\U0001f1ea Deutsche Version](README.de.md)
### Demo

---
## Overview
`bag-epl-mcp` enables AI models to answer questions about mandatory health insurance coverage in Switzerland — in natural language, grounded in real data.
| List | Purpose | Legal basis |
|------|---------|-------------|
| **Spezialitaetenliste (SL)** | Compulsory-insurance medications | KVG Art. 52 |
| **GGSL** | Medications for congenital disorders (IV) | IVG Anhang |
| **MiGeL** | Medical devices & aids | KLV Art. 20 |
**Anchor query:** *"Is this medication covered by mandatory health insurance?"*
→ `epl_sl_suche`: Live lookup in the Spezialitaetenliste (SL)
→ [More use cases by audience →](EXAMPLES.md)
---
## Features
- \U0001f48a **6 tools, 2 resources, 2 prompts** for Swiss health insurance data
- \U0001f50d **`epl_sl_suche`** — search the Spezialitaetenliste for medications
- ⚖️ **`epl_rechtskontext`** — legal context with Fedlex links
- \U0001f513 **No API key required** — all data publicly accessible
- ☁️ **Dual transport** — stdio (Claude Desktop) + Streamable HTTP (cloud)
- \U0001f4da **Prompt templates** for insurance coverage checks and school health queries
---
## Prerequisites
- Python 3.11+
- [uv](https://github.com/astral-sh/uv) (recommended) or pip
---
## Installation
```bash
# Clone the repository
git clone https://github.com/malkreide/bag-epl-mcp.git
cd bag-epl-mcp
# Install
pip install -e .
# or with uv:
uv pip install -e .
```
Or with `uvx` (no permanent installation):
```bash
uvx bag-epl-mcp
```
---
## Quickstart
```bash
# stdio (for Claude Desktop) — default, opens no network ports
python -m bag_epl_mcp.server
# Streamable HTTP (cloud) — transport selected via env var
MCP_TRANSPORT=streamable-http MCP_HOST=0.0.0.0 MCP_PORT=8000 \
pip install -e ".[http]" && python -m bag_epl_mcp.server
```
> **Transport & host are configured exclusively via environment variables**
> (`MCP_TRANSPORT`, `MCP_HOST`, `MCP_PORT`). The default is `stdio` bound to
> nothing; `MCP_HOST` defaults to `127.0.0.1` and should only be set to
> `0.0.0.0` inside a container/cloud environment.
Try it immediately in Claude Desktop:
> *"Is Methylphenidate (Ritalin) covered by mandatory health insurance?"*
> *"Which laws regulate admission to the Spezialitaetenliste?"*
> *"Is a wheelchair covered by mandatory insurance?"*
---
## Configuration
### Claude Desktop
Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
```json
{
"mcpServers": {
"bag-epl": {
"command": "python",
"args": ["-m", "bag_epl_mcp.server"]
}
}
}
```
Or with `uvx`:
```json
{
"mcpServers": {
"bag-epl": {
"command": "uvx",
"args": ["bag-epl-mcp"]
}
}
}
```
### Cloud Deployment (Streamable HTTP for browser access)
**Render.com (recommended):**
1. Push/fork the repository to GitHub
2. On [render.com](https://render.com): New Web Service → connect GitHub repo
3. Build command: `pip install -e ".[http]"`
4. Set the following environment variables:
- `MCP_TRANSPORT=streamable-http`
- `MCP_HOST=0.0.0.0` (required so the container accepts external traffic)
- `MCP_PORT=8000` (or Render's `$PORT`)
- *(optional)* `MCP_CORS_ORIGINS='["https://claude.ai"]'` to extend the
browser CORS allow-list
- *(optional)* OpenTelemetry tracing is **on by default** but a no-op unless
the tracing deps are installed — build with `pip install -e ".[http,otel]"`
and point `OTEL_EXPORTER_OTLP_ENDPOINT` at your collector. Set
`MCP_OTEL_ENABLED=0` to disable.
5. Start command: `python -m bag_epl_mcp.server`
6. In claude.ai under Settings → MCP Servers, add: `https://your-app.onrender.com/mcp`
> **Security note:** the server exposes only public, read-only data and uses no
> authentication. See [`docs/SECURITY.md`](docs/SECURITY.md) for the threat
> model (egress allow-list, host binding, Lethal-Trifecta assessment).
---
## Available Tools
| Tool | Description |
|------|-------------|
| `epl_sl_suche` | Search the Spezialitaetenliste for compulsory-insurance medications |
| `epl_ggsl_abfrage` | Check GGSL coverage for congenital disorders |
| `epl_migel_suche` | Search the MiGeL for medical devices & aids |
| `epl_gesuchseingaenge` | List pending SL admission requests (transparency) |
| `epl_rechtskontext` | Legal context for coverage questions (WZW criteria) |
| `epl_server_info` | Server status and API phase information |
### Example Use Cases
| Query | Tool |
|-------|------|
| *"Is Ritalin covered by insurance?"* | `epl_sl_suche` |
| *"Which medications for congenital disorder GG-313?"* | `epl_ggsl_abfrage` |
| *"Is a wheelchair covered?"* | `epl_migel_suche` |
| *"Which laws regulate the SL?"* | `epl_rechtskontext` |
---
## Architecture
**Data flow (Phase 1):**
```
bag-epl-mcp (FastMCP)
┌────────────┐ MCP ┌───────────────────────────────┐ HTTPS GET ┌──────────────────┐
│ MCP Client │◀───────▶│ tools (read-only) │─────────────▶│ sl.bag.admin.ch │
│ (Claude │ stdio / │ ├─ epl_sl_suche │ egress │ www.bag.admin.ch │
│ Desktop, │ Stream- │ ├─ epl_ggsl_abfrage │ allow-list │ www.fedlex... │
│ claude.ai)│ able │ ├─ epl_migel_suche │◀─────────────│ (public OGD) │
│ │ HTTP │ ├─ epl_gesuchseingaenge │ (no auth) └──────────────────┘
│ │ │ ├─ epl_rechtskontext │
│ │ │ └─ epl_server_info │ structured JSON logs → stderr
└────────────┘ │ resources: epl://uebersicht …│
│ prompts: epl_kassenpflicht…│
└───────────────────────────────┘
```
**Phase roadmap** (details in [`docs/ROADMAP.md`](docs/ROADMAP.md)):
```
Phase 1 (current) → legal context + entry points, no data retrieval
Phase 2 (planned) → FHIR/IDMP API, once publicly accessible
Phase 3 (vision) → MiGeL + AL via ePL-FHIR
```
**What Phase 1 does, and what it does not.** Five of the six tools make no
network request at all — there is exactly one outgoing HTTP call in the whole
module. They return the legal basis and an entry point, and they now say so.
The previous wording, "XML/XLSX downloads + SL website access", advertised a
capability with no code path behind it; on 2026-08-08 it was removed rather
than implemented, because the underlying source is not machine-readable.
That one HTTP call goes to `sl.bag.admin.ch/api/search` and receives **HTTP 200
with `text/html`** — the 51 KB Angular shell. A freely invented path under the
same prefix returns the identical response, byte for byte: there is no API at
that address. Previously the resulting JSON parse error was caught by a bare
`except Exception` and turned into the claim "the SL database API is not
publicly documented" — a statement about the BAG's publishing practice,
derived from a parser error. The tool now reports what was measured.
The SL front end calls `https://epl.bag.admin.ch/api/sl/` instead, on a
different host. That host answers 401 without authentication — but it answers
401 for invented paths too, so this does **not** establish that any particular
route exists. It is deliberately **not** on the egress allow-list: without
verifiable access, adding it would be a grant on suspicion.
**MCP protocol version:** `2026-07-28` natively, `2025-11-25` as the
`initialize` handshake ceiling. `epl_server_info` reports the revision the
calling connection actually negotiated — derived from the request, not written
down here a second time. See [MCP Protocol Version](#mcp-protocol-version) for
both eras. SDK
updates are proposed monthly via Dependabot; the protocol version is reviewed on
every `mcp` SDK bump — see the versioning policy in [`docs/ROADMAP.md`](docs/ROADMAP.md).
---
## Safety & Limits
- **Read-only:** All tools perform HTTP GET requests only — no data is written, modified, or deleted.
- **No personal data:** The server accesses public regulatory lists (SL, GGSL, MiGeL). No personally identifiable information (PII) is processed or stored.
- **No medical advice:** This server provides informational access to regulatory data only. For medical or legal decisions, always consult the official BAG sources and qualified professionals.
- **Rate limits:** The SL website (sl.bag.admin.ch) is a public Angular SPA; the server enforces a 30s timeout per request. Use `limit` parameters conservatively.
- **Data freshness:** Phase 1 tools link to live BAG sources. No caching is performed by this server.
- **Links are measured, not assumed:** the addresses handed out as "official source" are re-checked by `scripts/record_fixtures.py` on every run, together with a control request to an invented path. Two BAG pages previously handed out (`.../Arzneimittel/geburtsgebrechen-spezialitaetenliste.html` and `.../Arzneimittel/gesuchseingaenge.html`) answered HTTP 404 on 2026-08-08 and were replaced by the entry point that verifiably resolves — not by a guessed replacemeWhat people ask about bag-epl-mcp
What is malkreide/bag-epl-mcp?
+
malkreide/bag-epl-mcp is mcp servers for the Claude AI ecosystem. MCP server for Swiss BAG reimbursement lists: Spezialitätenliste (SL), GGSL, MiGeL – Swiss social law navigator in natural language It has 0 GitHub stars and its last recorded update is dated 2026-09-27.
How do I install bag-epl-mcp?
+
You can install bag-epl-mcp by cloning the repository (https://github.com/malkreide/bag-epl-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is malkreide/bag-epl-mcp safe to use?
+
Our security agent has analyzed malkreide/bag-epl-mcp and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains malkreide/bag-epl-mcp?
+
malkreide/bag-epl-mcp is maintained by malkreide. The last recorded GitHub activity is dated 2026-09-27, with 0 open issues.
Are there alternatives to bag-epl-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy bag-epl-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/malkreide-bag-epl-mcp)<a href="https://claudewave.com/repo/malkreide-bag-epl-mcp"><img src="https://claudewave.com/api/badge/malkreide-bag-epl-mcp" alt="Featured on ClaudeWave: malkreide/bag-epl-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
The fastest path to AI-powered full stack observability, even for lean teams.