bag-epl-mcp 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,197 @@
1
+ Metadata-Version: 2.4
2
+ Name: bag-epl-mcp
3
+ Version: 1.0.0
4
+ Summary: MCP server for the Swiss BAG electronic benefits platform (ePL): SL, GGSL, MiGeL
5
+ Project-URL: Homepage, https://github.com/malkreide/bag-epl-mcp
6
+ Project-URL: Repository, https://github.com/malkreide/bag-epl-mcp
7
+ Project-URL: Issues, https://github.com/malkreide/bag-epl-mcp/issues
8
+ License: MIT License
9
+
10
+ Copyright (c) 2026 malkreide
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ License-File: LICENSE
30
+ Keywords: bag,fhir,ggsl,krankenversicherung,mcp,migel,model-context-protocol,python,spezialitaetenliste,swiss-open-data
31
+ Classifier: Development Status :: 4 - Beta
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: Intended Audience :: Healthcare Industry
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.11
37
+ Classifier: Programming Language :: Python :: 3.12
38
+ Classifier: Programming Language :: Python :: 3.13
39
+ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
40
+ Requires-Python: >=3.11
41
+ Requires-Dist: fastmcp>=2.0.0
42
+ Requires-Dist: httpx>=0.27.0
43
+ Requires-Dist: lxml>=5.0.0
44
+ Requires-Dist: openpyxl>=3.1.0
45
+ Requires-Dist: pydantic>=2.0.0
46
+ Provides-Extra: dev
47
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
48
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
49
+ Requires-Dist: respx>=0.21.0; extra == 'dev'
50
+ Requires-Dist: ruff>=0.6.0; extra == 'dev'
51
+ Description-Content-Type: text/markdown
52
+
53
+ # bag-epl-mcp
54
+
55
+ [![CI](https://github.com/malkreide/bag-epl-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/malkreide/bag-epl-mcp/actions/workflows/ci.yml)
56
+ [![PyPI](https://img.shields.io/pypi/v/bag-epl-mcp)](https://pypi.org/project/bag-epl-mcp/)
57
+ [![Python](https://img.shields.io/pypi/pyversions/bag-epl-mcp)](https://pypi.org/project/bag-epl-mcp/)
58
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
59
+ [![swiss-public-data-mcp](https://img.shields.io/badge/portfolio-swiss--public--data--mcp-blue)](https://github.com/malkreide/swiss-public-data-mcp)
60
+
61
+ **MCP server for the Swiss Federal Office of Public Health (BAG) electronic benefits platform (ePL).**
62
+
63
+ Enables AI models to answer questions about mandatory health insurance coverage in Switzerland — in natural language, grounded in real data.
64
+
65
+ > **Anchor query:** *"Is this medication covered by mandatory health insurance?"*
66
+ > → `epl_sl_suche`: Live lookup in the Spezialitätenliste (SL)
67
+
68
+ ---
69
+
70
+ ## What is the ePL?
71
+
72
+ The **elektronische Plattform Leistungen (ePL)** is the BAG's new platform for three key lists of the Swiss healthcare system:
73
+
74
+ | List | Purpose | Legal basis |
75
+ |------|---------|-------------|
76
+ | **Spezialitätenliste (SL)** | Compulsory-insurance medications | KVG Art. 52 |
77
+ | **Geburtsgebrechen-Spezialitätenliste (GGSL)** | Medications for congenital disorders (IV) | IVG Anhang |
78
+ | **Mittel- und Gegenständeliste (MiGeL)** | Medical devices & aids | KLV Art. 20 |
79
+
80
+ ## Tools
81
+
82
+ | Tool | Description |
83
+ |------|-------------|
84
+ | `epl_sl_suche` | Search the Spezialitätenliste for a medication |
85
+ | `epl_ggsl_abfrage` | Check GGSL coverage for congenital disorders |
86
+ | `epl_migel_suche` | Search the MiGeL for medical devices |
87
+ | `epl_gesuchseingaenge` | List pending SL admission requests (transparency) |
88
+ | `epl_rechtskontext` | Legal context for coverage questions (WZW criteria) |
89
+ | `epl_server_info` | Server status and API phase information |
90
+
91
+ ## Architecture: Three-Phase Design
92
+
93
+ ```
94
+ Phase 1 (current) → XML/XLSX downloads + SL website access
95
+ Phase 2 (planned) → FHIR/IDMP API (BAG, ~2025/2026)
96
+ Phase 3 (vision) → MiGeL + AL via ePL-FHIR (2026/2027)
97
+ ```
98
+
99
+ The server is **already useful today** and will seamlessly upgrade when the BAG publishes its FHIR API.
100
+
101
+ ## Portfolio Synergies
102
+
103
+ | Combination | Value | Rating |
104
+ |-------------|-------|--------|
105
+ | `bag-epl-mcp` + `fedlex-mcp` | Legal context loop: statute → concrete list | ⭐⭐⭐ |
106
+ | `bag-epl-mcp` + `swiss-statistics-mcp` | Healthcare cost analysis | ⭐⭐ |
107
+ | `bag-epl-mcp` + `global-education-mcp` | OECD special needs benchmarking | ⭐ |
108
+
109
+ **The compliance loop** (strongest combination with `fedlex-mcp`):
110
+ 1. *"Must this service be covered?"* → `epl_rechtskontext` → KVG/KLV norms
111
+ 2. *"What does the law say?"* → `fedlex-mcp` → exact legal text
112
+ 3. *"Is it actually on the list?"* → `epl_sl_suche` → live SL check
113
+
114
+ ## Installation
115
+
116
+ ```bash
117
+ pip install bag-epl-mcp
118
+ ```
119
+
120
+ ## Usage with Claude Desktop
121
+
122
+ Add to `claude_desktop_config.json`:
123
+
124
+ ```json
125
+ {
126
+ "mcpServers": {
127
+ "bag-epl-mcp": {
128
+ "command": "uvx",
129
+ "args": ["bag-epl-mcp"]
130
+ }
131
+ }
132
+ }
133
+ ```
134
+
135
+ ## Usage with Streamable HTTP (Cloud/Render.com)
136
+
137
+ ```bash
138
+ MCP_TRANSPORT=streamable_http MCP_PORT=8000 bag-epl-mcp
139
+ ```
140
+
141
+ ## Example Queries
142
+
143
+ ```
144
+ # School health service use case:
145
+ "Is Methylphenidate (Ritalin) covered by mandatory health insurance?"
146
+ → epl_sl_suche: suchbegriff="Methylphenidat"
147
+
148
+ # Special needs education:
149
+ "Which medications are covered for children with congenital disorder GG-313 (diabetes)?"
150
+ → epl_ggsl_abfrage: geburtsgebrechen_nr="313"
151
+
152
+ # Legal compliance:
153
+ "Which laws regulate admission to the Spezialitätenliste?"
154
+ → epl_rechtskontext: frage="Welche Gesetze regeln die Aufnahme in die SL?"
155
+
156
+ # Medical devices for inclusive schools:
157
+ "Is a wheelchair covered by mandatory health insurance?"
158
+ → epl_migel_suche: suchbegriff="Rollstuhl"
159
+ ```
160
+
161
+ ## Context: Schulamt der Stadt Zürich
162
+
163
+ This server is particularly relevant for the school system:
164
+
165
+ - **School health service**: Check if a pupil's medication is covered before advising families
166
+ - **Special needs support**: GGSL coverage for pupils with congenital disorders
167
+ - **Inclusive education**: MiGeL coverage for assistive devices
168
+ - **HR / Stadtentwicklung**: Benefits questions for city employees
169
+
170
+ ## Known Limitations
171
+
172
+ - **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.
173
+ - **Fallback**: All tools provide direct links to sl.bag.admin.ch for manual searches.
174
+ - **MiGeL**: Not yet integrated in ePL (planned 2026/2027); MiGeL tools use category matching.
175
+
176
+ ## Testing
177
+
178
+ ```bash
179
+ # Unit tests (no live API calls):
180
+ PYTHONPATH=src pytest tests/ -m "not live" -v
181
+
182
+ # Live tests (requires network):
183
+ PYTHONPATH=src pytest tests/ -m "live" -v
184
+ ```
185
+
186
+ ## Legal Notices
187
+
188
+ Data sources:
189
+ - [Spezialitätenliste (SL)](https://sl.bag.admin.ch) — Bundesamt für Gesundheit (BAG)
190
+ - [KVG SR 832.10](https://www.fedlex.admin.ch/eli/cc/1995/1328_1328_1328/de)
191
+ - [KLV SR 832.112.31](https://www.fedlex.admin.ch/eli/cc/1995/4964_4964_4964/de)
192
+
193
+ This server provides informational access only. For medical or legal decisions, always consult the official BAG sources directly.
194
+
195
+ ---
196
+
197
+ Part of the [swiss-public-data-mcp](https://github.com/malkreide/swiss-public-data-mcp) portfolio.
@@ -0,0 +1,5 @@
1
+ bag_epl_mcp-1.0.0.dist-info/METADATA,sha256=6i0MFIR0nQYfM1zB6-HMrWAeVcAPP4P_KqRyMsH3144,8079
2
+ bag_epl_mcp-1.0.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
3
+ bag_epl_mcp-1.0.0.dist-info/entry_points.txt,sha256=yBZBaw__SBRhjpGAHus9WkbplfMlZ1FypBVdUcZLTk0,56
4
+ bag_epl_mcp-1.0.0.dist-info/licenses/LICENSE,sha256=P9b-OIkbCSNC57PvcQn9oDw28LlQ2kIpefxpyVt7fZQ,1066
5
+ bag_epl_mcp-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ bag-epl-mcp = bag_epl_mcp.server:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 malkreide
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.