Skip to main content
Glama
cms-medicare-drug-spending-mcp

cms-medicare-drug-spending-mcp

README.md
# cms-medicare-drug-spending-mcp

Live CMS Medicare Part D Spending by Drug analytics over Model Context Protocol (MCP). Pharmacy benefit managers, health economics teams, market access analysts, and biotech researchers can inspect 2020 through 2024 drug spending, beneficiary counts, claim volumes, and unit-cost growth with zero API keys and zero sign-up. It connects right away.

## Hosted endpoint

Point any Streamable HTTP MCP client at the free hosted Cloudflare Worker endpoint.

```text
https://cms-medicare-drug-spending-mcp.lipmichal.workers.dev/mcp
```

## Available tools

| Tool | Purpose |
| --- | --- |
| `search_drug_spending` | Search Medicare Part D drug spending records by brand name, generic name, or keyword |
| `get_drug_spending_trend` | Retrieve the full 2020 through 2024 spending, claims, beneficiaries, and unit-cost CAGR trend for a drug |
| `search_by_manufacturer` | List Medicare Part D drug rows attributed to a pharmaceutical manufacturer with combined 2024 spend |
| `compare_drugs_spending` | Compare 2 to 4 prescription drugs side by side on 2024 spending, beneficiaries, and 4-year unit-cost CAGR |
| `get_dataset_stats` | Inspect live CMS Part D dataset row counts, reporting years, and dataset UUID |

## Client configuration

Add the remote URL to Claude Desktop, Cursor, or VS Code MCP settings.

```json
{
  "mcpServers": {
    "cms-medicare-drug-spending": {
      "url": "https://cms-medicare-drug-spending-mcp.lipmichal.workers.dev/mcp"
    }
  }
}
```

## Run locally over stdio

You can also run the server locally on Node 20 or newer over stdio.

```bash
npm install
npm run build
npm start
```

## Compliance and reliability

Every upstream request queries `data.cms.gov/data-api/v1/dataset/7e0b4365-fd63-4a29-8f5e-e0ac9f66a81b/data` with a polite `User-Agent` header (`mcpstamp-cms-medicare-drugs/1.0 (hello@mcpstamp.com)`) and automatic retry on transient network or 5xx errors. Cloudflare edge caching applies only to HTTP 2xx responses, so upstream faults don't linger in cache. All five tools declare read-only, non-destructive, idempotent, open-world annotations, and the Worker negotiates protocol version `2026-07-28` down to the SDK version cleanly.

## More MCP Servers and Readiness Check

This server belongs to the public MCP directory maintained by MCPStamp and Zovo.

- [Free live-data MCP directory](https://www.mcpstamp.com/free-servers/) with hosted keyless endpoints and client setup guides.
- [Free MCP readiness checker](https://www.mcpstamp.com/check/) to score any MCP server for Claude, ChatGPT, and registry submission.
- [MCP Readiness Audit ($490)](https://www.mcpstamp.com/services/#audit) for teams shipping a production server who want a hands-on security, schema, and store review.
- [Zovo Pro MCP Bundle ($39 one-time)](https://mcp.zovo.one/buy/bundle?src=gh.cms-medicare-drug-spending-mcp) with hosted commercial servers and priority endpoints.