A comprehensive public health monitoring and analysis system built with FastAPI, LangGraph agents, and MCP (Model Context Protocol) servers.
public-health-app/
├── .vscode/ # VS Code workspace configuration
│ ├── launch.json # Debug configurations for all components
│ ├── tasks.json # Build and run tasks
│ ├── settings.json # Workspace settings
│ └── extensions.json # Recommended extensions
├── backend/
│ ├── app/ # Main FastAPI application
│ │ ├── agents/ # LangGraph intelligent agents
│ │ │ ├── health_dashboard_agent.py
│ │ │ ├── test_dashboard_agent.py
│ │ │ ├── demo_dashboard_agent.py
│ │ │ └── README_LANGGRAPH_AGENT.md
│ │ ├── routers/ # FastAPI route handlers
│ │ ├── models/ # Data models
│ │ └── main.py # FastAPI application entry point
│ └── mcp/ # MCP servers and infrastructure
│ ├── mcp_public_health.py # FastMCP public health server
│ ├── venv/ # Python virtual environment
│ └── requirements.txt # Python dependencies
├── .env-template # Environment variables template
└── README.md # This file
# Copy environment template
cp .env-template .env
# Edit .env with your configuration
# Add API keys for OpenAI/Anthropic if desired
# Activate virtual environment
cd backend/mcp
source venv/bin/activateOption A: Using VS Code Tasks (Recommended)
- Open Command Palette (
Cmd+Shift+P) - Run
Tasks: Run Task - Select "Start FastMCP Server"
- Optionally run "Start FastAPI App"
Option B: Command Line
# Start FastMCP server (terminal 1)
cd backend/mcp
source venv/bin/activate
python3 -m uvicorn mcp_public_health:app --host 0.0.0.0 --port 8001
# Start FastAPI app (terminal 2)
cd backend
source mcp/venv/bin/activate
python3 start_fastapi.py# Navigate to agents directory
cd backend/app/agents
# Run the dashboard agent tests
PYTHONPATH=../../mcp:../.. python3 test_dashboard_agent.py
# Try the example usage
PYTHONPATH=../../mcp:../.. python3 example_usage.py# Test the dashboard endpoints (requires both servers running)
cd backend
python3 test_dashboard_api.pyThe workspace includes comprehensive VS Code configurations:
- Debug FastMCP Server: Debug the MCP server
- Debug Dashboard Agent: Debug the LangGraph agent interactively
- Debug Dashboard Agent Tests: Debug the test suite
- Debug FastAPI App: Debug the main web application
- Start FastMCP Server: Launch the MCP server
- Start FastAPI App: Launch the web application
- Run Dashboard Agent Tests: Execute agent test suite
- Install Dependencies: Install Python packages
- Open the workspace in VS Code
- Press
F5to see debug options - Use
Cmd+Shift+P→ "Tasks: Run Task" for build tasks - Recommended extensions will be suggested automatically
cd backend/app/agents
PYTHONPATH=../../mcp:../.. python3 health_dashboard_agent.py interactivecd backend/mcp
source venv/bin/activate
python3 mcp_public_health.pycd backend
source mcp/venv/bin/activate
python3 start_fastapi.pyIntelligent agents built with LangGraph for health data analysis:
- PublicHealthDashboardAgent: Generates executive dashboards
- Supports OpenAI GPT-4 and Anthropic Claude
- Comprehensive test suite and demo examples
Model Context Protocol server providing health data tools:
- Public health alerts retrieval
- Health risk trends analysis
- RESTful API with SSE transport
Web application providing REST APIs:
- Health data endpoints
- Agent integration APIs
- Modern async Python architecture
-
FastAPI App:
http://localhost:8000(configurable viaFASTAPI_HOSTandFASTAPI_PORT)- API docs:
http://localhost:8000/docs - Health check:
http://localhost:8000/health - Dashboard endpoints:
POST /dashboard/generate- Generate custom dashboardGET /dashboard/status- Check agent statusGET /dashboard/alerts-summary- Alerts-focused dashboardGET /dashboard/trends-summary- Trends-focused dashboardGET /dashboard/emergency-summary- Emergency response dashboardPOST /dashboard/generate/async- Async dashboard generation
- API docs:
-
FastMCP Server:
http://localhost:8001- SSE endpoint:
http://localhost:8001/sse - Health check:
http://localhost:8001/health
- SSE endpoint:
- Multi-LLM Support: OpenAI GPT-4, Anthropic Claude
- Real-time Data: Live health alerts and trends
- Intelligent Analysis: AI-powered pattern recognition
- Modern Architecture: FastAPI, LangGraph, MCP protocol
- Developer Experience: VS Code integration, comprehensive testing
- LangGraph Agent Documentation
- Dashboard API Documentation
- FastMCP Server Documentation
- MCP Protocol Documentation
- Use the VS Code workspace for development
- Follow the established project structure
- Add tests for new features
- Update documentation as needed
See project license for details.