Skip to main content
Glama

nhs-intelligence-mcp

一个 MCP 服务器,暴露 NHS 等待时间和信托情报工具,使智能体客户端(Claude Code、Claude Desktop 或任何兼容 MCP 的主机)能够基于真实的公共数据回答关于 NHS 提供者绩效的开放性问题。

服务器仅暴露数据和分析工具;它从不调用 LLM。智能体推理发生在连接的客户端中,由客户端串联这些工具。这保证了数字的确定性,并且整个服务器可在离线状态下进行单元测试。

状态

里程碑 3。覆盖三个数据源的五个工具:RTT 趋势、My Planned Care 当前状态(查询和排名)、CQC 质量评级,以及一个结合了全部三者的 trust_profile。每个工具都端到端地配有离线测试套件(57 个测试)。

关于信托身份的说明

这三个数据源对信托的命名方式不同:RTT 使用数字提供者代码(例如 RGT),My Planned Care 使用信托名称(例如 Guy's and St Thomas'),CQC 使用自己的提供者 id(例如 1-101681210)。单一来源工具采用其数据源发布的身份。trust_profile 通过一份精选的映射文件将三者协调一致;不在映射中的信托返回 found=false。评级数据是补充性的:如果 CQC 数据源不可达,该概览会丢弃那一部分,但仍返回等待时间和趋势数据。

Related MCP server: NHS MCP Server

设计

src/nhs_intel/
  domain/      # immutable value objects (WaitTimePoint, TrustRating, ...)
  sources/     # adapters behind Protocols (CSV feeds, CQC HTTP, identity map)
  analysis/    # pure trend, ranking and profile-join logic
  server.py    # thin FastMCP layer: validate -> pure handler -> serialise

纯核心(domainanalysis)没有 I/O 操作,也不导入 MCP,因此它可以在没有网络和实时 NHS 数据源的情况下在 CI 中运行。包括 CQC HTTP 客户端在内的每个数据源都位于一个 Protocol 之后,因此测试可以注入内存中的假实现,整个测试套件完全离线。这就是 nhs-webscraper 的端口与适配器边界,应用于数据源。

数据源

数据源

频率

作用

访问

NHS England RTT

每月

趋势主干

CSV 缓存

My Planned Care (via nhs-webscraper)

每周

当前状态层

CSV

CQC 评级

每日

信托质量背景

公共 API,无需密钥

工具

工具

输入

返回

wait_time_trend

provider_code, specialty

开始/结束等待时间、差值、% 变化、方向、月度序列(RTT)

lookup_wait_time

provider(名称), specialty

一个信托的最新当前等待时间(My Planned Care)

rank_trusts_by_wait

specialty, region?, limit?

按当前等待时间排名的信托,最长的在前(My Planned Care)

get_trust_rating

cqc_provider_id

总体及按领域的 CQC 评级

trust_profile

identifier, specialty, by_name?

一个信托的综合当前等待时间、趋势和评级

趋势方向由相对死区(默认 5%)决定,因此长时间等待中的小幅波动会被解读为 flat,而不是虚假趋势:这与 MRR-prediction 项目中做出的噪声抑制选择相同。排名列表会将发布了某专科但没有数值的信托排在已排名信托之后,使覆盖缺口可见,并与零等待区分开来。

运行

依赖项通过 uv 管理,并锁定在 uv.lock 中;同时导出一份普通的 requirements.txt,供没有 uv 的人使用。

# uv resolves and creates .venv automatically from uv.lock:
uv sync --extra dev

# Point the server at an ingested RTT CSV cache (provider_code,specialty,weeks,as_of):
export NHS_INTEL_RTT_CSV=tests/fixtures/rtt_sample.csv

# Optional: My Planned Care scraper output for the current-state tools.
export NHS_INTEL_PLANNED_CARE_CSV=tests/fixtures/planned_care_sample.csv

# Optional: cross-source identity mapping for trust_profile.
export NHS_INTEL_IDENTITY_CSV=tests/fixtures/identity_sample.csv

# Optional: a partnerCode string sent with CQC requests to identify your caller.
export NHS_INTEL_CQC_PARTNER_CODE=my-org

# Run the MCP server over stdio:
uv run nhs-intel-mcp

没有 uv 时:pip install -r requirements.txt,然后直接运行 nhs-intel-mcp,并设置相同的环境变量。

只有 NHS_INTEL_RTT_CSV 是必需的;每个工具都会在其数据源未配置时明确报告,并且 CQC 数据源在不可达时会降级为缺失的评级部分。.mcp.json 使用 uv run 为 Claude Code 注册服务器,因此无论调用 shell 中当前激活的是什么环境,都会使用项目自身的环境。

开发

uv sync --extra dev
uv run pytest    # offline, no network or keys required
uv run ruff check .
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
2dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables querying of current A\&E waiting times, specialist outpatient waiting times, and general outpatient clinic quotas in Hong Kong using natural language through MCP.
    3
    4
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to query NHS public health datasets, including prescribing data, dataset exploration, and organisation lookup via the NHSBSA Open Data Portal.
    9
  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP server for the Semble practice-management API, enabling AI agents to search for patients, contacts, and users, as well as retrieve patient relationships via read-only tools.
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables querying the Polish National Health Fund (NFZ) public API for medical waiting lists and service dictionary, allowing AI to compare wait times and find providers.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server exposing US hospital procedure cost data to AI assistants

  • UK NIHR (National Institute for Health and Care Research) open-data MCP.

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Roberto-Pecora/nhs-intelligence-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server