Skip to main content
Glama
Payer Policies MCP Server

Payer Policies MCP Server

by pipeworx-io
README.md
# @pipeworx/payer-policies

A searchable index of published US payer coverage policy documents: which plan or program, what kind of document, its link, the section that matches a drug and an indication, its effective date, when it was last read and its fingerprint. You read the document itself from the publisher.

Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 2043+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.

## Tools

- `search_payer_policies(drug, indication?, plans?, state?, document_type?, plan_year?, current_only?, limit?)` — documents that apply to a drug (brand or ingredient: `Zepbound` and `tirzepatide` reach the same documents, and the product name each source uses is kept). Drug and indication are matched inside the same section, so a sleep-apnea question returns the section on sleep apnea, not the section on weight loss from the same document. Every answer carries a `scope`: which requested plans were searched, which are not indexed (with zero results for each), which sources are stale, and how many documents named the drug without the asked indication.
- `get_payer_policy(policy_id, version?, doc_key?)` — one policy by its stable id, built from the publisher and its own policy number so it survives a moved link: current link, the publisher page where a replacement can be found, every edition held (plan year, label, fingerprint, date), what the document is (policy, listing or committee proposal), who and where it applies as the publisher states it, and its indexed sections.
- `payer_policy_changes(since, publisher?)` — documents that appeared, changed or went missing since a date. Document level only: a changed fingerprint says the publisher changed the file, not what changed inside it. The answer states the date the index began.
- `payer_policy_coverage()` — publishers and plans indexed, documents per publisher, document types, plan years, drugs named, last refresh and staleness, and the major plans not indexed yet.

An empty search result means no matching document within the stated scope. It never means the drug is not covered.

## What is indexed (phase 1)

About 20 documents, entered by hand, for Zepbound (tirzepatide), Wegovy (semaglutide), Mounjaro (tirzepatide) and Ozempic (semaglutide), plus one UnitedHealthcare medical benefit drug policy for botulinum toxins as the medical-policy example:

- Aetna, Pharmacy Clinical Policy Bulletins, Non-Medicare Prescription Drug Plan (commercial): bulletins by plan year, with each edition kept apart.
- UnitedHealthcare, Clinical Pharmacy Programs and Commercial Medical Benefit Drug Policies (commercial): one document can cover several drugs and can be limited to named states.
- Oregon Health Authority, Oregon Health Plan fee-for-service (Medicaid): preferred drug list class listings and prior authorization criteria, plus Oregon State University Drug Use Research & Management committee review packets, which are labelled proposals.

Each document is labelled `policy`, `listing` or `proposal` (`status_label`): a committee packet is a proposal presented to the committee, not the criteria in force.

## How it is kept

The index holds metadata, a fingerprint, version history and a short passage (about 300 characters) per section, never the document text. A monthly refresh reads each document once, compares its fingerprint, re-indexes only the ones that changed and flags any that went missing. Brand and ingredient names are resolved through RxNorm.

## Auth

Keyless.

## Data sources

- Aetna, Pharmacy Clinical Policy Bulletins (Non-Medicare Prescription Drug Plan).
- UnitedHealthcare, Clinical Pharmacy Programs and Commercial Medical Benefit Drug Policies.
- Oregon Health Authority, Preferred Drug List and prior authorization criteria; Oregon State University, Drug Use Research & Management Pharmacy and Therapeutics Committee review packets.
- National Library of Medicine, RxNorm (drug name resolution).

## Notes

- Aetna publishes a bulletin per plan year and reuses the policy number across years (`6192-C`), so the stable id is the same and the editions differ by plan year and label. Aetna states no effective date; the date shown is the month of the last revision in the bulletin's own history, and says so in `effective_date_basis`.
- UnitedHealthcare program numbers read `2026 P 1475-3`: the year and revision suffix change, so the stable id keeps only `P 1475`.
- Oregon criteria documents carry no policy number; the stable id is built from the publisher's own document title. Class-level criteria name no products, so their drugs come from the class listing that links to them and are marked as such.
- A requested plan outside the index is listed under `plans_not_indexed`. Plans that publish criteria only inside a provider login are out of scope and would be listed as not public.

## Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

```json
{
  "mcpServers": {
    "payer-policies": {
      "url": "https://gateway.pipeworx.io/payer-policies/mcp"
    }
  }
}
```

### What this endpoint actually serves

`tools/list` at `https://gateway.pipeworx.io/payer-policies/mcp` returns the tools in the table
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's `initialize` response states its exact scope, and
is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
`ask_pipeworx`, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed
directly, instead of just this one's:

```json
{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}
```

Both URLs reach the same gateway and the same 2043+ data sources. The
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
reaches all of them from either one.

## No MCP client? Call it over HTTP

```bash
curl -X POST https://gateway.pipeworx.io/v1/tools/search_payer_policies \
  -H 'Content-Type: application/json' \
  -d '{"drug":"tirzepatide","indication":"obstructive sleep apnea","plans":["Aetna","Cigna"]}'
```

No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/search_payer_policies`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.

## Run it from npm

`@pipeworx/mcp-payer-policies` is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with `npx`, and it forwards every call to the same
`https://gateway.pipeworx.io/payer-policies/mcp` endpoint shown above. It needs network access;
there is no offline mode.

```json
{
  "mcpServers": {
    "payer-policies": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-payer-policies"]
    }
  }
}
```

Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
`"env": { "PIPEWORX_API_KEY": "<your key>" }` to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.

It lists **only** this pack's tools by default. Set `PIPEWORX_META_TOOLS=1` to
also list `ask_pipeworx` and the other gateway-wide tools.

Behind an HTTPS proxy: Node's built-in `fetch` does not read `HTTPS_PROXY` by
default. Newer Node releases honour it when `NODE_USE_ENV_PROXY=1` is set; check
your Node version's documentation.

## Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English —
this works on the pack endpoint above as well as on the full gateway:

```
ask_pipeworx({ question: "your question about Payer Policies data" })
```

The gateway picks the right tool and fills the arguments automatically.

## More

- [Docs and guides](https://pipeworx.io/docs)
- [pipeworx.io](https://pipeworx.io)

## License

MIT