NHS MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NHS MCP ServerSearch for paracetamol prescriptions in Jan 2024"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
NHS MCP Server
An MCP (Model Context Protocol) server that provides AI assistants with access to NHS public health datasets. Query prescribing data, explore datasets, and look up NHS organisations directly from Cursor, Claude Desktop, or any MCP-compatible host.
Quick Start
Prerequisites
Node.js 20+
npm
Install and Build
npm install
npm run buildConfigure Cursor
The project includes a .cursor/mcp.json that registers the server automatically. After building, restart Cursor to pick up the MCP server.
To configure manually in any MCP host, register a stdio server:
{
"mcpServers": {
"nhs": {
"command": "node",
"args": ["/path/to/nhs-mcp/dist/index.js"]
}
}
}Related MCP server: mcp-uk-ons
Available Tools
datasets_list
List all available datasets on the NHSBSA Open Data Portal.
Parameters:
search_query(optional) — Filter datasets by title or description
Example prompt: "List all NHS datasets related to prescribing"
datasets_metadata
Get detailed metadata for a specific dataset, including resource IDs needed for querying.
Parameters:
dataset_id(required) — Dataset name or ID
Example prompt: "Show me the metadata for the English Prescribing Dataset"
datasets_query
Query a specific dataset resource by its resource ID. Use datasets_metadata first to discover resource IDs.
Parameters:
resource_id(required) — The resource ID to queryfilters(optional) — Key-value pairs to filter recordslimit(optional) — Max records to return (default 20, max 100)offset(optional) — Records to skip for pagination
Example prompt: "Query resource abc-123 filtering by BNF_CODE 0407010H0"
prescriptions_search
Search NHS prescribing data from the English Prescribing Dataset (EPD).
Parameters:
bnf_code(optional) — BNF code (e.g.,0407010H0for Paracetamol)drug_name(optional) — Free-text drug name searchpractice_code(optional) — GP practice codeyear_month(optional) — Period in YYYYMM formatresource_id(optional) — Specific EPD resource IDlimit(optional) — Max records (default 20, max 100)
Example prompt: "Search for Paracetamol prescriptions in January 2024"
Data Sources
Source | API | Auth Required |
CKAN Action API | No |
Development
Project Structure
src/
├── mcp/ # MCP protocol layer (tools, server setup)
│ ├── server.ts
│ └── tools/
├── application/ # Business logic (use cases, formatters, types)
│ ├── use-cases/
│ ├── formatters/
│ └── types.ts
└── infrastructure/ # External concerns (API clients, cache, config)
├── clients/
├── cache/
├── config.ts
└── logger.tsCommands
npm run build # Compile TypeScript
npm run dev # Watch mode
npm test # Run tests
npm run test:watch # Watch mode tests
npm start # Start MCP server (stdio)Running Tests
npm testTests mock all external HTTP calls. No network access is required.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/gsampaio-rh/nhs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server