medicaid-mcp-server

openpharma-org/medicaid-mcp-server

3.2

If you are the rightful owner of medicaid-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Medicaid MCP Server provides access to public Medicaid data through a hybrid architecture using CSV downloads and the DKAN API.

Unofficial Medicaid MCP Server

Model Context Protocol (MCP) server for Medicaid public data access via data.medicaid.gov and state formularies

Features

State Formulary Coverage

Access Medicaid formularies for 5 states covering 43% of US Medicaid beneficiaries (32M of 74M):

  • California - 40K drugs with NDC codes, prior authorization requirements, tier-based pricing
  • New York - 37K drugs with MRA pricing, daily updates, preferred drug lists
  • Ohio - 76K drugs with comprehensive step therapy and quantity limit data
  • Texas - 4.7K drugs with multi-program pricing (Medicaid, CHIP, specialty programs)
  • Illinois - 5.7K drugs with intelligent cross-state NDC enrichment (61.7% coverage)

Pricing & Utilization Data

  • NADAC Drug Pricing - National average drug acquisition costs (1.5M NDCs, weekly updates)
  • Federal Upper Limits - Generic drug maximum reimbursement (2.1M records, monthly updates)
  • Drug Rebate Program - Manufacturer product information and rebate agreements (~3M records)
  • State Drug Utilization - Prescription volume by state, drug, and quarter (5.3M records)
  • Enrollment Trends - Monthly Medicaid/CHIP enrollment by state (all 50 states + territories)

Technical Features

  • Hybrid Architecture - Optimized data access: in-memory caching for small datasets, streaming API for large datasets
  • Automatic Pricing Integration - Formulary queries auto-enrich with NADAC pricing data
  • Intelligent Enrichment - Illinois formulary enhanced via cross-state NDC matching (CA/NY/OH sources)

Usage

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "medicaid": {
      "command": "node",
      "args": ["/path/to/medicaid-mcp-server/build/index.js"]
    }
  }
}

API Reference

Unified Tool: medicaid_info

The server provides a single tool with multiple methods:

State Formulary Search
{
  "method": "search_state_formulary",
  "state": "CA",  // CA, NY, OH, TX, IL
  "label_name": "OZEMPIC",
  "limit": 10
}

Parameters:

  • state (required): State code (CA, NY, OH, TX, IL)
  • label_name: Brand/trade name
  • generic_name: Generic drug name
  • ndc: 11-digit NDC code
  • requires_pa: Prior authorization filter (true/false)
  • has_ndc: Filter for drugs with NDC codes (Illinois only)
  • limit: Max results (default: 10)

State-Specific Parameters:

California:

  • tier: Cost ceiling tier ("Brand" or "Generic")
  • extended_duration: Extended duration eligibility (true/false)

Texas:

  • pdl_pa: PDL prior authorization (true/false)
  • clinical_pa: Clinical prior authorization (true/false)
  • program: Program filter (medicaid, chip, cshcn, etc.)
  • max_price / min_price: Price range filters

New York:

  • preferred: Preferred drug status (true/false)
  • is_brand: Brand vs generic filter (true/false)
  • max_price / min_price: MRA cost range
Drug Pricing
{
  "method": "get_nadac_pricing",
  "drug_name": "ibuprofen",
  "limit": 10
}

Parameters:

  • drug_name: Drug name (fuzzy match)
  • ndc: Specific 11-digit NDC code
  • limit: Max results (default: 10)
Enrollment Trends
{
  "method": "get_enrollment_trends",
  "state": "CA",
  "start_date": "2023-01-01",
  "end_date": "2024-12-31"
}
Federal Upper Limits
{
  "method": "get_federal_upper_limits",
  "ingredient": "NYSTATIN",
  "limit": 10
}
Drug Rebate Information
{
  "method": "get_drug_rebate_info",
  "drug_name": "ozempic",  // or labeler_name: "novo nordisk"
  "limit": 10
}
State Drug Utilization
{
  "method": "get_drug_utilization",
  "state": "CA",
  "drug_name": "OZEMPIC",
  "year": 2024,
  "quarter": 4,
  "limit": 10
}

Architecture

The server uses a hybrid data access strategy optimized for performance and memory efficiency:

Cached Datasets - Small, frequently accessed data loaded into memory:

  • State formularies (CA, NY, OH, TX, IL) - Excel/CSV/JSON/Text parsing with TTL-based refresh
  • NADAC pricing (123 MB) - Weekly CSV download, cached for fast lookups
  • State enrollment (3.6 MB) - Monthly snapshots, cached for trend analysis

Streaming API - Large datasets queried on-demand via CMS DKAN API:

  • Federal Upper Limits (196 MB, 2.1M records)
  • Drug Rebate Program (291 MB, ~3M records)
  • State Drug Utilization (192 MB, 5.3M records)

Memory Footprint: ~215 MB total for cached datasets, minimal for API queries

Performance Characteristics

DatasetAccess MethodTypical Response Time
State FormulariesIn-memory cache<100ms
NADAC PricingIn-memory cache<100ms (20-30s initial load)
State EnrollmentIn-memory cache<50ms
Federal Upper LimitsDKAN API streaming1-2s
Drug Rebate ProgramDKAN API streaming1-2s
State Drug UtilizationDKAN API streaming1-2s

Data Sources

DatasetUpdate FrequencyCoverageAuthority
NADACWeekly1.5M NDC codesCMS
State FormulariesDaily-Monthly43% of US MedicaidState agencies
Federal Upper LimitsMonthly2.1M recordsCMS
Drug RebateQuarterly~3M recordsCMS
Drug UtilizationQuarterly5.3M recordsCMS
EnrollmentMonthlyAll statesCMS

Query Examples

State Formulary Search with Automatic Pricing

// Find GLP-1 drugs in California
{
  "method": "search_state_formulary",
  "state": "CA",
  "generic_name": "semaglutide",
  "limit": 10
}
// Returns formulary data with automatic NADAC pricing integration

Multi-State Enrollment Comparison

{
  "method": "compare_state_enrollment",
  "states": ["CA", "TX", "NY", "FL"],
  "month": "2024-09"
}

Cross-State NDC Enrichment

// Illinois formulary with intelligent enrichment
{
  "method": "search_state_formulary",
  "state": "IL",
  "label_name": "OZEMPIC",
  "limit": 10
}
// Returns IL formulary enriched with NDC codes from CA/NY/OH (61.7% coverage)

Use Cases

Market Access & Strategy

  • State formulary coverage analysis and prioritization
  • Prior authorization landscape mapping
  • Competitive tier placement assessment

Pricing Intelligence

  • NADAC price trend analysis and forecasting
  • Multi-state pricing comparisons
  • Rebate program eligibility verification

Policy & Economics

  • Medicaid expansion impact analysis
  • State enrollment forecasting and growth trends
  • Utilization pattern analysis by geography

Limitations

  • Provider-level utilization data not available (use Medicare MCP for provider analytics)
  • Individual beneficiary claims require CMS Data Use Agreement (T-MSIS/TAF)
  • No HCPCS procedure-level analysis (state-level aggregate data only)