medicaid-mcp

v0.1.1
medicaid-mcp Checked 4 days ago Published 26 days ago

An MCP server wrapping the data.medicaid.gov API so Claude and other MCP clients can explore US Medicaid and CHIP open data.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_datasets

Find US Medicaid/CHIP datasets by text. Start here to get a dataset_id. Searches data.medicaid.gov (enrollment, eligibility and renewals, NADAC drug prices, State Drug Utilization, managed care, Core Set quality measures) plus the Medicaid datasets this server exposes from data.cms.gov (drug spending, opioid prescribing rates, managed care utilization), whose ids start with 'cms:'. Descriptions are cut to ~300 characters (description_truncated=true); call get_dataset for full metadata. Next: list_dataset_columns, then query_dataset.

ParameterTypeDescription
query *stringWords to match in titles and descriptions; '' to browse.
keywordExact dataset keyword.
pageinteger1-based page number.
page_sizeintegerHits per page, 1-100.
publisherExact publisher name.
themeExact theme, e.g. 'Enrollment'.

get_dataset

Full metadata for one dataset plus its columns, row count, and column kinds. Use when you need the full description, publisher, or last-modified date. For just the columns, list_dataset_columns is cheaper.

ParameterTypeDescription
dataset_id *stringAn identifier from search_datasets: a bare UUID (data.medicaid.gov) or cms:<uuid> (data.cms.gov).

list_dataset_columns

The columns of one dataset (name, upstream type, kind) and its total row count. Call before query_dataset: filters, columns, and sort must use these exact names. kind='numeric' columns accept < <= > >=; kind='text' columns don't, even when they hold numbers (they compare as strings), so filter them with = or in.

ParameterTypeDescription
dataset_id *stringAn identifier from search_datasets: a bare UUID (data.medicaid.gov) or cms:<uuid> (data.cms.gov).

query_dataset

Rows from one dataset, filtered, sorted, and paged. Call list_dataset_columns first. Every column name and op is checked against the dataset's columns; unknown ones are an error, never ignored. - ops: = != < <= > >= in like. = and like are case-insensitive. - < <= > >= only on kind='numeric' columns. Many numeric-looking columns are kind='text'; filter those with = or in on exact values. - in: a non-empty list. like: '%text%' (contains) or 'text%' (starts with); other patterns work on data.medicaid.gov only. - limit defaults to 50 (max 500). The result's note and next_offset say how to ge…

ParameterTypeDescription
dataset_id *stringAn identifier from search_datasets: a bare UUID (data.medicaid.gov) or cms:<uuid> (data.cms.gov).
columnsColumns to return; omit for all.
filtersConditions, all of which must hold (AND).
limitintegerRows per page, 1-500.
offsetintegerRows to skip; use next_offset.
sortSort order; cms: datasets allow one column.

get_state_enrollment_snapshot

Monthly Medicaid and CHIP enrollment for one state, most recent months. One row per month (reporting_period, YYYYMM), oldest first: total_medicaid_and_chip_enrollment is the headline figure, split into total_medicaid_enrollment and total_chip_enrollment. Where a month has been revised, the updated ('U') row is used instead of the preliminary ('P') one; notes say which months are still preliminary. Data lags: the latest month is often months ago.

ParameterTypeDescription
state *stringPostal code or full name, e.g. 'OH' or 'Ohio' (50 states, DC).
months_backintegerMonths to return, counting back from the latest (1-60).

compare_states_enrollment_trend

Monthly Medicaid and CHIP enrollment for several states side by side. One row per state and month, grouped by state, oldest month first; the same updated-over-preliminary rule as get_state_enrollment_snapshot. All states share one window, ending at the newest month any of them has published. Suited to comparing trends or charting total_medicaid_and_chip_enrollment over time.

ParameterTypeDescription
states *array1-10 states, postal codes or full names.
months_backintegerMonths to return, counting back from the latest (1-60).

get_state_eligibility_renewals

Medicaid and CHIP renewal outcomes for one state, by month (unwinding and churn). Per month (reporting_period, YYYYMM), oldest first: beneficiaries with a renewal due, renewed, disenrolled at renewal, and disenrolled for procedural reasons (e.g. paperwork not returned). Where a month has been revised, the updated ('U') row is used instead of the original ('O'); notes say which months are original only.

ParameterTypeDescription
state *stringPostal code or full name, e.g. 'OH' or 'Ohio' (50 states, DC).
months_backintegerMonths to return, counting back from the latest (1-60).

get_managed_care_enrollment

Medicaid managed care enrollment by state, program, and plan, for one year. Annual figures (total_enrollment, dual_enrollment) per plan_name within each program_name. Without state, lists every state for the year, paged (follow next_offset). Some state names carry a source footnote number ('Michigan5'); those rows are included and flagged in notes. A state with no rows has no managed care plans reported for that year.

ParameterTypeDescription
limitintegerRows per page, 1-500.
offsetintegerRows to skip; use next_offset.
statePostal code or full name; omit for every state.
yeare.g. 2024; omit for the latest year.

get_drug_price_nadac

NADAC: what pharmacies pay for a drug, per unit, and how that changed. One row per NDC and effective_date: each price CMS published in the window, from the latest weekly file that carried it, so the first row per NDC is the price in effect when the window starts. nadac_per_unit is dollars per pricing_unit (EA, ML, GM). A name may match at most 20 NDCs; the error lists matches to narrow down. The window counts back from the newest weekly file and spans yearly datasets as needed.

ParameterTypeDescription
drug_name_or_ndc *stringDrug name words matched within ndc_description (e.g. 'ozempic'), or an NDC: 11 digits or dashed.
months_backintegerMonths to return, counting back from the latest (1-60).

get_state_drug_utilization

State Drug Utilization Data: Medicaid prescriptions, units and dollars by drug. One row per NDC, quarter and utilization_type (FFSU fee-for-service, MCOU managed care). Rows with suppression_used='true' have null counts and amounts: suppressed for privacy, not zero. product_name is cut to 10 characters, so match on the start of a brand name or use an NDC. The latest year may hold only its first quarters.

ParameterTypeDescription
state *stringPostal code or full name, e.g. 'OH' or 'Ohio' (50 states, DC).
drug_name_or_ndcDrug name matched within product_name (e.g. 'ozempic'), or an NDC; omit for every drug, paged.
limitintegerRows per page, 1-500.
offsetintegerRows to skip; use next_offset.
yeare.g. 2025; omit for the latest year.

get_quality_measures

Medicaid/CHIP Core Set quality measures for one state: its rate per measure. One row per measure and population, with the state_rate next to the national median (and quartiles) for context. state_rate is text and can be a code (NR, DS, NA, NPR, #): read the notes column, and never treat a code as a number. 'child' includes Child Provisional measures where published. Columns vary by year.

ParameterTypeDescription
measure_set *string'child' or 'adult' Core Set.
state *stringPostal code or full name, e.g. 'OH' or 'Ohio' (50 states, DC).
limitintegerRows per page, 1-500.
offsetintegerRows to skip; use next_offset.
yearCore Set year, e.g. 2025; omit for latest.

whats_new_medicaid

Datasets on data.medicaid.gov modified on or after a date, newest first. Each hit has identifier (use with get_dataset / list_dataset_columns), title, modified and themes. categories filters by theme; an unknown one is an error that lists the themes. Covers data.medicaid.gov only, not the data.cms.gov datasets.

ParameterTypeDescription
since *stringDate as YYYY-MM-DD; datasets modified on or after it.
categoriesdata.medicaid.gov themes, e.g. ['Enrollment']; omit for all.

get_medicaid_drug_spending

Medicaid spending, claims and dosage units for a drug, by year (data.cms.gov). One row per brand/generic pair, totalled across manufacturers (Mftr_Name='Overall'). Matches drug_name within Brnd_Name or Gnrc_Name, case-insensitively. Columns are per year (Tot_Spndng_2024, Tot_Clms_2024, ...); year keeps only that year's. An empty value means no data that year, not zero. Up to 50 matching drugs.

ParameterTypeDescription
drug_name *stringBrand or generic name words, e.g. 'ozempic' or 'semaglutide'.
yeare.g. 2024 to return only that year's columns.

get_opioid_prescribing_rates

Medicaid opioid prescribing rates for a state or the nation, by year (data.cms.gov). One row per year, newest first. Opioid_Prscrbng_Rate is opioid claims as a percent of all claims (Tot_Opioid_Clms / Tot_Clms x 100); the _1Y_Chg and _5Y_Chg columns are CMS's published changes. LA_ columns are a CMS subset the API doesn't define.

ParameterTypeDescription
plan_typestringAll (default), FFS fee-for-service, or MC managed care.
statePostal code or full name; omit for national rates.
yeare.g. 2024; omit for every year.