- Explore MCP Servers
- clif-mcp-server
Clif Mcp Server
What is Clif Mcp Server
clif-mcp-server is a Model Context Protocol (MCP) server designed for AI-assisted clinical research utilizing the Common Longitudinal ICU Format (CLIF) datasets.
Use cases
Use cases include building cohorts of specific patient demographics, analyzing clinical outcomes such as mortality and length of stay, and generating reproducible analysis scripts for multi-site validation.
How to use
To use clif-mcp-server, clone the repository, install the required dependencies, generate synthetic test data, and start the server with the specified data path. Integrate it with Claude Desktop for analysis.
Key features
Key features include a cohort builder for creating complex patient cohorts, outcomes analysis for various clinical metrics, statistical comparisons between cohorts, and automatic code generation for reproducible analyses. It also emphasizes data privacy and security.
Where to use
clif-mcp-server is primarily used in clinical research settings, particularly in studies involving intensive care unit (ICU) patients and related outcomes.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Clif Mcp Server
clif-mcp-server is a Model Context Protocol (MCP) server designed for AI-assisted clinical research utilizing the Common Longitudinal ICU Format (CLIF) datasets.
Use cases
Use cases include building cohorts of specific patient demographics, analyzing clinical outcomes such as mortality and length of stay, and generating reproducible analysis scripts for multi-site validation.
How to use
To use clif-mcp-server, clone the repository, install the required dependencies, generate synthetic test data, and start the server with the specified data path. Integrate it with Claude Desktop for analysis.
Key features
Key features include a cohort builder for creating complex patient cohorts, outcomes analysis for various clinical metrics, statistical comparisons between cohorts, and automatic code generation for reproducible analyses. It also emphasizes data privacy and security.
Where to use
clif-mcp-server is primarily used in clinical research settings, particularly in studies involving intensive care unit (ICU) patients and related outcomes.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
CLIF MCP Server
A Model Context Protocol (MCP) server for AI-assisted clinical research using the Common Longitudinal ICU Format (CLIF) datasets.
Overview
This MCP server enables researchers to:
- Build complex patient cohorts using clinical criteria
- Analyze clinical outcomes (mortality, length of stay, complications)
- Generate reproducible analysis code for multi-site validation
- Ensure data privacy with built-in security measures
Features
Clinical Research Tools
- Cohort Builder: Create patient cohorts with complex inclusion/exclusion criteria
- Outcomes Analysis: Analyze mortality, ICU/hospital LOS, ventilation, readmissions
- Statistical Comparisons: Compare outcomes between cohorts with various adjustment methods
- Code Generation: Generate Python/R scripts for reproducible analyses
Privacy & Security
- All data remains local - no external transmission
- Cell suppression for small counts
- Removal of patient identifiers from outputs
- Audit logging of all operations
- Differential privacy options
Installation
- Clone the repository:
cd clif-mcp-server
- Install dependencies:
pip install -r requirements.txt
- Generate synthetic test data:
python synthetic_data/clif_generator.py
Usage
Starting the MCP Server
python -m server.main --data-path ./data/synthetic
Using with Claude Desktop
- Add the server to your Claude Desktop configuration:
{
"mcpServers": {
"clif": {
"command": "python",
"args": [
"-m",
"server.main",
"--data-path",
"/path/to/your/clif/data"
],
"cwd": "/path/to/clif-mcp-server"
}
}
}
- Start Claude Desktop and use the CLIF tools for analysis
Example Analyses
Building a Cohort
Build a cohort of mechanically ventilated patients aged 18-65 with ICU stays > 3 days
Analyzing Outcomes
Analyze mortality and ICU length of stay for the ventilated cohort, stratified by age groups
Comparing Cohorts
Compare outcomes between patients who received early vs late mechanical ventilation
Generating Code
Generate Python code for the mortality analysis that can be run at other CLIF sites
Data Format
The server expects CLIF 2.1.0 format CSV files:
patient.csv: Demographicshospitalization.csv: Admission/discharge infoadt.csv: Location transfersvitals.csv: Vital signslabs.csv: Laboratory resultsrespiratory_support.csv: Ventilation datamedication_administration.csv: Medicationspatient_assessments.csv: Clinical assessmentsposition.csv: Patient positioning
Multi-Site Validation
Generated analysis scripts can be shared with other CLIF sites for validation:
- Share the generated script (no patient data)
- Each site runs the script on their local data
- Sites share aggregate results (summary statistics only)
- Compare results across sites to validate findings
Development
Adding New Outcomes
To add new outcome measures, modify server/tools/outcomes_analyzer.py:
def _analyze_new_outcome(self, cohort: pd.DataFrame) -> Dict[str, Any]:
# Implement outcome calculation
pass
Adding New Cohort Criteria
To add new selection criteria, modify server/tools/cohort_builder.py:
# In build_cohort method
if 'new_criteria' in criteria:
# Apply new filter
pass
Security Considerations
- Never commit real patient data
- Review generated code before sharing
- Use aggregate statistics only for multi-site comparisons
- Enable audit logging in production
- Consider differential privacy for sensitive analyses
Contributing
Please submit issues and pull requests to improve the server.
License
This project is licensed under the MIT License.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










