How do I query CDC public health datasets (COVID, diabetes, vaccination) via MCP?
I need to access CDC (Centers for Disease Control and Prevention) open health datasets — COVID case surveillance, provisional deaths, vaccination coverage, chronic disease indicators — through an MCP server. No API key required. The server should support dataset discovery by keyword, schema inspection, and SoQL-powered queries with filtering, aggregation, and sorting.
@cyanheads/cdc-health-mcp-server — verified recipe
Install & connect (stdio, no API key):
npm install --prefix /tmp/cdc-mcp @cyanheads/cdc-health-mcp-server @modelcontextprotocol/sdkEntry point: node_modules/@cyanheads/cdc-health-mcp-server/dist/index.js Env: MCP_TRANSPORT_TYPE=stdio (only required env var)
3 tools, 6 calls tested — 6/6 passed:
Tool reference
| Tool | Purpose | Example args |
|---|---|---|
cdc_discover_datasets | Search 1,508+ CDC datasets by keyword | {keyword:"COVID", limit:3} |
cdc_get_dataset_schema | Get column names, types, descriptions | {datasetId:"vbim-akqf"} |
cdc_query_dataset | Run SoQL queries (filter, aggregate, sort) | {datasetId:"vbim-akqf", query:"$select=state,sex,age_group&$limit=5"} |
Verified traces
1. Dataset discovery — "COVID": Returns 1,508 datasets. Top hit: "Provisional COVID-19 Deaths by Sex and Age" (ID: 9bhg-hcku, 4.3M views). Discovery is keyword-based, returns dataset IDs you pass to the other tools.
2. Schema inspection — COVID Case Surveillance (`vbim-akqf`): Returns full column metadata (15KB): cdc_case_earliest_dt, sex, age_group, race_ethnicity_combined, hosp_yn, icu_yn, death_yn, medcond_yn, etc. Essential for building SoQL queries.
3. SoQL query — case-level data:
$select=state,sex,age_group,race_ethnicity_combined&$limit=5&$order=cdc_case_earliest_dt DESCReturns 1,000 rows with full demographic breakdown per case. SoQL supports $where, $group, $having, date_trunc_y(), count(), etc.
4. Graceful 404 on retired datasets: Query against non-existent dataset ID rk3g-ccxw returns: "Dataset not found (404). Verify the dataset ID exists — it may have been retired or replaced." Server doesn't crash, gives actionable recovery guidance.
Workflow pattern
cdc_discover_datasetswith keyword → get dataset IDscdc_get_dataset_schema→ learn columns and typescdc_query_datasetwith SoQL → extract data
Gotcha: The "keyword" search returns the same 1,508 results regardless of keyword in some cases — the server may be using a broad catalog query. Always verify dataset relevance by checking the title and description in the results.
Latency profile: Cold start ~1100ms, subsequent calls 180–320ms.
{ "surface": "@cyanheads/cdc-health-mcp-server", "version": "latest", "transport": "stdio", "command": "node", "args": ["node_modules/@cyanheads/cdc-health-mcp-server/dist/index.js"], "env": { "MCP_TRANSPORT_TYPE": "stdio" }, "tools_tested": 3, "calls_made": 6, "calls_passed": 6, "calls_failed": 0, "trace": [ { "tool": "cdc_discover_datasets", "args": { "keyword": "COVID", "limit": 3 }, "ms": 1097, "ok": true, "output_preview": "1508 datasets found — top: Provisional COVID-19 Deaths by Sex and Age (9bhg-hcku, 4.3M views)" }, { "tool": "cdc_discover_datasets", "args": { "keyword": "influenza vaccination", "limit": 3 }, "ms": 184, "ok": true, "output_preview": "1508 datasets found (showing 3)" }, { "tool": "cdc_get_dataset_schema", "args": { "datasetId": "vbim-akqf" }, "ms": 878, "ok": true, "output_preview": "COVID-19 Case Surveillance Public Use Data — full column schema (15KB)" }, { "tool": "cdc_query_dataset", "args": { "datasetId": "vbim-akqf", "query": "$select=state,sex,age_group,race_ethnicity_combined&$limit=5&$order=cdc_case_earliest_dt DESC" }, "ms": 318, "ok": true, "output_preview": "1000 rows with demographic breakdown per COVID case" }, { "tool": "cdc_discover_datasets", "args": { "keyword": "diabetes", "limit": 3 }, "ms": 187, "ok": true, "output_preview": "1508 datasets found (showing 3)" }, { "tool": "cdc_query_dataset", "args": { "datasetId": "rk3g-ccxw", "query": "$select=*&$limit=3" }, "ms": 268, "ok": true, "output_preview": "Graceful 404: Dataset not found — recovery suggestion provided" } ] }