Skip to main content

MCP server for the Swiss BAG electronic benefits platform (ePL): SL, GGSL, MiGeL

Project description

bag-epl-mcp

CI PyPI Python License: MIT swiss-public-data-mcp

MCP server for the Swiss Federal Office of Public Health (BAG) electronic benefits platform (ePL).

Enables AI models to answer questions about mandatory health insurance coverage in Switzerland — in natural language, grounded in real data.

Anchor query: "Is this medication covered by mandatory health insurance?"epl_sl_suche: Live lookup in the Spezialitätenliste (SL)


What is the ePL?

The elektronische Plattform Leistungen (ePL) is the BAG's new platform for three key lists of the Swiss healthcare system:

List Purpose Legal basis
Spezialitätenliste (SL) Compulsory-insurance medications KVG Art. 52
Geburtsgebrechen-Spezialitätenliste (GGSL) Medications for congenital disorders (IV) IVG Anhang
Mittel- und Gegenständeliste (MiGeL) Medical devices & aids KLV Art. 20

Tools

Tool Description
epl_sl_suche Search the Spezialitätenliste for a medication
epl_ggsl_abfrage Check GGSL coverage for congenital disorders
epl_migel_suche Search the MiGeL for medical devices
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

Architecture: Three-Phase Design

Phase 1 (current)  → XML/XLSX downloads + SL website access
Phase 2 (planned)  → FHIR/IDMP API (BAG, ~2025/2026)
Phase 3 (vision)   → MiGeL + AL via ePL-FHIR (2026/2027)

The server is already useful today and will seamlessly upgrade when the BAG publishes its FHIR API.

Portfolio Synergies

Combination Value Rating
bag-epl-mcp + fedlex-mcp Legal context loop: statute → concrete list ⭐⭐⭐
bag-epl-mcp + swiss-statistics-mcp Healthcare cost analysis ⭐⭐
bag-epl-mcp + global-education-mcp OECD special needs benchmarking

The compliance loop (strongest combination with fedlex-mcp):

  1. "Must this service be covered?"epl_rechtskontext → KVG/KLV norms
  2. "What does the law say?"fedlex-mcp → exact legal text
  3. "Is it actually on the list?"epl_sl_suche → live SL check

Installation

pip install bag-epl-mcp

Usage with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "bag-epl-mcp": {
      "command": "uvx",
      "args": ["bag-epl-mcp"]
    }
  }
}

Usage with Streamable HTTP (Cloud/Render.com)

MCP_TRANSPORT=streamable_http MCP_PORT=8000 bag-epl-mcp

Example Queries

# School health service use case:
"Is Methylphenidate (Ritalin) covered by mandatory health insurance?"
→ epl_sl_suche: suchbegriff="Methylphenidat"

# Special needs education:
"Which medications are covered for children with congenital disorder GG-313 (diabetes)?"
→ epl_ggsl_abfrage: geburtsgebrechen_nr="313"

# Legal compliance:
"Which laws regulate admission to the Spezialitätenliste?"
→ epl_rechtskontext: frage="Welche Gesetze regeln die Aufnahme in die SL?"

# Medical devices for inclusive schools:
"Is a wheelchair covered by mandatory health insurance?"
→ epl_migel_suche: suchbegriff="Rollstuhl"

Context: Schulamt der Stadt Zürich

This server is particularly relevant for the school system:

  • School health service: Check if a pupil's medication is covered before advising families
  • Special needs support: GGSL coverage for pupils with congenital disorders
  • Inclusive education: MiGeL coverage for assistive devices
  • HR / Stadtentwicklung: Benefits questions for city employees

Known Limitations

  • Phase 1 limitation: The ePL internal API is not publicly documented. The SL website (sl.bag.admin.ch) is an Angular SPA with a private backend. Direct medication search may return no results until the BAG publishes its FHIR API.
  • Fallback: All tools provide direct links to sl.bag.admin.ch for manual searches.
  • MiGeL: Not yet integrated in ePL (planned 2026/2027); MiGeL tools use category matching.

Testing

# Unit tests (no live API calls):
PYTHONPATH=src pytest tests/ -m "not live" -v

# Live tests (requires network):
PYTHONPATH=src pytest tests/ -m "live" -v

Legal Notices

Data sources:

This server provides informational access only. For medical or legal decisions, always consult the official BAG sources directly.


Part of the swiss-public-data-mcp portfolio.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bag_epl_mcp-1.0.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bag_epl_mcp-1.0.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file bag_epl_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: bag_epl_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bag_epl_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1fb54e62bbf2e49773dff335e1a4efcdcc97dd03d875758fc753b4da986d523f
MD5 620c1772a948c9e7ebd252cce2e66f9b
BLAKE2b-256 522fedc700a0603417019f01e28e18f946c1f4e65aa60ab26a2e8321c5a98c3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bag_epl_mcp-1.0.0.tar.gz:

Publisher: publish.yml on malkreide/bag-epl-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bag_epl_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: bag_epl_mcp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bag_epl_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b82a32190a08a4d35fa5f2c5df44d46c8801275d8c084d2fc867ae0d1596b50a
MD5 adb8097adec0515048a5cbed4f7ee7bf
BLAKE2b-256 dc4ba52be2b0a4e26de3ea3ad9b18686c7aab60cee71bf96b4fdb732fb367823

See more details on using hashes here.

Provenance

The following attestation bundles were made for bag_epl_mcp-1.0.0-py3-none-any.whl:

Publisher: publish.yml on malkreide/bag-epl-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page