What is the goal of this project?
To evaluate whether an MCP server on Azure PostgreSQL can improve developer productivity and maintain or enhance runtime efficiency compared to direct SQL for clinical analytics on MIMIC‑IV.
@ambakick
Basic information
No overview available yet
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mimic-mcp-server": {
"command": "python",
"args": [
"02_bulk_copy.py",
"--csv-root",
"/path/to/mimic-iv"
]
}
}
}Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
This project evaluates whether a Model Context Protocol (MCP) server layered on Azure Database for PostgreSQL can match or outperform direct SQL while reducing developer effort for large‑scale clinical analytics on the MIMIC‑IV dataset.
Install Python 3.10+ and required libraries (psycopg, mcp[cli], azure‑identity, etc.). Load MIMIC‑IV data into an Azure Database for PostgreSQL Flexible Server using the provided SQL scripts and bulk copy script. Start the MCP server by running python azure_postgresql_mcp.py with environment variables PGHOST, PGUSER, PGPASSWORD, PGDATABASE set (or use Microsoft Entra authentication by setting AZURE_USE_AAD=True). Benchmarks can be run with python benchmarks/run_sql.py --query <name> for direct SQL or python benchmarks/run_mcp.py --query <name> for the MCP server.
To evaluate whether an MCP server on Azure PostgreSQL can improve developer productivity and maintain or enhance runtime efficiency compared to direct SQL for clinical analytics on MIMIC‑IV.
Python 3.10+, Node 18+ (optional), an Azure Database for PostgreSQL – Flexible Server (Standard_D4s v5 or larger), MIMIC‑IV credentials and data download permission, and the Python packages listed in the README.
Set the required environment variables (`PGHOST`, `PGUSER`, `PGPASSWORD`, `PGDATABASE`) or configure Entra ID authentication, then run `python azure_postgresql_mcp.py` from the `mcp-server` directory.
For a `COUNT(*)` on `emar_detail` (≈87 million rows), the MCP server averaged 67,560 ms vs. direct SQL’s 101,550 ms, a 33% improvement. The MCP implementation required 23 lines of code vs. 68 for direct SQL.
Data loading scripts are in the `mimic-postgres/` directory, including SQL schema files and a bulk copy script (`02_bulk_copy.py`). Estimated ingest time on Standard_D4s is ~45 minutes for 72 GB of data.
Drop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
A MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.
A Model Context Protocol server that provides read-only access to MySQL databases. This server enables LLMs to inspect database schemas and execute read-only queries.
Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
Comments