Skip to main content
Glama

nhs-intelligence-mcp

MCP server for NHS waiting times and trust quality. Connects to Claude Code, Claude Desktop, or any MCP-compatible client.

No LLM inside — deterministic data tools only. Reasoning happens in the client.

Install

bash <(curl -fsSL https://raw.githubusercontent.com/Hydaspex/nhs-intelligence-mcp/main/scripts/setup.sh)

Downloads the latest nhs_intel.db, verifies checksum, registers a weekly refresh job, prints the .mcp.json snippet.

Related MCP server: NHS MCP Server

Tools

Tool

Input

Returns

lookup_wait_time

provider name, specialty

latest wait in weeks

rank_trusts_by_wait

specialty, region?, limit?

trusts ranked longest-first

wait_time_trend

provider_code, specialty

delta, direction, monthly series

get_trust_rating

cqc_provider_id

overall + per-domain CQC ratings

trust_profile

identifier, specialty, by_name?

current wait + trend + CQC rating

Example: "Cardiology waiting times at Chelsea and Westminster?" → 10 weeks, Outstanding (Aug 2026).

Data sources

Source

Frequency

Covers

NHS My Planned Care

Weekly

Current waits — 130 trusts, 74 specialties

NHS England RTT

Monthly

Trend data

CQC HSCA Active Locations

Monthly

Trust quality ratings

All ingested into a single SQLite DB, published as a GitHub release. No network calls at query time.

DB location

OS

Path

Mac

~/Library/Application Support/nhs-intel/nhs_intel.db

Linux

~/.local/share/nhs-intel/nhs_intel.db

Windows

%APPDATA%\nhs-intel\nhs_intel.db

Override: NHS_INTEL_DB=/path/to/nhs_intel.db

Architecture

src/nhs_intel/
  domain/      # value objects
  sources/     # SQLite-backed adapters
  analysis/    # pure trend, ranking, profile logic
  ingest/      # rtt_ingest, cqc_ingest, load_db CLIs
  server.py    # FastMCP layer
data/schema.sql
scripts/setup.sh, refresh_data.sh
.github/workflows/publish_db.yml

Development

uv sync --extra dev
uv run pytest

# Populate DB
uv run nhs-intel-load-db --rtt rtt.csv --planned-care planned_care.csv
uv run nhs-intel-cqc-ingest --out /tmp/cqc.csv && uv run nhs-intel-load-db --cqc /tmp/cqc.csv

uv run nhs-intel-mcp

CI

Runs every Sunday 02:00 UTC. Seeds from the previous release, scrapes 130 trusts, refreshes CQC data, and incrementally backfills any recent RTT months the DB is missing, so waiting-time history accrues across runs. Publishes nhs_intel.db + SHA-256.

Requires WEBSCRAPER_READ_TOKEN secret — see .github/SECRETS.md.

Available Tools

5 tools
get_trust_ratingA

Look up a trust's current CQC quality rating by its CQC provider id (e.g. '1-101681210'). Returns the overall rating (e.g. 'Good', 'Requires improvement') and any per-domain ratings (safe, effective, caring, responsive, well-led). Returns found=false if the provider is unknown or not yet rated; do not infer a rating in that case.

Inputs: cqc_provider_id (required). Returns: object

lookup_wait_timeA

Look up the latest reported waiting time for one NHS trust and specialty from My Planned Care (updated weekly). Waits are in whole weeks. Provide the trust name as published (e.g. 'Guy's and St Thomas'') and the specialty (e.g. 'Cardiology'). Returns found=false if the trust/specialty is not held; do not invent a figure. Note the trust is identified by name here, unlike wait_time_trend which uses an RTT provider code.

Inputs: provider (required), specialty (required). Returns: object

rank_trusts_by_waitA

Rank NHS trusts by their latest waiting time for a specialty (longest first), using My Planned Care weekly data. Provide the specialty; optionally restrict to a region and cap the number of trusts returned. Trusts that publish the specialty but no wait figure are listed after the ranked ones, so coverage gaps are visible rather than hidden.

Inputs: specialty (required), limit, region. Returns: object

trust_profileA

Build a combined profile for one NHS trust and specialty, joining its current wait (My Planned Care), waiting-time trend (RTT), and CQC quality rating. Identify the trust by RTT provider code (e.g. 'RGT') or trust name (e.g. 'Guy's and St Thomas''); set by_name=true when passing a name. Each section is null when that source holds no data. If the trust is not in the identity mapping, returns found=false.

Inputs: specialty (required), identifier (required), by_name. Returns: object

wait_time_trendA

Summarise how the waiting time for a given NHS trust and specialty has moved over time, using NHS England RTT monthly data. Waits are in weeks. Provide the provider code (e.g. 'RGT') and specialty (e.g. 'Cardiology'). Returns the start and end values, the change in weeks, the percentage change, a direction (improving | worsening | flat), and the full monthly series. If no data is held for that trust/specialty, returns found=false; do not invent a trend in that case.

Inputs: specialty (required), provider_code (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a clearly distinct query: single-trust trend, single-trust latest wait, cross-trust ranking, quality rating, and combined profile. The descriptions explicitly call out different data sources and identity keys, so an agent should not misselect.

    Naming Consistency3/5

    Three tools use a verb-first pattern (lookup_, rank_, get_), but wait_time_trend and trust_profile are noun phrases, so the set lacks a single consistent convention. The names are still readable and specific, but the pattern is mixed.

    Tool Count5/5

    Five tools is a well-scoped size for an NHS intelligence read-only server. Each tool covers a distinct query need without redundancy or bloat.

    Completeness5/5

    The surface covers current waiting times, historical trends, cross-trust ranking, quality ratings, and an integrated profile joining those sources. Because trust_profile accepts either an RTT code or a trust name, it also bridges the identifier gap, so there are no dead-end lookup paths.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    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
      41 PyPI
      4
      MIT
    • A
      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
      MIT
    • 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