This MCP (Model Context Protocol) server provides tools for accessing epidemiological data and trend analysis.
The server currently provides three main tools:
- fetch_epi_signal - Fetch specific COVID-19 signals from Delphi Epidata API
- detect_rising_trend - Detect rising trends in time series data using rolling regression
- get_server_info - Server information and capabilities
- Access to Delphi EpiData API for COVID-19 signals
- Multiple signal types including:
- COVID symptom searches
- Doctor visits for COVID-like symptoms
- Vaccine acceptance rates
- Hospital admissions
- Death rates
- Flexible geographic and time filtering
- Real-time data access
- Statistical trend analysis using rolling linear regression
- Configurable window sizes and thresholds
- Log-scale analysis for exponential growth detection
- Multiple time series support
- Smoothing options for noise reduction
- Install dependencies:
pip install -r requirements.txt- Make the server executable:
chmod +x mcp_public_health.pypython mcp_public_health.pyThe server runs using FastMCP with SSE transport.
Fetch COVID-like symptoms data:
{
"name": "fetch_epi_signal",
"arguments": {
"signal": "smoothed_wcli",
"time_type": "day",
"geo_type": "state",
"start_time": "20231201",
"end_time": "20231231"
}
}Fetch COVID cases by county:
{
"name": "fetch_epi_signal",
"arguments": {
"signal": "confirmed_7dav_incidence_prop",
"geo_type": "county",
"geo_values": ["06037", "36061"]
}
}Analyze trend in fetched data:
{
"name": "detect_rising_trend",
"arguments": {
"signal_name": "smoothed_wcli",
"value_column": "value",
"window_size": 7,
"min_log_slope": 0.01
}
}{
"name": "get_server_info",
"arguments": {}
}The following epidemiological signals are available through the Delphi EpiData API:
- smoothed_wwearing_mask_7d - People Wearing Masks
- smoothed_wcovid_vaccinated_appointment_or_accept - Vaccine Acceptance
- sum_anosmia_ageusia_smoothed_search - COVID Symptom Searches on Google
- smoothed_wcli - COVID-Like Symptoms
- smoothed_whh_cmnty_cli - COVID-Like Symptoms in Community
- smoothed_adj_cli - COVID-Related Doctor Visits
- confirmed_7dav_incidence_prop - COVID Cases
- confirmed_admissions_covid_1d_prop_7dav - COVID Hospital Admissions
- deaths_7dav_incidence_prop - COVID Deaths
[
{
"geo_value": "ca",
"time_value": "2023-12-01",
"value": 2.3456,
"stderr": 0.1234,
"sample_size": 1000
}
]{
"rising_periods": [
["2023-12-05", "2023-12-12"],
["2023-12-20", "2023-12-25"]
],
"total_periods": 2,
"sample_log_slopes": [0.023, 0.018, 0.031],
"status": "success",
"analysis_details": {
"window_size": 7,
"min_log_slope": 0.01,
"data_points_analyzed": 31
}
}The server uses FastMCP framework with SSE transport and includes:
- Comprehensive error handling
- Debug logging support
- Type-safe tool definitions
- Real-time data processing capabilities
This server integrates with:
- LangChain MCP adapters
- LangGraph agent workflows
- Public health dashboard systems
- Real-time monitoring applications