# CMS.gov Data MCP for AI Agents MCP

> CMS.gov Data connects your AI agent directly to the Centers for Medicare & Medicaid Services' open platform. You can query millions of records covering US healthcare providers, hospital quality ratings across 50 states, and long-term care facilities. It also lets you browse massive public datasets on everything from prescription drug usage to total healthcare spending.

## Overview
- **Category:** brain-trust
- **Price:** Free
- **Tags:** public-health, medicaid, provider-data, open-data, healthcare-compliance, data-query

## Description

This MCP connects your agent to the official Centers for Medicare & Medicaid Services (CMS) data platform. Forget navigating government portals or piecing together information from multiple sources. With this single connection, your AI client gains direct access to a vast, structured database of US healthcare records.

You can use it to find specific doctors by specialty and location, check hospital quality ratings state-by-state, or look up skilled nursing facilities in an area of interest. Beyond individual searches, the platform lets you browse hundreds of public datasets—things like Medicare spending trends or utilization rates for specific drugs. If your job involves analyzing US healthcare data, this is where you start. We built Vinkius to make sure all these critical public health sources are available through one catalog, so your agent can get started immediately.

## Tools

### get_dataset_metadata
Retrieves titles, descriptions, and dates for specific CMS open datasets using their ID.

### search_doctors
Searches the 2.4 million+ Medicare database for providers by name, specialty, or location.

### search_hospitals
Finds hospitals by name or city and reports their quality ratings (1-5 stars) and type of care offered.

### search_providers_by_specialty
Targets specific medical specialties, returning matching providers with their NPI number and practice location.

### get_doctor_by_npi
Pulls detailed professional information for a single doctor using their unique 10-digit NPI number.

### get_hospital_ratings
Retrieves hospital quality ratings, allowing you to filter results by US state code or view national top performers.

### list_datasets
Lists all available CMS datasets, giving identifiers and descriptions for topics like drug usage or spending.

### search_nursing_homes
Locates long-term care facilities and skilled nursing homes by name or area, along with their quality ratings.

## Prompt Examples

**Prompt:** 
```
List all top-rated hospitals in California that offer critical access care.
```

**Response:** 
```
**California Hospital Quality Report**

Based on CMS data, here are the top 5 rated Critical Access Hospitals (CAH) in CA:

| Hospital Name | Overall Rating | Type | Emergency Services |
| :--- | :---: | :--- | :--- :
| St. Jude's Medical Center | ★★★★★ | CAH | Yes |
| Coastal Health Clinic | ★★★★☆ | CAH | Yes |
| Pioneer Care Facility | ★★★★☆ | CAH | No |

*Note: Ratings reflect patient experience and safety measures.*
```

**Prompt:** 
```
I need to find a dermatologist in New York City, preferably one near a hospital with a 4-star rating.
```

**Response:** 
```
**Dermatology Provider Search Results (NYC)**

We found 12 highly rated providers. Here are the top three matching your criteria:

*   **Dr. Anya Sharma**: NPI: 9876543210. Specialty: Dermatology. Location: Midtown, NY.
*   **Dr. Ben Carter**: NPI: 1234567890. Specialty: Dermatology. Location: Upper West Side, NY (near Star Rated Hospital).
*   **Dr. Chen Li**: NPI: 2345678901. Specialty: Dermatology. Location: Brooklyn, NY.

Would you like detailed info for any of these?
```

**Prompt:** 
```
Show me the metadata for datasets related to Medicare spending and utilization.
```

**Response:** 
```
**CMS Open Data Catalog Search**

I found 3 key datasets relevant to your request:

1.  **Dataset ID:** `medicare_utilization_2024`
    *   **Title:** Annual Utilization Rates by Service.
    *   **Description:** Tracks how Medicare uses services across states and years.
    *   **Last Modified:** 2024-05-15
2.  **Dataset ID:** `cms_spending_trends`
    *   **Title:** Healthcare Spending by Category.
    *   **Description:** Detailed metrics on spending related to pharmaceuticals and care facilities.
    *   **Last Modified:** 2023-11-01
```

## Capabilities

### Find Doctors by Location or Specialty
Search the 2.4 million+ Medicare database for providers using names, specialties (like Cardiology), or geographic areas.

### Check Hospital Quality Ratings
Retrieve overall quality star ratings and details on emergency services for hospitals across any US state.

### Look Up Care Facilities
Search databases for both skilled nursing homes and long-term care facilities, including their quality scores.

### Analyze Public Health Datasets
Browse the catalog of CMS open datasets to retrieve metadata on healthcare spending, Medicare utilization, or drug data.

### Get Detailed Provider Profiles
Use a specific 10-digit NPI number to pull comprehensive details for an individual doctor's practice and specialties.

## Use Cases

### Verifying Coverage for an Article
A journalist needs quick stats on the number of active cardiologists in Florida. They ask their agent to use `search_doctors` and get a precise count, instantly updating their article with verifiable, current data.

### Comparing Local Medical Options
A caregiver wants to move parents to a new state. The agent uses `get_hospital_ratings` for the top 5 hospitals and then runs `search_nursing_homes` nearby, providing a comparison table of quality scores.

### Analyzing Spending Trends
A policy professional needs to know how Medicare drug spending changed last year. They use `list_datasets`, find the relevant dataset ID, and then run `get_dataset_metadata` for a comprehensive overview of the data.

### Checking Provider Credentials
A user gets a referral but needs to confirm the doctor's credentials. They provide the NPI number, and the agent uses `get_doctor_by_npi` to return the full name, specialties, and practice address.

## Benefits

- Find specific providers: Use `search_doctors` or `get_doctor_by_npi` to pull complete profiles on doctors, including their NPI number and practice address.
- Assess facility quality: Run `search_hospitals` or use `get_hospital_ratings` to compare hospital star ratings across different states quickly.
- Research broad trends: Use `list_datasets` to see metadata for hundreds of CMS datasets covering Medicare spending, without needing a specific query upfront.
- Target specialists: The `search_providers_by_specialty` tool lets you filter down millions of records instantly by medical field (e.g., Dermatology).
- Find long-term care options: You can use `search_nursing_homes` to locate skilled nursing facilities and assess their quality ratings in a given area.

## How It Works

The bottom line is that your AI client handles the complex, multi-source data pulling so you just get the final report.

1. Connect your AI client to the CMS.gov Data MCP via Vinkius.
2. Tell your agent exactly what you need—for example, 'Find all internal medicine doctors in Texas with a 4-star rated hospital near them.'
3. The agent executes multiple queries across provider searches, hospital lookups, and dataset filtering to give you a single, synthesized answer.

## Frequently Asked Questions

**How can I use CMS.gov Data MCP to find a doctor by specialty in a specific area?**
You can search for doctors using the `search_providers_by_specialty` tool and then refine that list with location parameters. This quickly narrows down millions of records so you only see relevant, local providers.

**Does CMS.gov Data MCP help me compare hospital quality across different states?**
Yes. You can use the `get_hospital_ratings` tool to pull official star ratings and service availability for any US state you specify, making direct comparisons easy.

**Is CMS.gov Data MCP reliable for research purposes?**
Absolutely. Since this data comes directly from the Centers for Medicare & Medicaid Services, it's considered a primary source used by government researchers and journalists alike.

**What if I only have an NPI number? Can CMS.gov Data MCP still help?**
If you have a provider's 10-digit NPI, the `get_doctor_by_npi` tool gives you their full profile instantly, including specialties and practice details.

**How do I find out what kind of healthcare data is available in general?**
Use the `list_datasets` tool. It shows you titles and descriptions for hundreds of datasets covering topics like drug usage and spending, helping you figure out your research path.