├── .dockerignore ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ ├── feature_request.yaml │ └── question.yaml └── workflows │ ├── deploy-webapp.yaml │ ├── pre-commit.yaml │ ├── publish.yaml │ └── tests.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── CITATION.cff ├── Dockerfile ├── LICENSE ├── MANIFEST.in ├── README.md ├── benchmarks └── ehrsql-naacl2024 │ ├── README.md │ ├── claude-sonnet-4 │ └── EHRSQL_benchmark.csv │ └── gpt-oss-20B │ ├── EHRSQL_benchmark.csv │ └── conversations │ ├── 10.conversation.json │ ├── 100.conversation.json │ ├── 101.conversation.json │ ├── 11.conversation.json │ ├── 12.conversation.json │ ├── 13.conversation.json │ ├── 14.conversation.json │ ├── 15.conversation.json │ ├── 16.conversation.json │ ├── 17.conversation.json │ ├── 18.conversation.json │ ├── 19.conversation.json │ ├── 2.conversation.json │ ├── 20.conversation.json │ ├── 21.conversation.json │ ├── 22.conversation.json │ ├── 23.conversation.json │ ├── 24.conversation.json │ ├── 25.conversation.json │ ├── 26.conversation.json │ ├── 27.conversation.json │ ├── 28.conversation.json │ ├── 29.conversation.json │ ├── 3.conversation.json │ ├── 30.conversation.json │ ├── 31.conversation.json │ ├── 32.conversation.json │ ├── 33.conversation.json │ ├── 34.conversation.json │ ├── 35.conversation.json │ ├── 36.conversation.json │ ├── 37.conversation.json │ ├── 38.conversation.json │ ├── 39.conversation.json │ ├── 4.conversation.json │ ├── 40.conversation.json │ ├── 41.conversation.json │ ├── 42.conversation.json │ ├── 43.conversation.json │ ├── 44.conversation.json │ ├── 45.conversation.json │ ├── 46.conversation.json │ ├── 47.conversation.json │ ├── 48.conversation.json │ ├── 49.conversation.json │ ├── 5.conversation.json │ ├── 50.conversation.json │ ├── 51.conversation.json │ ├── 52.conversation.json │ ├── 53.conversation.json │ ├── 54.conversation.json │ ├── 55.conversation.json │ ├── 56.conversation.json │ ├── 57.conversation.json │ ├── 58.conversation.json │ ├── 59.conversation.json │ ├── 6.conversation.json │ ├── 60.conversation.json │ ├── 61.conversation.json │ ├── 62.conversation.json │ ├── 63.conversation.json │ ├── 64.conversation.json │ ├── 65.conversation.json │ ├── 66.conversation.json │ ├── 67.conversation.json │ ├── 68.conversation.json │ ├── 69.conversation.json │ ├── 7.conversation.json │ ├── 70.conversation.json │ ├── 71.conversation.json │ ├── 72.conversation.json │ ├── 73.conversation.json │ ├── 74.conversation.json │ ├── 75.conversation.json │ ├── 76.conversation.json │ ├── 77.conversation.json │ ├── 78.conversation.json │ ├── 79.conversation.json │ ├── 8.conversation.json │ ├── 80.conversation.json │ ├── 81.conversation.json │ ├── 82.conversation.json │ ├── 83.conversation.json │ ├── 84.conversation.json │ ├── 85.conversation.json │ ├── 86.conversation.json │ ├── 87.conversation.json │ ├── 88.conversation.json │ ├── 89.conversation.json │ ├── 9.conversation.json │ ├── 90.conversation.json │ ├── 91.conversation.json │ ├── 92.conversation.json │ ├── 93.conversation.json │ ├── 94.conversation.json │ ├── 95.conversation.json │ ├── 96.conversation.json │ ├── 97.conversation.json │ ├── 98.conversation.json │ └── 99.conversation.json ├── docs └── OAUTH2_AUTHENTICATION.md ├── pyproject.toml ├── src └── m3 │ ├── __init__.py │ ├── auth.py │ ├── cli.py │ ├── config.py │ ├── data_io.py │ ├── mcp_client_configs │ ├── __init__.py │ ├── dynamic_mcp_config.py │ └── setup_claude_desktop.py │ └── mcp_server.py ├── tests ├── test_cli.py ├── test_config.py ├── test_config_scripts.py ├── test_data_io.py ├── test_example.py ├── test_mcp_server.py └── test_oauth2_basic.py ├── uv.lock └── webapp ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── banner1.png ├── banner2.png ├── banner3.png ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── m3_architecture.png ├── m3_logo.png ├── m3_logo_transparent.png ├── manifest.json ├── pypi_logo.svg ├── robots.txt └── videos │ ├── m3_website_1.mp4 │ ├── m3_website_2.mp4 │ ├── m3_website_3.mp4 │ └── m3_website_4.mp4 └── src ├── App.css ├── App.js ├── components ├── ArchitectureDiagram.js ├── CTA.js ├── Citation.js ├── Contact.js ├── Demos.js ├── Documentation.js ├── Explanation.js ├── Features.js ├── Footer.js ├── Header.js ├── Hero.js ├── Installation.js └── Paper.js ├── index.css └── index.js /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | __pycache__ 3 | *.pyc 4 | .venv 5 | .env 6 | webapp/ 7 | benchmarks/ 8 | coverage.xml 9 | .pytest_cache/ 10 | dist/ 11 | build/ 12 | *.egg-info 13 | # Keep only the demo DB 14 | m3_data/** 15 | !m3_data/databases/ 16 | !m3_data/databases/mimic_iv_demo.db 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yaml: -------------------------------------------------------------------------------- 1 | name: "🐛 Bug Report" 2 | description: Create a new ticket for a bug in M3. 3 | title: "🐛 [BUG] -
11 |
12 |
13 | M3's Paper—M3's Website.
14 |
11 |
12 |
13 | M3's Paper—M3's Website.
14 |
11 |
12 |
13 | M3's Paper—M3's Website.
14 |
5 | How m3 Model Context Protocol connects AI models to MIMIC-IV healthcare data
10 |
24 | Help us build a better platform for everyone. We are looking for developers to contribute with their code and ideas.
37 | 38 | 41 | Contribute Now 42 | 43 |If you use m3 in your research, please cite our paper :)
38 |{citations.bibtex}
53 | Need an MCP for your hospital or EHR? Have suggestions? Want to collaborate? We'd love to hear from you!
249 |250 | ⚡ Our team responds within 24 hours 251 |
252 |public/videosWatch step-by-step tutorials to get started with m3 and MIMIC-IV medical data
56 |Get PhysioNet credentials, set up Google Cloud Platform BigQuery, and create a new project. Learn where to find your project ID for MCP configuration.
67 |Two ways to install m3: pip install m3-mcp from PyPI or clone from GitHub. Choose the method that works best for your setup.
78 |Download the MIMIC-IV demo dataset, configure Claude Desktop for MCP, verify it's running, and run your first natural language queries.
89 |Configure with Google BigQuery project ID for full MIMIC-IV dataset. Explore other MCP clients for local privacy-focused setups with local models.
100 |Understanding the Model Context Protocol (m3)
10 |The Model Context Protocol (m3) is a powerful framework designed to streamline interaction with large-scale databases like MIMIC. It provides a standardized, efficient, and user-friendly way for researchers to query and analyze complex healthcare data without needing to write raw SQL. By leveraging a context-aware model, m3 understands your research goals and translates natural language or simplified commands into optimized database queries.
15 |The m3 protocol operates on a simple yet powerful principle: it maintains a "context" of your current analysis. This context includes the data you've already loaded, the variables you're interested in, and the patient cohort you're studying. When you issue a new command, m3 uses this context to interpret your request and fetch the relevant data efficiently. This approach minimizes redundant data loading and dramatically speeds up iterative analysis.
20 |The m3 ecosystem includes a suite of tools to facilitate your research workflow.
31 |The m3 CLI provides a powerful set of commands to manage your data, run analyses, and interact with the MIMIC database directly from your terminal.
50 |m3 connect- Establishes a connection to the database.
m3 define- Creates a new patient cohort from specific criteria.
m3 load- Loads data for a defined cohort.
m3 analyze- Performs statistical analysis on the loaded data.
See how m3 simplifies complex database interactions with intuitive interfaces
11 |Monitor your database connections and query performance in real-time. The dashboard provides instant insights into MIMIC-IV records, active researcher connections, and system performance metrics.
18 |
27 | Transform complex medical data into clear, actionable insights with built-in visualization tools. Generate publication-ready charts and graphs directly from your queries.
37 |
46 | Everything researchers need to efficiently work with large-scale medical databases
10 |Native support for the MIMIC-IV database with optimized queries and seamless data access patterns.
17 |Purpose-built for academic and clinical research with features tailored to healthcare data analysis workflows.
23 |Optimized query processing and intelligent caching for fast access to millions of medical records.
29 |m3 is a powerful Model Context Protocol for seamless interaction with the MIMIC database
31 |Free and open-source tool that enables researchers to query and analyze the world's largest publicly available healthcare database with ease
32 |
63 | public/videosFollow the steps below to get m3 up and running on your system.
49 |This video provides a step-by-step guide to installing the m3 protocol and connecting to the MIMIC database for the first time.
58 |Before you begin, ensure you have the following installed on your system:
67 |Read our comprehensive study on the m3 Model Context Protocol and its applications in healthcare data analysis
10 |