pharmasync
v0.2.0Read-only NHS medicine supply data: shortages, SSPs, price concessions and dm+d lookups.
An MCP server that makes the Pharmasync UK medicine-supply data legible to AI agents. It is a read-only client of the public pharmasync.xyz/api/v1 artefacts — a static, open-licensed CDN feed. The server holds no API keys, opens no database, and stands up no infrastructure: every answer is computed from data any agent could fetch itself, over a single fixed origin. It exposes nothing that is not already public; it exists to turn an open contract into tools an agent can actually call. Requires Node.js ≥ 20. No account, no key, no configuration.
Summary extracted from the README.
@pharmasync/mcp
An MCP server that makes the Pharmasync UK medicine-supply data legible to AI agents.
It is a read-only client of the public pharmasync.xyz/api/v1
artefacts — a static, open-licensed CDN feed. The server holds no API keys,
opens no database, and stands up no infrastructure: every answer is computed
from data any agent could fetch itself, over a single fixed origin. It exposes
nothing that is not already public; it exists to turn an open contract into
tools an agent can actually call.
Install & run
Requires Node.js ≥ 20. No account, no key, no configuration.
npx @pharmasync/mcp
The server speaks MCP over stdio, so it is launched by an MCP client rather than run by hand.
Wire it into an MCP client
Add it to your client's server config. For a Claude Desktop–style
mcpServers block:
{
"mcpServers": {
"pharmasync": {
"command": "npx",
"args": ["-y", "@pharmasync/mcp"]
}
}
}
Tools
All five tools are read-only and answer from the public artefacts. Every severity tier is a citation of a public government act, reproducible without trusting Pharmasync.
| Tool | What it returns |
|---|---|
lookup_product |
A UK medicine by exact dm+d code or a name substring: the product, its current severity tier (with the citing act), and its supply events (MSN / SSP / price concession), newest first. |
current_shortages |
Medicines with a severity tier in force — WATCH (a Medicine Supply Notification), CONCERN (a restricted-export designation), or CRITICAL (a Serious Shortage Protocol) — ranked highest first, each with its citation. Optionally filtered to one tier. |
changes_since |
Detected supply changes from the delta feed. Pass the cursor you last stored to get only newer changes; the response carries the next latest_cursor to store. |
concessions_for |
The price-concession events for a medicine (by code or name substring), newest first — a financial-exposure and market-stress signal. |
workforce_stats |
The Workforce Panel ledger — the second supply chain: medicines and the people who dispense them. Vacancy rate by role/region, GPhC registrant counts, pharmacy network change by region, and shortage designation status, newest period first. Optionally filtered by metric, role and/or region. Not a jobs board — observed aggregate data only. |
Configuration
| Env var | Default | Purpose |
|---|---|---|
PHARMASYNC_API |
https://pharmasync.xyz/api/v1 |
The artefact origin the server reads. Every request is pinned to this one host; tool arguments only filter fetched data and never reach a URL. |
Data & provenance
The underlying artefacts are published under an open licence and are fully
disclosed at pharmasync.xyz/api/v1
(schemas, methodology, coverage, and freshness/status). Data is fetched live at
tool-call time, so answers are as current as the feed — nothing is bundled or
cached stale.
License
MIT © AyeOnGo