CMS Medicare Quality MCP avatar

CMS Medicare Quality MCP

Pricing

$3.00 / 1,000 result item returneds

Go to Apify Store
CMS Medicare Quality MCP

CMS Medicare Quality MCP

This Apify actor exposes the Centers for Medicare & Medicaid Services (CMS) Hospital Quality data as a fully functional Model Context Protocol (MCP) server. It allows AI assistants, agents, and MCP-compatible clients to query real-time hospital quality ratings, safety scores, ...

Pricing

$3.00 / 1,000 result item returneds

Rating

0.0

(0)

Developer

Andrew Avina

Andrew Avina

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Share

CMS Medicare Quality Intelligence MCP Server

This Apify actor exposes the Centers for Medicare & Medicaid Services (CMS) Hospital Quality data as a fully functional Model Context Protocol (MCP) server. It allows AI assistants, agents, and MCP-compatible clients to query real-time hospital quality ratings, safety scores, and facility information for every Medicare-certified hospital in the United States — no credentials required.


What This Actor Does

The CMS Provider Data Catalog contains quality ratings and performance metrics for approximately 5,000 Medicare-certified hospitals across the United States. This data includes overall star ratings (1–5), safety-of-care scores, readmission rates, patient experience results, and care effectiveness measures — all collected and published quarterly by CMS under the Hospital Compare program. For healthcare researchers, market analysts, compliance teams, and patient advocates, this dataset is one of the most authoritative public sources of hospital performance information available anywhere.

This actor wraps the CMS Socrata API (dataset xubh-q36u) in a lightweight MCP server, making it instantly accessible to any LLM or agent framework that speaks MCP. When launched with serveMcp: true, it starts an HTTP server on port 4321 exposing three structured tools: hospital search by name or keyword, top-rated hospital lookup by state or nationally, and full hospital enumeration by state. In batch mode (serveMcp: false), it runs a one-time query and writes structured JSON records directly to the Apify dataset.

No API key. No registration. No rate-limit tokens to manage. The CMS data API is fully open.


MCP Tools Available

Point your MCP client at http://<actor-run-url>:4321 after setting serveMcp: true.

1. cms_hospital_search

Searches CMS hospital records by facility name, city, or keyword. Returns matching hospitals with full quality metrics and contact information.

ParameterTypeRequiredDescription
querystringYesName, city, or keyword to search for (e.g. "Cedars-Sinai", "Boston")
statestringNoTwo-letter state code to narrow results (e.g. "CA", "TX")
limitintegerNoMaximum number of results to return (default: 10, max: 50)

Returns: Array of hospital objects with quality ratings, address, phone, and facility metadata.

Example call:

{
"tool": "cms_hospital_search",
"arguments": {
"query": "Mayo Clinic",
"state": "MN",
"limit": 5
}
}

2. cms_top_rated_hospitals

Returns hospitals with the highest CMS overall star ratings (4–5 stars), optionally filtered by state or hospital type.

ParameterTypeRequiredDescription
statestringNoTwo-letter state code (e.g. "NY"). Omit for nationwide results.
hospitalTypestringNoFilter by type: "Acute Care", "Critical Access", "Childrens", etc.
minRatingintegerNoMinimum overall star rating (1–5, default: 4)
limitintegerNoMaximum results (default: 10, max: 50)

Returns: Ranked list of high-performing hospitals with full metric breakdown.

Example call:

{
"tool": "cms_top_rated_hospitals",
"arguments": {
"state": "TX",
"minRating": 5,
"limit": 10
}
}

3. cms_hospitals_by_state

Retrieves all Medicare-certified hospitals in a given state, with optional filters for rating and hospital type.

ParameterTypeRequiredDescription
statestringYesTwo-letter state code (e.g. "FL")
minRatingintegerNoMinimum overall star rating to include (1–5)
hospitalTypestringNoFilter by hospital type string
limitintegerNoMaximum results (default: 25, max: 100)

Returns: Full list of hospitals in the state matching the specified filters.

Example call:

{
"tool": "cms_hospitals_by_state",
"arguments": {
"state": "FL",
"minRating": 4,
"limit": 25
}
}

Batch Mode (Non-MCP)

Set serveMcp: false in the actor input to run a single query and exit. The actor will execute the query, push results to the Apify dataset, and terminate — no persistent server is started.

Batch input fields:

FieldTypeDescription
serveMcpbooleanSet to false to enable batch mode
statestringTwo-letter state code to query (e.g. "CA")
querystringKeyword or facility name search term
hospitalTypestringFilter by hospital type
minRatingintegerMinimum overall CMS star rating (1–5)
limitintegerMaximum number of records to return

Results are written as structured JSON records to the default Apify dataset and can be exported as JSON, CSV, or XLSX from the Apify console.


Data Source

This actor queries the CMS Provider Data Catalog via the Socrata Open Data API. The specific dataset is the Hospital General Information dataset (xubh-q36u), maintained by the Centers for Medicare & Medicaid Services under the U.S. Department of Health and Human Services.

The dataset covers all Medicare-certified inpatient hospitals in the United States — approximately 5,000 facilities. Quality metrics are updated quarterly and reflect the most recent Hospital Compare scoring cycle. The Socrata API endpoint is https://data.cms.gov/resource/xubh-q36u.json and requires no authentication for read access.


Use Cases

  • Hospital competitive analysis — Compare star ratings, patient experience scores, and safety metrics across competing facilities in a market.
  • Healthcare due diligence — Evaluate acquisition targets or joint venture partners using objective CMS quality data.
  • Regulatory compliance research — Identify hospitals with poor safety-of-care or high readmission rates for compliance and audit prioritization.
  • Patient safety research — Analyze correlations between hospital ownership type, emergency service availability, and overall quality ratings.
  • Healthcare market analysis — Map hospital density, rating distribution, and service coverage gaps across states or regions.
  • AI-assisted care navigation — Power patient-facing agents that recommend highly rated facilities based on location and care needs.
  • Grant and policy work — Support public health research with structured, citable CMS data programmatically accessible via LLM tooling.

Output Fields

FieldTypeDescription
facility_idstringCMS Medicare provider number (unique identifier)
facility_namestringOfficial hospital name
addressstringStreet address
citystringCity
statestringTwo-letter state code
zip_codestringZIP code
countystringCounty name
phonestringFacility phone number
hospital_typestringHospital classification (e.g. Acute Care Hospitals)
ownershipstringOwnership type (e.g. Voluntary non-profit - Private)
emergency_servicesbooleanWhether the facility offers emergency services
overall_ratingintegerCMS overall star rating (1–5, or null if not rated)
safety_of_carestringSafety of care national comparison rating
readmissionstringReadmission rate national comparison
patient_experiencestringPatient experience national comparison
effectiveness_of_carestringEffectiveness of care national comparison
timeliness_of_carestringTimeliness of care national comparison
sourcestringAlways "CMS Provider Data Catalog"

Integration Example

Claude Desktop claude_desktop_config.json:

{
"mcpServers": {
"cms-medicare": {
"url": "http://<your-actor-run-url>:4321",
"transport": "http"
}
}
}

Sample agent conversation:

User: Which hospitals in Arizona have a 5-star CMS rating and offer emergency services?

Assistant: (calls cms_top_rated_hospitals with state="AZ", minRating=5) I found 4 hospitals in Arizona with a 5-star CMS overall rating that offer emergency services: Banner University Medical Center (Phoenix), Honor Health Scottsdale Osborn Medical Center, Mayo Clinic Hospital (Phoenix), and Chandler Regional Medical Center. All four score "Above the National Average" for patient experience and safety of care...


Data sourced from CMS Provider Data Catalog. Updated quarterly by CMS. Coverage: All Medicare-certified hospitals in the United States.