🤖 AI Summary
Clinical researchers often lack SQL proficiency and domain expertise in clinical databases, hindering efficient utilization of large EHR datasets such as MIMIC-IV. To address this, we propose the first natural-language interface integrating large language models (LLMs) with the Model Context Protocol (MCP), enabling conversational generation, validation, and execution of SQL queries against SQLite and BigQuery backends. Our approach reduces complex cohort construction—from hours of manual coding to minutes of interactive dialogue—substantially improving analytical efficiency, reproducibility, and accessibility. The key innovation lies in the first application of MCP to clinical database interaction, establishing a closed-loop workflow spanning semantic understanding, query generation, and execution verification. This lowers technical barriers without compromising result reliability, thereby introducing a scalable, reproducible paradigm for clinical data–driven research.
📝 Abstract
As ever-larger clinical datasets become available, they have the potential to unlock unprecedented opportunities for medical research. Foremost among them is Medical Information Mart for Intensive Care (MIMIC-IV), the world's largest open-source EHR database. However, the inherent complexity of these datasets, particularly the need for sophisticated querying skills and the need to understand the underlying clinical settings, often presents a significant barrier to their effective use. M3 lowers the technical barrier to understanding and querying MIMIC-IV data. With a single command it retrieves MIMIC-IV from PhysioNet, launches a local SQLite instance (or hooks into the hosted BigQuery), and-via the Model Context Protocol (MCP)-lets researchers converse with the database in plain English. Ask a clinical question in natural language; M3 uses a language model to translate it into SQL, executes the query against the MIMIC-IV dataset, and returns structured results alongside the underlying query for verifiability and reproducibility. Demonstrations show that minutes of dialogue with M3 yield the kind of nuanced cohort analyses that once demanded hours of handcrafted SQL and relied on understanding the complexities of clinical workflows. By simplifying access, M3 invites the broader research community to mine clinical critical-care data and accelerates the translation of raw records into actionable insight.