
SNS Portugal
io.github.ThiagoJacobLannes由 GitHub 账号 ThiagoJacobLannes 发布v0.1.1更新于 Nov 3, 2026
葡萄牙国家卫生服务开放数据:医院、急诊和等候时间。
AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。
原文描述
Portugal's national health service open data: hospitals, emergency and waiting times.
概览
SNS Portugal 的本地 MCP 服务;无需登录;STDIO。
暂无 AI 概览:以下信息来自注册中心条目和服务本身。
安装
在 SourceWeft 中
- 打开 控制台中的 SNS Portugal,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
sns-portugal-mcp
[!WARNING] Deprecated — use portugal-mcp instead. This server now lives on as the
saudefeature of portugal-mcp, together with IPMA weather, INE, Banco de Portugal, Parliament, public contracts and more. Install withuvx portugal-mcp(addPORTUGAL_MCP_FEATURES=saudeto load only this part). Tool names:find_institutions→sns_find_institutions,emergency_stats→sns_emergency_stats,surgery_wait_stats→sns_surgery_wait_stats,consultation_wait_stats→sns_consultation_wait_stats,search_datasets→sns_search_datasets,query_dataset→sns_query_dataset. This repository gets no further updates.
MCP server for official open-data statistics about Portugal's national health service (SNS), so Claude (or any MCP client) can answer "how busy is the emergency department at Santa Maria?", "how many people are waiting for surgery in the Norte region?" or "which SNS hospitals are near me?".
Read-only, no key, no account. It uses only public open data. Not affiliated with the SNS, SPMS or the Portuguese Ministry of Health.
Statistics, not the live queue. The figures are official monthly statistics; the newest month is usually 2-3 months old and provisional. This server does not show live emergency-room waiting times. For those, see tempos.min-saude.pt.
Not medical advice. In an emergency call 112. For health advice call SNS 24 on 808 24 24 24.
Tools
find_institutions
Finds SNS hospitals and local health units (ULS) by name, or the nearest ones to a coordinate. Each result says whether the place reports emergency, consultation and surgery data, and gives stats_entity: the name the statistics use for it. Statistics are published per ULS or hospital group, not per building.
Parameters: query (name, accent-insensitive), lat / lon (sort by distance), emergency_only, limit.
emergency_stats
Emergency-department visits per month, by type (general, paediatric, obstetric, psychiatric) and by Manchester triage colour (red, orange, yellow, green, blue, white, not triaged), with each colour's share of the month. Covers one institution, one region, or the whole country.
Parameters: institution, region (Norte | Centro | LVT | Alentejo | Algarve), period ("YYYY-MM", latest month to include), months (default 6).
surgery_wait_stats
Surgery access per month:
- the surgical waiting list (LIC) at month end;
- the % of waiting patients still within the legal maximum guaranteed time (TMRG);
- the mean days from hospital admission to the operation (scheduled inpatient surgery);
- surgeries performed: scheduled (inpatient and day surgery) and urgent.
Same parameters as emergency_stats. The open data has no breakdown by specialty.
consultation_wait_stats
Hospital outpatient consultations per month (first and follow-up), plus the % of first specialist consultations (referred by a family doctor) held within the TMRG. Same parameters as above.
search_datasets
Searches the 149 datasets of the SNS Transparency portal by keyword. Titles are in Portuguese, so Portuguese keywords work best: "ocupação", "partos", "rastreios", "SNS 24", "INEM". Returns each dataset's id, description and field names.
query_dataset
Runs an ODSQL query (where, select, group_by, order_by, limit, offset) on any portal dataset. Use it for anything the tools above don't cover.
Year-to-date values
Most hospital-activity datasets publish year-to-date cumulative values, so the December figure is the annual total. The curated tools return both the year-to-date value and a derived in_month value (this month minus the previous one). If you use query_dataset directly, do that subtraction yourself.
Install
Quickest (needs uv): no clone needed, it runs straight from PyPI.
For Claude Desktop, use "command": "uvx", "args": ["sns-portugal-mcp"].
From source:
Requires Python 3.10+.
On Windows, if you keep code in a cloud-synced folder (Google Drive, OneDrive), create the virtual environment outside it. Sync clients drop desktop.ini files into folders, which can crash packages on startup.
Add to Claude Code
Add to Claude Desktop
Merge claude_desktop_config.snippet.json into your Claude Desktop claude_desktop_config.json, then restart Claude Desktop:
Data sources
Datasets used by the curated tools:
Data derived from these sources keeps the source's terms. The code in this repository is MIT-licensed.
What this server does not do. It does not call tempos.min-saude.pt/api/*: that API needs a key embedded in the site's own web app, and this server does not use other people's keys. It also does not scrape the live waiting-time report (an embedded Power BI report).
How it works
The server calls the portal's public Explore API with httpx and aggregates in the query itself (group_by tempo, sum(...)), so regional and national totals are computed on the server side. Hospital names are matched without regard to accents. A hospital such as "Hospital de Faro" is mapped to the ULS it reports under ("ULS do Algarve") using the institution list. The dataset catalog, the institution list and the institution names are cached in memory for 6 hours. If an upstream call fails or a query is malformed, the tool returns a clear {"error": ...} and does not guess.
Environment overrides (optional): SNS_ODS_BASE_URL, SNS_INSTITUTIONS_URL.
License
MIT
来源:README.md,提交 f7f15b8
工具
0版本历史
2- v0.1.1最新Nov 3, 2026
- v0.1.0Nov 1, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分