M3
๐ฅ๐ค Query MIMIC-IV medical data using natural language through Model Context Protocol (MCP). Transform healthcare research with AI-powered database interactions - supports both local MIMIC-IV SQLite demo dataset and full BigQuery datasets.
What is M3?
M3 is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ฅ๐ค query mimic-iv medical data using natural language through model context protocol (mcp). transform healthcare research with ai-powered database interactions - supports both local mimic-iv sqlite ...
๐ฅ๐ค Query MIMIC-IV medical data using natural language through Model Context Protocol (MCP). Transform healthcare research with AI-powered database interactions - supports both local MIMIC-IV SQLite demo dataset and full BigQuery datasets.
This server falls under the Data Science & ML and Databases categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐ฅ๐ค Query MIMIC-IV medical data using natural language throug
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx m3Configuration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use M3
M3 (MIMIC-IV Medical data via MCP) is an MCP server that lets AI assistants query the MIMIC-IV clinical database โ a large-scale, de-identified dataset of ICU patient records from Beth Israel Deaconess Medical Center โ using natural language instead of raw SQL. It supports both a local DuckDB backend using the MIMIC-IV demo dataset and a full BigQuery backend for the complete dataset, exposing six focused tools: schema inspection, table info, SQL execution, ICU stay retrieval, lab result queries, and demographic breakdowns. Healthcare researchers, data scientists, and clinical informaticists can use it to explore patient populations, analyze lab trends, and run cohort queries without needing deep SQL expertise.
Prerequisites
- Python 3.10+ and uv package manager installed
- For local demo mode: no additional accounts required โ the demo dataset is downloaded automatically
- For full MIMIC-IV: a PhysioNet credentialed account with MIMIC-IV access and a Google Cloud project with BigQuery enabled
- m3-mcp Python package (installable via uv or pip)
- An MCP-compatible client such as Claude Desktop
Initialize the project and install m3-mcp
Create a project directory, initialize a uv project, and install the m3-mcp package.
mkdir m3 && cd m3
uv init && uv add m3-mcpInitialize the MIMIC-IV demo dataset
Run the init command with 'mimic-iv-demo' to download and prepare the demo SQLite database locally. For the full dataset use 'mimic-iv-full' (requires BigQuery credentials).
uv run m3 init mimic-iv-demoRun the quick configuration wizard
The --quick flag sets up a default configuration for the local DuckDB backend.
uv run m3 config --quickConfigure Claude Desktop (local DuckDB mode)
Add the server to your claude_desktop_config.json using uvx to run m3-mcp with the DuckDB backend.
{
"mcpServers": {
"m3": {
"command": "uvx",
"args": ["m3-mcp"],
"env": {
"M3_BACKEND": "duckdb"
}
}
}
}Or configure for BigQuery (full dataset)
For the full MIMIC-IV dataset on BigQuery, set M3_BACKEND=bigquery and provide your Google Cloud project ID. Ensure Application Default Credentials are configured.
{
"mcpServers": {
"m3": {
"command": "uvx",
"args": ["m3-mcp"],
"env": {
"M3_BACKEND": "bigquery",
"M3_PROJECT_ID": "your-gcp-project-id"
}
}
}
}Restart Claude Desktop and verify
Restart Claude Desktop. Ask Claude to list the available tables in the MIMIC-IV database to confirm the server is connected and the schema is accessible.
M3 Examples
Client configuration (Claude Desktop โ local DuckDB)
Minimal configuration for the local MIMIC-IV demo dataset using DuckDB. No BigQuery or cloud credentials needed.
{
"mcpServers": {
"m3": {
"command": "uvx",
"args": ["m3-mcp"],
"env": {
"M3_BACKEND": "duckdb"
}
}
}
}Prompts to try
Query the MIMIC-IV database with natural language โ Claude translates your questions into the appropriate tool calls.
- "What tables are available in the MIMIC-IV database?"
- "Show me the race distribution across all hospital admissions"
- "What is the average ICU length of stay for patients admitted with sepsis?"
- "Retrieve the most recent lab results for patient subject_id 10006"
- "How many unique patients are in the admissions table?"Troubleshooting M3
DuckDB database file not found on startup
Run 'uv run m3 init mimic-iv-demo' from your m3 project directory before starting the server. This downloads and prepares the demo dataset. The server expects the database to exist at the path configured during init.
BigQuery connection fails with authentication error
Run 'gcloud auth application-default login' to set up Application Default Credentials for your Google Cloud account. Ensure M3_PROJECT_ID is set to a project that has BigQuery enabled and that your account has been granted access to the MIMIC-IV BigQuery dataset on PhysioNet.
execute_mimic_query returns a permission error for non-SELECT statements
The tool only allows SELECT statements for data safety. INSERT, UPDATE, DELETE, and DDL operations are blocked by design. Rephrase your request as a read-only query.
Frequently Asked Questions about M3
What is M3?
M3 is a Model Context Protocol (MCP) server that ๐ฅ๐ค query mimic-iv medical data using natural language through model context protocol (mcp). transform healthcare research with ai-powered database interactions - supports both local mimic-iv sqlite demo dataset and full bigquery datasets. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install M3?
Follow the installation instructions on the M3 GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with M3?
M3 works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is M3 free to use?
Yes, M3 is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
M3 Alternatives โ Similar Data Science & ML Servers
Looking for alternatives to M3? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
โ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
โ 3.1k๐ ๐ - MCP server that exposes RocketRide AI pipelines as t
Aix Db
โ 2.1kAix-DB ๅบไบ LangChain/LangGraph ๆกๆถ๏ผ็ปๅ MCP Skills ๅคๆบ่ฝไฝๅไฝๆถๆ๏ผๅฎ็ฐ่ช็ถ่ฏญ่จๅฐๆฐๆฎๆดๅฏ็็ซฏๅฐ็ซฏ่ฝฌๆขใ
NeMo Data Designer
โ 1.9k๐จ NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
โ 1.7kOpen source implementation and extension of Google Researchโs PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
โ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
Browse More Data Science & ML MCP Servers
Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up M3 in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use M3?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.