cdc-health-mcp-server

cdc-health-mcp-server

cyanheads

Access CDC health data with MCP server. Search 1,487+ datasets, execute SoQL queries for disease surveillance, mortality

MCP server for discovering and querying CDC public health datasets via the Socrata SODA API, providing access to ~1,487 datasets across disease surveillance, mortality, vaccinations, and behavioral risk factors.

1463 viewsLocal (stdio)

About cdc-health-mcp-server

cdc-health-mcp-server is a community-built MCP server published by cyanheads that provides AI assistants with tools and capabilities via the Model Context Protocol. Access CDC health data with MCP server. Search 1,487+ datasets, execute SoQL queries for disease surveillance, mortality It is categorized under other. This server exposes 3 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install cdc-health-mcp-server in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

cdc-health-mcp-server is released under the Apache-2.0 license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (3)

cdc_discover_datasets

Search the catalog by keyword, category, or tag. Entry point for all queries.

cdc_get_dataset_schema

Fetch column schema, row count, and metadata for a dataset. Essential before writing SoQL queries.

cdc_query_dataset

Execute SoQL queries — filter, aggregate, sort, full-text search, and field selection.

@cyanheads/cdc-health-mcp-server

MCP server for the CDC Open Data portal. Search ~1,487 public health datasets, inspect schemas, and execute SoQL queries across disease surveillance, mortality, vaccinations, behavioral risk, and more. STDIO or Streamable HTTP.

3 Tools • 2 Resources • 1 Prompt

npm Version Framework MCP SDK

License TypeScript Bun

Public Hosted Server: https://cdc.caseyjhand.com/mcp


Tools

Three tools for discovering and querying CDC public health data:

ToolDescription
cdc_discover_datasetsSearch the catalog by keyword, category, or tag. Entry point for all queries.
cdc_get_dataset_schemaFetch column schema, row count, and metadata for a dataset. Essential before writing SoQL queries.
cdc_query_datasetExecute SoQL queries — filter, aggregate, sort, full-text search, and field selection.

cdc_discover_datasets

Search the CDC dataset catalog to find relevant datasets.

  • Full-text search across dataset names and descriptions
  • Filter by domain category (e.g., "NNDSS", "Vaccinations", "Behavioral Risk Factors")
  • Filter by domain tags (e.g., ["covid19", "surveillance"])
  • Returns dataset IDs, names, descriptions, column lists, and update timestamps
  • Pagination via offset for browsing large result sets

cdc_get_dataset_schema

Fetch the full column schema for a specific dataset.

  • Column names, data types, and descriptions
  • Row count and last-updated timestamp
  • Essential for understanding column types before writing $where clauses
  • Accepts four-by-four dataset identifiers (e.g., bi63-dtpu)

cdc_query_dataset

Execute SoQL queries against any CDC dataset.

  • Full SoQL support: $select, $where, $group, $having, $order
  • Full-text search across all text columns via $q
  • Up to 5,000 rows per request with pagination
  • Returns the assembled SoQL query string for debugging
  • All response values are strings (per SODA v2.1) — parse based on column type metadata

Resources and prompt

TypeNameDescription
Resourcecdc://datasetsTop 50 datasets by popularity for orientation
Resourcecdc://datasets/{datasetId}Dataset metadata and column schema (equivalent to schema tool)
Promptanalyze_health_trendGuided 5-step workflow: discover, inspect, baseline query, compare, synthesize

Features

Built on @cyanheads/mcp-ts-core:

  • Declarative tool definitions — single file per tool, framework handles registration and validation
  • Unified error handling across all tools
  • Pluggable auth (none, jwt, oauth)
  • Swappable storage backends: in-memory, filesystem, Supabase, Cloudflare KV/R2/D1
  • Structured logging with optional OpenTelemetry tracing
  • Runs locally (stdio/HTTP) or on Cloudflare Workers from the same codebase

CDC-specific:

  • Wraps the Socrata SODA API v2.1 — no auth required, optional app token for higher rate limits
  • Discovery-first approach for a heterogeneous catalog (~1,487 datasets across many health domains)
  • Conservative request spacing for rate limit compliance (no rate-limit headers returned by Socrata)
  • Handles SODA string-typed responses — all values returned as strings, parsed via column type metadata

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": {
      "type": "streamable-http",
      "url": "https://cdc.caseyjhand.com/mcp"
    }
  }
}

Self-Hosted / Local

Add the following to your MCP client configuration file.

{
  "mcpServers": {
    "cdc-health": {
      "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": {
      "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": {
      "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/mcp

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/cyanheads/cdc-health-mcp-server.git
  1. Navigate into the directory:
cd cdc-health-mcp-server
  1. Install dependencies:
bun install

Configuration

All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:

VariableDescriptionDefault
MCP_TRANSPORT_TYPETransport: stdio or httpstdio
MCP_HTTP_PORTHTTP server port3010
MCP_AUTH_MODEAuthentication: none, jwt, or oauthnone
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.)info
LOGS_DIRDirectory for log files (Node.js only)<project-root>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1in-memory
CDC_APP_TOKENSocrata app token for higher rate limitsnone
CDC_BASE_URLBase URL for SODA API requestshttps://data.cdc.gov
CDC_CATALOG_URLBase URL for Socrata Discovery APIhttps://api.us.socrata.com/api/catalog/v1
OTEL_ENABLEDEnable OpenTelemetryfalse

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:stdio
    
  • Run checks and tests:

    bun run devcheck  # Lints, formats, type-checks, and more
    bun run test      # Runs the test suite
    

Project structure

DirectoryPurpose
src/mcp-server/toolsTool definitions (*.tool.ts). Three CDC data tools.
src/mcp-server/resourcesResource definitions. Catalog overview and dataset detail.
src/mcp-server/promptsPrompt definitions. Health trend analysis workflow.
src/services/socrataSocrata SODA API service layer — HTTP client, catalog search, metadata, queries.
src/configServer-specific environment variable parsing and validation with Zod.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging, ctx.state for storage
  • Register new tools and resources in the createApp() arrays

Contributing

Issues and pull requests are welcome. Run checks and tests before submitting:

bun run devcheck
bun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Alternatives

Related Skills

Browse all skills
drawio-diagrams-enhanced

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

916
pptx

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

133
video-downloader

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

50
docx

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

38
skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

23
stock-analyzer

Provides comprehensive technical analysis for stocks and ETFs using RSI, MACD, Bollinger Bands, and other indicators. Activates when user requests stock analysis, technical indicators, trading signals, or market data for specific ticker symbols.

22