CMS Medicare Quality MCP
Pricing
$3.00 / 1,000 result item returneds
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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
5 days ago
Last modified
Categories
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Name, city, or keyword to search for (e.g. "Cedars-Sinai", "Boston") |
state | string | No | Two-letter state code to narrow results (e.g. "CA", "TX") |
limit | integer | No | Maximum 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
state | string | No | Two-letter state code (e.g. "NY"). Omit for nationwide results. |
hospitalType | string | No | Filter by type: "Acute Care", "Critical Access", "Childrens", etc. |
minRating | integer | No | Minimum overall star rating (1–5, default: 4) |
limit | integer | No | Maximum 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
state | string | Yes | Two-letter state code (e.g. "FL") |
minRating | integer | No | Minimum overall star rating to include (1–5) |
hospitalType | string | No | Filter by hospital type string |
limit | integer | No | Maximum 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:
| Field | Type | Description |
|---|---|---|
serveMcp | boolean | Set to false to enable batch mode |
state | string | Two-letter state code to query (e.g. "CA") |
query | string | Keyword or facility name search term |
hospitalType | string | Filter by hospital type |
minRating | integer | Minimum overall CMS star rating (1–5) |
limit | integer | Maximum 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
| Field | Type | Description |
|---|---|---|
facility_id | string | CMS Medicare provider number (unique identifier) |
facility_name | string | Official hospital name |
address | string | Street address |
city | string | City |
state | string | Two-letter state code |
zip_code | string | ZIP code |
county | string | County name |
phone | string | Facility phone number |
hospital_type | string | Hospital classification (e.g. Acute Care Hospitals) |
ownership | string | Ownership type (e.g. Voluntary non-profit - Private) |
emergency_services | boolean | Whether the facility offers emergency services |
overall_rating | integer | CMS overall star rating (1–5, or null if not rated) |
safety_of_care | string | Safety of care national comparison rating |
readmission | string | Readmission rate national comparison |
patient_experience | string | Patient experience national comparison |
effectiveness_of_care | string | Effectiveness of care national comparison |
timeliness_of_care | string | Timeliness of care national comparison |
source | string | Always "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_hospitalswith 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.