cdc-health-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cdc-health-mcp-serverfind CDC datasets on diabetes prevalence"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://cdc.caseyjhand.com/mcp
Overview
CDC public health data from the CDC Open Data portal and CDC WONDER. Search 1,000+ datasets on vaccination, surveillance, and behavioral risk, inspect their schemas and query them with SoQL, or pull national mortality statistics by year, age, sex, and race.
Tools
Tool | Description |
| Search the CDC dataset catalog by keyword, category, or tag |
| Fetch column schema, row count, and metadata for a dataset |
| List the catalog's category and tag values with their entry counts |
| Execute SoQL queries — filter, aggregate, sort, full-text search, select fields |
| Query CDC WONDER for national mortality, population, and death rates across five databases |
Resources
Resource | Description |
| Top 50 most-viewed catalog entries, for orientation |
| Dataset metadata and the first 100 columns for a specific dataset |
Both resources mirror data also reachable via cdc_discover_datasets and cdc_get_dataset_schema, for clients that surface resources but not tools.
Prompts
Prompt | Description |
| Guided workflow for investigating a public health question across CDC data |
Related MCP server: mcp-data-orlando
Capability reference
cdc_discover_datasets tool
Filters:
query,category, andtags. Up to 100 results per page (default 10);offset + limitis capped at 10,000 (page_out_of_rangepast it).orderisdataset_id(default, stable paging) orrelevanceResults carry
assetType,columnCount(0 marks a chart, map, or other non-tabular asset), an 8-namecolumnSample, and a description cut to 300 characters, plustotalCountandappliedFiltersWhen a
categoryortagsvalue matches nothing, thenoticenames the closest catalog values with their entry counts, e.g.Vaccination→"Vaccinations" (89 datasets)
cdc_get_dataset_schema tool
Takes a four-by-four
datasetId(e.g.bi63-dtpu).column_limit(default 100) andcolumn_offsetpage wide schemas, reportingtotalCount,truncated, andnextOffsetThe dataset
descriptionis capped at 4,000 characters by default (descriptionTruncatedanddescriptionLengthare set when cut);full_description: truereturns the whole textColumns carry
fieldName,dataType, anddescription.rowCountSourcesays whetherrowCountisliveor Socrata'scachedfigure. A non-tabular asset fails withnot_queryable
cdc_list_catalog_vocabulary tool
Every category comes back whole; the ~1,600 tags are ranked by entry count and paged with
tag_limit(default 50) andtag_offset.filter(3+ characters) narrows both by word match, not fuzzy matchingEach value carries
datasetCount; the response also reportsvocabularySize,categoryCount,tagCount,truncated,nextOffset, andtruncationCeiling(an upper bound on the counts of the tags after the page)
cdc_query_dataset tool
Clauses:
select,where,group,having,order, and full-textsearch. Up to 5,000 rows per call (default 100),offsetup to 1,000,000For stable offset paging, set an
orderending in a unique tie-breaker (:idon ungrouped rows, the grouped columns on a grouped query); the notice says so when it is missingeffectiveQueryechoes the SoQL clauses as sent;truncatedandnextOffsetreport paging, with nototalCount. A chart or map ID fails withnot_queryable
cdc_query_wonder tool
| CDC database | Years | Race groups |
|
| D76 — Underlying Cause of Death | 1999–2020 | 4 bridged | — |
| D176 — Provisional Mortality Statistics | 2018 → current year | 6 single-race | yes |
| D158 — Underlying Cause of Death, Single Race | 2018–2024 | 6 single-race | — |
| D77 — Multiple Cause of Death | 1999–2020 | 4 bridged | yes |
| D157 — Multiple Cause of Death, Single Race | 2018–2024 | 6 single-race | yes |
group_bytakes 1–4 ofyear,age_group,sex,race(national only).cause_icd10andmcd_icd10take an ICD-10 code, a range (X40-X49), or a list of up to 50.age_groupstakesNS(age not stated) alone or with all eleven known groups.limitandoffset(max 10,000) page the tableRows carry
deaths,population,crude_rate, andage_adjusted_ratewhere age can be standardized. Cells CDC returns asSuppressed,Unreliable, orNot Applicablereadnulland are listed incellNotes;messagesreports rows CDC hid, andtotalCountis exactCDC rejects requests less than 15 seconds apart, so calls are queued one at a time and spaced 16 seconds apart
cdc://datasets resource
Top 50 catalog entries by popularity, each with
id,name,assetType,category,columnCount, andupdatedAt, plus the catalogtotalCountcolumnCount: 0marks a non-tabular entry;cdc_discover_datasetssearches and pages the full catalog
cdc://datasets/{datasetId} resource
Dataset metadata plus the first 100 columns as
application/json, withcolumnCountandtruncated; the description is capped at 4,000 charactersFor more columns or the full description, use
cdc_get_dataset_schemawithcolumn_offsetorfull_description: true
analyze_health_trend prompt
Arguments:
topicrequired;timeRangeandgeographyoptionalReturns one user message that routes the question to
cdc_query_wonder(national mortality) or the Socrata tools (everything else), then walks discover → inspect → baseline → compare → synthesize
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
CDC-specific:
The Socrata SODA API v2.1 over the CDC Open Data portal (~1,080 datasets); no auth required, and an optional app token raises rate limits
CDC WONDER mortality data from five databases covering 1999 through the current year, reached over its XML request API
The three Socrata tools take a
domaininput, limited todata.cdc.gov(default) andchronicdata.cdc.gov; both serve the same catalogcategoryandtagsmust match the catalog's own values (categories case-sensitively, tags case-insensitively);cdc_list_catalog_vocabularylists themSocrata returns every value as a string, and a column like
yearis numeric in some datasets and text in others. Match WHERE literals to the column'sdataType: numbers bare, strings single-quoted
Agent-friendly output:
Paging is reported explicitly:
totalCount,truncated,nextOffset, andshown/cap. Both query tools cap each page at 200,000 characters, so a wide page can end short oflimitTyped errors with a recovery hint on every declared reason, such as
not_queryable,page_out_of_range, andinvalid_queryUpstream gaps stay visible: WONDER status tokens in
cellNotes, hidden-row notices inmessages, androwCountSourceon schema row countseffectiveQueryechoes the SoQL clauses or a WONDER query summary, so a result can be reproduced
Getting started
Public Hosted Instance
A public instance is available at https://cdc.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"cdc-health-mcp-server": {
"type": "streamable-http",
"url": "https://cdc.caseyjhand.com/mcp"
}
}
}Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"cdc-health-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/cdc-health-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"cdc-health-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/cdc-health-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"cdc-health-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/cdc-health-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
Optional: a Socrata app token for higher rate limits.
Installation
Clone the repository:
git clone https://github.com/cyanheads/cdc-health-mcp-server.gitNavigate into the directory:
cd cdc-health-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# optionally set CDC_APP_TOKENConfiguration
Variable | Description | Default |
| Socrata app token; raises rate limits. | none |
| SODA host for requests with no |
|
| Socrata Discovery API base URL. |
|
| Transport: |
|
| HTTP server port. |
|
| HTTP session mode: |
|
| Authentication: |
|
| Log level ( |
|
| Enable OpenTelemetry. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdioRun checks and tests:
bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite
Docker
docker build -t cdc-health-mcp-server .
docker run --rm -p 3010:3010 cdc-health-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/cdc-health-mcp-server. OpenTelemetry peer dependencies are installed by default; build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions. Catalog overview and dataset detail. |
| Prompt definitions. Health trend analysis workflow. |
| Socrata service — catalog search, vocabularies, metadata, SoQL queries. |
| CDC WONDER service — XML request builder, response parser, request spacing. |
| Shared helpers — HTML-to-text, table-cell escaping, vocabulary matching, response budget. |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor logging,ctx.statefor storageRegister new tools and resources in the
createApp()arrays insrc/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
CDC MCP — wraps CDC open data via Socrata API (data.cdc.gov)
Search and query government open-data portals (Socrata SODA API).
Query and explore Nova Scotia open datasets via the Socrata SODA API.
Utah state open data via Socrata SoQL — government, grants, health, demographics.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides access to 73 CDC public health datasets covering disease surveillance, vaccination tracking, behavioral risk factors, environmental health, and outbreak detection across 18 surveillance systems through the Socrata Open Data API.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables searching and querying Orlando Open Data datasets via Socrata SoQL, providing access to metadata and data rows through natural language or direct tool calls.23 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query U.S. public-health datasets such as disease surveillance, mortality, behavioral risk factors, and flu activity through the Socrata API, using natural language or direct tool calls.14 npmMIT
- AlicenseAqualityBmaintenanceEnables AI clients to search and read over 2,400 New York City public datasets through the Socrata SODA API, with ready-made tools for restaurant health inspections and 311 service requests plus general dataset discovery and querying.4MIT