HomeCare Cohort MCP

HomeCare Cohort MCP

Identifies high-risk patient cohorts and generates care gap closure plans using a synthetic OMOP-like dataset. It provides clinical decision support tools for homecare management through a DuckDB-backed FastMCP server.

Category
Visit Server

README

HomeCare Cohort MCP (Step 1)

FastMCP server that powers the TopGun HomeCare demo Step 1 agents. It exposes tools to surface the high‑risk cohort and produce the Step 1b care gap closure plan from the synthetic OMOP-like dataset.

Prerequisites

  • macOS / Linux shell
  • Conda (recommended) or Python 3.11
  • Repo cloned at /Users/mdnasir/Documents/proj/TopGun/code/homecare-cohort-mcp

Environment Setup

conda create -n homecare-mcp python=3.11 -y
conda activate homecare-mcp
pip install -r requirements.txt

Build DuckDB Dataset

The synthetic CSVs live in ../synthetic_data. Rebuild the DuckDB file whenever the CSVs change:

cd /Users/mdnasir/Documents/proj/TopGun/code/homecare-cohort-mcp
python -c "from db import ensure_database; ensure_database(force_rebuild=True)"

This creates/overwrites data/homecare.duckdb and materializes helper views (latest_sbp, latest_eye_exam, etc.).

Run the MCP Server Locally

cd /Users/mdnasir/Documents/proj/TopGun/code/homecare-cohort-mcp
uvicorn server:app --reload --port 8010

The Streamable HTTP transport is available at http://127.0.0.1:8010/mcp.

Example Tool Calls

Using the MCP CLI (from the same conda env):

# Identify Step 1a cohort
mcp run server.py:mcp --call get_highrisk_cohort --data '{"limit": 6}'

# Build Step 1b care gap plan
mcp run server.py:mcp \
  --call care_gap_closure_plan \
  --data '{"patient_ids": ["PAT-00042", "PAT-00058"]}'

Or use MCP Inspector (mcp dev server.py:mcp) to interactively inspect Markdown and structured JSON.

Smoke Test

python smoke_test.py

(Ensures both Step 1 tools execute and return non-empty results.)

Deployment Notes

  • Optional build step (if rebuilding DB on deploy):
    python -c "from db import ensure_database; ensure_database()"
    
  • Configure MCP_ALLOWED_HOSTS / MCP_ALLOWED_ORIGINS and future API keys (CMS, HDI, Medical Research).

Repository Structure

homecare-cohort-mcp/
├── api/index.py          # Vercel entrypoint
├── data/homecare.duckdb  # Generated DuckDB file (ignored by default)
├── db.py                 # DuckDB loader + helper views
├── requirements.txt
├── server.py             # FastMCP server with Step 1 tools
├── smoke_test.py         # Regression script
└── vercel.json

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured